diff options
author | Anubhav Shelat <ashelat@redhat.com> | 2025-01-31 09:57:05 -0500 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-02-03 19:49:10 -0800 |
commit | 23e0a63c6dd3f69cb7ee18411e5f6857cca55b30 (patch) | |
tree | e99c27572283fcf365de9cb20eb1032332e1b50a /tools/perf/scripts/python | |
parent | bb4b8f9697931a2f1d079c3ab7d9ee41d792bd68 (diff) | |
download | linux-23e0a63c6dd3f69cb7ee18411e5f6857cca55b30.tar.gz linux-23e0a63c6dd3f69cb7ee18411e5f6857cca55b30.tar.bz2 linux-23e0a63c6dd3f69cb7ee18411e5f6857cca55b30.zip |
perf script: force stdin for flamegraph in live mode
Currently, running "perf script flamegraph -a -F 99 sleep 1" should
produce flamegraph.html containing the flamegraph. Howevever, it gives a
segmentation fault.
This is caused because the flamegraph.py script is
supposed to take as input the output of "perf record", which should be
in stdin. This would require passing "-i -" to flamegraph.py. However,
the "flamegraph-report" script causes "perf script" command to take the
"-i -" option instead of flamegraph.py, which causes no problem for
"perf script", but causes a seg fault since flamegraph.py has no input
file. To fix this I added the "-i -" option directly to the
flamegraph-report script to ensure flamegraph.py gets input from stdin.
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
Tested-by: Michael Petlan <mpetlan@redhat.com>
Link: https://lore.kernel.org/r/20250131145704.3164542-2-ashelat@redhat.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
-rwxr-xr-x | tools/perf/scripts/python/bin/flamegraph-report | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/bin/flamegraph-report b/tools/perf/scripts/python/bin/flamegraph-report index 53c5dc90c87e..83d5738c75ca 100755 --- a/tools/perf/scripts/python/bin/flamegraph-report +++ b/tools/perf/scripts/python/bin/flamegraph-report @@ -1,3 +1,3 @@ #!/bin/bash # description: create flame graphs -perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py -- "$@" +perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py -i - -- "$@" |