aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/bpf-script-example.c
diff options
context:
space:
mode:
authorGerman Gomez <[email protected]>2023-01-20 14:37:00 +0000
committerArnaldo Carvalho de Melo <[email protected]>2023-01-22 21:17:45 +0000
commita7fe9a443b6064c68f86a2ee09bdfa7736660ef3 (patch)
treef51359d0c2dde108b84345db0150fe256e1aa11a /tools/perf/tests/bpf-script-example.c
parentperf cs_etm: Record ts_source in AUXTRACE_INFO for ETMv4 and ETE (diff)
downloadkernel-a7fe9a443b6064c68f86a2ee09bdfa7736660ef3.tar.gz
kernel-a7fe9a443b6064c68f86a2ee09bdfa7736660ef3.zip
perf cs_etm: Set the time field in the synthetic samples
If virtual timestamps are detected, set sample time field accordingly, otherwise warn the user that the samples will not include accurate time data. | Test notes (FEAT_TRF platform) | | $ ./perf record -e cs_etm//u -a -- sleep 4 | $ ./perf script --fields +time | perf 422 [000] 163.375100: 1 branches:uH: 0 [unknown] ([unknown]) | perf 422 [000] 163.375100: 1 branches:uH: ffffb8009544 ioctl+0x14 (/lib/aarch64-linux-gnu/libc-2.27.so) | perf 422 [000] 163.375100: 1 branches:uH: aaaaab6bebf4 perf_evsel__run_ioctl+0x90 (/home/german/linux/tools/perf/perf) | [...] | perf 422 [000] 167.393100: 1 branches:uH: aaaaab6bda00 __xyarray__entry+0x74 (/home/german/linux/tools/perf/perf) | perf 422 [000] 167.393099: 1 branches:uH: aaaaab6bda0c __xyarray__entry+0x80 (/home/german/linux/tools/perf/perf) | perf 422 [000] 167.393099: 1 branches:uH: ffffb8009538 ioctl+0x8 (/lib/aarch64-linux-gnu/libc-2.27.so) | | The time from the first sample to the last sample is 4 seconds Now that times are converted to nanoseconds, also try to estimate the timestamps more accurately be dividing by some fixed value for instructions per ns. This prevents long ranges from being estimated too far in the past than would be realistic. Signed-off-by: German Gomez <[email protected]> Acked-by: Suzuki Poulouse <[email protected]> Tested-by: Tanmay Jagdale <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Bharat Bhushan <[email protected]> Cc: George Cherian <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Leo Yan <[email protected]> Cc: Linu Cherian <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sunil Kovvuri Goutham <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: James Clark <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/tests/bpf-script-example.c')
0 files changed, 0 insertions, 0 deletions