From 15230bbb9b1f69def9b0e1b41a097638c0fda734 Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 28 Apr 2020 09:11:18 +0000 Subject: deploy: fef4d6ff2ad9f48e6dccde0f061453e6a3ac624e --- perf.html | 265 -------------------------------------------------------------- 1 file changed, 265 deletions(-) delete mode 100644 perf.html (limited to 'perf.html') diff --git a/perf.html b/perf.html deleted file mode 100644 index 9e378b7..0000000 --- a/perf.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - perf - Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - -
-
-

perf(1)

-
perf list      show supported hw/sw events
-
-perf stat
-  -p <pid> .. show stats for running process
-  -I <ms> ... show stats periodically over interval <ms>
-  -e <ev> ... filter for events
-
-perf top
-  -p <pid> .. show stats for running process
-  -F <hz> ... sampling frequency
-  -K ........ hide kernel threads
-
-perf record
-  -p <pid> ............... record stats for running process
-  -F <hz> ................ sampling frequency
-  --call-graph <method> .. [fp, dwarf, lbr] method how to caputre backtrace
-                           fp   : use frame-pointer, need to compile with
-                                  -fno-omit-frame-pointer
-                           dwarf: use .cfi debug information
-                           lbr  : use hardware last branch record facility
-  -g ..................... short-hand for --call-graph fp
-  -e <ev> ................ filter for events
-
-perf report
-  -n .................... annotate symbols with nr of samples
-  --stdio ............... report to stdio, if not presen tui mode
-  -g graph,0.5,caller ... show caller based call chains with value >0.5
-
-
Useful <ev>:
-  page-faults
-  minor-faults
-  major-faults
-  cpu-cycles`
-  task-clock
-
-

Flamegraph

-

Flamegraph with single event trace

-
perf record -g -e cpu-cycles -p <pid>
-perf script | FlameGraph/stackcollapse-perf.pl | FlameGraph/flamegraph.pl > cycles-flamegraph.svg
-
-

Flamegraph with multiple event traces

-
perf record -g -e cpu-cycles,page-faults -p <pid>
-perf script --per-event-dump
-# fold & generate as above
-
- -
- - -
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3