diff --git a/SOURCES/002-add-process-name-and-pid-in-flamegraph-dashboard.patch b/SOURCES/002-add-process-name-and-pid-in-flamegraph-dashboard.patch new file mode 100644 index 0000000..bb45ef0 --- /dev/null +++ b/SOURCES/002-add-process-name-and-pid-in-flamegraph-dashboard.patch @@ -0,0 +1,22 @@ +diff --git a/src/dashboards/pcp-bpftrace-flame-graphs.json b/src/dashboards/pcp-bpftrace-flame-graphs.json +index 8f3d0ba..a05dbb9 100644 +--- a/src/dashboards/pcp-bpftrace-flame-graphs.json ++++ b/src/dashboards/pcp-bpftrace-flame-graphs.json +@@ -150,7 +150,7 @@ + }, + "targets": [ + { +- "expr": "/*\n * sample kernel stacks every 99 Hz, and clear map every 5 seconds\n *\n * 30-Oct-2019 Andreas Gerstmayr Created this.\n */\n// include: @stacks\n// custom-output-block\n\nprofile:hz:99 { @stacks[kstack] = count(); }\n\ninterval:s:1 {\n print(@stacks);\n @cnt++;\n if (@cnt >= 5) {\n clear(@stacks);\n @cnt = 0;\n }\n}", ++ "expr": "/*\n * sample kernel stacks every 99 Hz, and clear map every 5 seconds\n *\n * 30-Oct-2019 Andreas Gerstmayr Created this.\n * 7-Aug-2020 Andreas Gerstmayr Added process name and PID.\n */\n// include: @stacks\n// custom-output-block\n\nprofile:hz:99 { @stacks[comm,pid,kstack] = count(); }\n\ninterval:s:1 {\n print(@stacks);\n @cnt++;\n if (@cnt >= 5) {\n clear(@stacks);\n @cnt = 0;\n }\n}", + "format": "flamegraph", + "minPcpVersion": "5.0.2", + "refId": "A" +@@ -177,7 +177,7 @@ + }, + "targets": [ + { +- "expr": "/*\n * sample user stacks every 99 Hz, and clear map every 5 seconds\n *\n * 30-Oct-2019 Andreas Gerstmayr Created this.\n */\n// include: @stacks\n// custom-output-block\n\nprofile:hz:99 { @stacks[ustack] = count(); }\n\ninterval:s:1 {\n print(@stacks);\n @cnt++;\n if (@cnt >= 5) {\n clear(@stacks);\n @cnt = 0;\n }\n}", ++ "expr": "/*\n * sample user stacks every 99 Hz, and clear map every 5 seconds\n *\n * 30-Oct-2019 Andreas Gerstmayr Created this.\n * 7-Aug-2020 Andreas Gerstmayr Added process name and PID.\n */\n// include: @stacks\n// custom-output-block\n\nprofile:hz:99 { @stacks[comm,pid,ustack] = count(); }\n\ninterval:s:1 {\n print(@stacks);\n @cnt++;\n if (@cnt >= 5) {\n clear(@stacks);\n @cnt = 0;\n }\n}", + "format": "flamegraph", + "minPcpVersion": "5.0.2", + "refId": "A" diff --git a/SPECS/grafana-pcp.spec b/SPECS/grafana-pcp.spec index 2113947..282b97f 100644 --- a/SPECS/grafana-pcp.spec +++ b/SPECS/grafana-pcp.spec @@ -1,6 +1,6 @@ Name: grafana-pcp Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Performance Co-Pilot Grafana Plugin %global github https://github.com/performancecopilot/grafana-pcp @@ -18,6 +18,7 @@ Source2: create_dependency_bundle.sh Source3: list_bundled_nodejs_packages.py Patch1: 001-fix-empty-container-dashboard.patch +Patch2: 002-add-process-name-and-pid-in-flamegraph-dashboard.patch BuildRequires: nodejs Requires: grafana >= 6.6.0 @@ -85,6 +86,7 @@ bpftrace scripts from pmdabpftrace(1), as well as several dashboards. %setup -q %setup -q -a 1 %patch1 -p1 +%patch2 -p1 %build rm -rf dist @@ -107,6 +109,9 @@ cp -a dist/* %{buildroot}/%{install_dir} %doc README.md %changelog +* Fri Aug 07 2020 Andreas Gerstmayr 2.0.2-3 +- bpftrace: show process name and PID in flame graphs + * Fri Jul 24 2020 Andreas Gerstmayr 2.0.2-2 - vector: do not show all cgroups in the container overview dashboard in case no containers are present on the system