diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-01-31 23:29:55 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-01-31 23:51:56 +0100 |
commit | f3e631f7539c71686d1e336756c9c0fcd0b587ad (patch) | |
tree | 5025fb64522c3c8aed6b047d8a704cc73ff35f88 /src/trace_profile | |
parent | 89d7fefa50268eb3ea5aa487c398a9e963b4c50d (diff) | |
download | notes-f3e631f7539c71686d1e336756c9c0fcd0b587ad.tar.gz notes-f3e631f7539c71686d1e336756c9c0fcd0b587ad.zip |
perf: add output, disasm flavor, intel sdm
Diffstat (limited to 'src/trace_profile')
-rw-r--r-- | src/trace_profile/perf.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/trace_profile/perf.md b/src/trace_profile/perf.md index 351ae89..7ce2ca2 100644 --- a/src/trace_profile/perf.md +++ b/src/trace_profile/perf.md @@ -8,6 +8,7 @@ perf list show supported hw/sw events & metrics perf stat -p <pid> ..... show stats for running process + -o <file> .... write output to file (default stderr) -I <ms> ...... show stats periodically over interval <ms> -e <ev> ...... select event(s) -M <met> ..... print metric(s), this adds the metric events @@ -21,6 +22,7 @@ perf top perf record -p <pid> ............... record stats for running process + -o <file> .............. write output to file (default perf.data) -F <hz> ................ sampling frequency --call-graph <method> .. [fp, dwarf, lbr] method how to caputre backtrace fp : use frame-pointer, need to compile with @@ -29,8 +31,9 @@ perf record lbr : use hardware last branch record facility -g ..................... short-hand for --call-graph fp -e <ev> ................ select event(s) - --all-user ... configure all selected events for user space - --all-kernel . configure all selected events for kernel space + --all-user ............. configure all selected events for user space + --all-kernel ........... configure all selected events for kernel space + -M intel ............... use intel disassembly in annotate perf report -n .................... annotate symbols with nr of samples @@ -141,7 +144,7 @@ perf script --per-event-dump ``` ## Examples -### Determine theoretical max instructions per cycle +### Estimate max instructions per cycle ```c {{#include src/noploop.c }} @@ -204,19 +207,23 @@ perf report --stdio -g graph,callee ## References - [intel/perfmon][perfmon] - intel PMU event database per uarch -- [intel/perfmon-html][perfmon-html] - a html rendered version of the PMU events with search +- [intel/perfmon-html][perfmon-html] - a html rendered version of the PMU + events with search - [intel/perfmon/mapfile.csv][perfmon-map] - processor family to uarch mapping - [linux/perf/events][perf-pmu-ev] - x86 PMU events known to perf tools - [linux/arch/events][x86-core-ev] - x86 PMU events linux kernel - [wikichip] - computer architecture wiki - [perf-list(1)][man-perf-list] - manpage - [perf_event_open(2)][man-perf-ev-open] - manpage +- [intel/sdm][intel-sdm] - intel software developer manuals (eg Optimization + Reference Manual) [perfmon-html]: https://perfmon-events.intel.com/ [perfmon]: https://github.com/intel/perfmon [perfmon-map]: https://github.com/intel/perfmon/blob/main/mapfile.csv [perfmon-kinds]: https://github.com/intel/perfmon/tree/main#performance-monitoring-events +[intel-sdm]: https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html [perf-pmu-ev]: https://github.com/torvalds/linux/tree/master/tools/perf/pmu-events/arch/x86 [x86-core-ev]: https://github.com/torvalds/linux/blob/master/arch/x86/events/intel/core.c |