From 6f9c7f844577696329ddadd086709cf21b5d3730 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Feb 2023 13:13:30 +0000 Subject: [PATCH] 2023 talk about flamegraphs --- 2023-flamegraphs/1000-title.html | 19 + 2023-flamegraphs/2000-fno-omit-frame-pointer.html | 14 + 2023-flamegraphs/2100-perf.html | 31 + 2023-flamegraphs/2200-produce-svg.html | 9 + 2023-flamegraphs/2250-produce-svg.html | 42 + 2023-flamegraphs/3000-a-flamegraph.html | 8 + 2023-flamegraphs/3100-width-is-time.html | 8 + 2023-flamegraphs/3200-height-is-stack-depth.html | 8 + 2023-flamegraphs/3300-plateaus.html | 8 + 2023-flamegraphs/3400-left-to-right.html | 8 + 2023-flamegraphs/3500-function-on-function.html | 8 + 2023-flamegraphs/3600-kernel-threads.html | 8 + 2023-flamegraphs/3700-sleeptest.html | 19 + 2023-flamegraphs/3750-sleep-time.html | 8 + 2023-flamegraphs/4000-revealed.html | 23 + 2023-flamegraphs/5000-summary.html | 24 + 2023-flamegraphs/NOTES | 163 + 2023-flamegraphs/bashrc | 22 + 2023-flamegraphs/code.js | 0 2023-flamegraphs/dwarf.svg | 20729 ++++++++++++++++++++ 2023-flamegraphs/fp.svg | 10565 ++++++++++ 2023-flamegraphs/functions | 46 + 2023-flamegraphs/nbdcopy-qemu-nbd.svg | 8757 +++++++++ 2023-flamegraphs/nbdkit-file-fio.svg | 8593 ++++++++ 2023-flamegraphs/nbdkit-null-fio-16t.svg | 8101 ++++++++ 2023-flamegraphs/redhat.png | Bin 0 -> 8766 bytes 2023-flamegraphs/restore | 3 + 2023-flamegraphs/run | 26 + 2023-flamegraphs/sleeptest.c | 57 + 2023-flamegraphs/sleeptest.svg | 653 + 2023-flamegraphs/style.css | 110 + 31 files changed, 58070 insertions(+) create mode 100644 2023-flamegraphs/1000-title.html create mode 100644 2023-flamegraphs/2000-fno-omit-frame-pointer.html create mode 100644 2023-flamegraphs/2100-perf.html create mode 100644 2023-flamegraphs/2200-produce-svg.html create mode 100644 2023-flamegraphs/2250-produce-svg.html create mode 100644 2023-flamegraphs/3000-a-flamegraph.html create mode 100644 2023-flamegraphs/3100-width-is-time.html create mode 100644 2023-flamegraphs/3200-height-is-stack-depth.html create mode 100644 2023-flamegraphs/3300-plateaus.html create mode 100644 2023-flamegraphs/3400-left-to-right.html create mode 100644 2023-flamegraphs/3500-function-on-function.html create mode 100644 2023-flamegraphs/3600-kernel-threads.html create mode 100644 2023-flamegraphs/3700-sleeptest.html create mode 100644 2023-flamegraphs/3750-sleep-time.html create mode 100644 2023-flamegraphs/4000-revealed.html create mode 100644 2023-flamegraphs/5000-summary.html create mode 100644 2023-flamegraphs/NOTES create mode 100644 2023-flamegraphs/bashrc create mode 100644 2023-flamegraphs/code.js create mode 100644 2023-flamegraphs/dwarf.svg create mode 100644 2023-flamegraphs/fp.svg create mode 100644 2023-flamegraphs/functions create mode 100644 2023-flamegraphs/nbdcopy-qemu-nbd.svg create mode 100644 2023-flamegraphs/nbdkit-file-fio.svg create mode 100644 2023-flamegraphs/nbdkit-null-fio-16t.svg create mode 100644 2023-flamegraphs/redhat.png create mode 100755 2023-flamegraphs/restore create mode 100755 2023-flamegraphs/run create mode 100644 2023-flamegraphs/sleeptest.c create mode 100644 2023-flamegraphs/sleeptest.svg create mode 100644 2023-flamegraphs/style.css diff --git a/2023-flamegraphs/1000-title.html b/2023-flamegraphs/1000-title.html new file mode 100644 index 0000000..b1e1e75 --- /dev/null +++ b/2023-flamegraphs/1000-title.html @@ -0,0 +1,19 @@ + + + + +
+

+ Fedora 38 and Flamegraphs +

+ +

+ Richard W.M. Jones (rjones @ redhat.com)
+ Wednesday March 8th, 2023 +

+ +

+ Easy performance analysis of the whole system using + perf and flamegraphs +

+
diff --git a/2023-flamegraphs/2000-fno-omit-frame-pointer.html b/2023-flamegraphs/2000-fno-omit-frame-pointer.html new file mode 100644 index 0000000..63ffb33 --- /dev/null +++ b/2023-flamegraphs/2000-fno-omit-frame-pointer.html @@ -0,0 +1,14 @@ + + + + +

Fedora 38 has frame pointers

+ +

+-fno-omit-frame-pointer +

+ +

+https://rwmj.wordpress.com/2023/02/14/frame-pointers-vs-dwarf-my-verdict/
Frame pointers vs DWARF – my verdict +

+ diff --git a/2023-flamegraphs/2100-perf.html b/2023-flamegraphs/2100-perf.html new file mode 100644 index 0000000..403a7aa --- /dev/null +++ b/2023-flamegraphs/2100-perf.html @@ -0,0 +1,31 @@ + + + + + + +

Whole system performance analysis

+ +
+sudo perf record -a -g -- \
+     nbdkit -U - null 1G --run 'export uri; fio nbd.fio'
+
+ +

+-a → record the whole system +

+ +

+-g → use frame pointers +

diff --git a/2023-flamegraphs/2200-produce-svg.html b/2023-flamegraphs/2200-produce-svg.html new file mode 100644 index 0000000..54ffb94 --- /dev/null +++ b/2023-flamegraphs/2200-produce-svg.html @@ -0,0 +1,9 @@ + + + + +

perf data to flamegraph SVG

+ +
+flamegraph > analysis.svg
+
diff --git a/2023-flamegraphs/2250-produce-svg.html b/2023-flamegraphs/2250-produce-svg.html new file mode 100644 index 0000000..7498e36 --- /dev/null +++ b/2023-flamegraphs/2250-produce-svg.html @@ -0,0 +1,42 @@ + + + + + + +

perf data to flamegraph SVG

+ +
+flamegraph1 > analysis.svg
+
+ + + +
+

1flamegraph is this script, using the tools +from https://github.com/brendangregg/FlameGraph

+
+set -e
+
+d="$HOME/devel/FlameGraph"
+
+sudo perf script |
+    $d/stackcollapse-perf.pl --all |
+    $d/flamegraph.pl
+
+
diff --git a/2023-flamegraphs/3000-a-flamegraph.html b/2023-flamegraphs/3000-a-flamegraph.html new file mode 100644 index 0000000..5444f94 --- /dev/null +++ b/2023-flamegraphs/3000-a-flamegraph.html @@ -0,0 +1,8 @@ + + + + +

A flamegraph

+ +