linux-stable/tools
Leo Yan 78efa7b411 perf cs-etm: Respect timestamp option
When users pass the option '--timestamp' or '-T' in the record command,
all events will set the PERF_SAMPLE_TIME bit in the attribution.  In
this case, the AUX event will record the kernel timestamp, but it
doesn't mean Arm CoreSight enables timestamp packets in its hardware
tracing.

If the option '--timestamp' or '-T' is set, this patch always enables
Arm CoreSight timestamp, as a result, the bit 28 in event's config is to
be set.

Before:

  # perf record -e cs_etm// --per-thread --timestamp -- ls
  # perf script --header-only
  ...
  # event : name = cs_etm//, , id = { 69 }, type = 12, size = 136,
  config = 0, { sample_period, sample_freq } = 1,
  sample_type = IP|TID|TIME|CPU|IDENTIFIER, read_format = ID|LOST,
  disabled = 1, enable_on_exec = 1, sample_id_all = 1, exclude_guest = 1
  ...

After:

  # perf record -e cs_etm// --per-thread --timestamp -- ls
  # perf script --header-only
  ...
  # event : name = cs_etm//, , id = { 49 }, type = 12, size = 136,
  config = 0x10000000, { sample_period, sample_freq } = 1,
  sample_type = IP|TID|TIME|CPU|IDENTIFIER, read_format = ID|LOST,
  disabled = 1, enable_on_exec = 1, sample_id_all = 1, exclude_guest = 1
  ...

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: James Clark <james.clark@arm.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231014074159.1667880-3-leo.yan@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
..
accounting
arch tools arch x86: Sync the msr-index.h copy with the kernel sources 2023-09-13 08:53:37 -03:00
bootconfig
bpf bpftool: Fix build warnings with -Wtype-limits 2023-08-30 08:39:00 +02:00
build perf tools changes for v6.6: 2023-09-09 20:06:17 -07:00
certs
cgroup iocost_monitor: improve it by adding iocg wait_ms 2023-08-08 15:43:03 -06:00
counter
crypto/ccp
debugging
edid
firewire
firmware
gpio
hv
iio tools: iio: iio_generic_buffer: Fix some integer type and calculation 2023-07-29 15:59:20 +01:00
include perf tools: Add get_unaligned_leNN() 2023-10-17 12:40:02 -07:00
kvm/kvm_stat
laptop
leds
lib tools api: Avoid potential double free 2023-10-12 10:01:57 -07:00
memory-model
mm tools/mm: fix undefined reference to pthread_once 2023-09-05 10:13:45 -07:00
net/ynl tools/net/ynl: Add support for create flags 2023-08-27 17:17:10 -07:00
objtool objtool/x86: Fixup frame-pointer vs rethunk 2023-08-17 00:44:35 +02:00
pci
pcmcia
perf perf cs-etm: Respect timestamp option 2023-10-17 12:40:51 -07:00
power More power management updates for 6.6-rc1 2023-09-04 15:21:55 -07:00
rcu
scripts tools build: Add 3-component logical version comparators 2023-08-03 16:59:40 -03:00
spi
testing XArray/IDA updates for 6.6 2023-09-08 21:46:26 -07:00
thermal
time
tracing
usb
verification
virtio
wmi
workqueue workqueue: Implement non-strict affinity scope for unbound workqueues 2023-08-07 15:57:25 -10:00
Makefile