From 2a064a9d1bbb8de6ce489b685cce026eee167cd2 Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 17 Mar 2020 22:48:49 +0000 Subject: deploy: fb719f52b73920fb18c7f3080ebb1fc73300be49 --- perf.html | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'perf.html') diff --git a/perf.html b/perf.html index b4e2c4d..edba9fd 100644 --- a/perf.html +++ b/perf.html @@ -81,7 +81,7 @@ @@ -149,8 +149,7 @@

perf(1)

-
perf list
-  ......... show supported hw/sw events
+
perf list      show supported hw/sw events
 
 perf stat
   -p <pid> .. show stats for running process
@@ -166,7 +165,8 @@ 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 -fno-omit-frame-pointer
+                           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
@@ -177,8 +177,7 @@ perf report
   --stdio ............... report to stdio, if not presen tui mode
   -g graph,0.5,caller ... show caller based call chains with value >0.5
 
-

Useful perf events

-
useful <ev>:
+
Useful <ev>:
   page-faults
   minor-faults
   major-faults
@@ -186,12 +185,12 @@ perf report
   task-clock
 

Flamegraph

-
# flamegraph for single event trace
-perf record -g -p <pid> -e cpu-cycles
+

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
-
-# flamegraphs for multiple events trace
-perf record -g -p <pid> -e cpu-cycles,page-faults
+
+

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