perf test: Record only user callchains
PATCH 1/1 perf test: Record only user callchains
The testcase 'Check Arm64 callgraphs are complete in fp mode' wants to see the following output:
610 leaf
62f parent
648 mainHowever, without excluding user callchains, the output might look like:
ffffc2ff40ef1b5c arch_local_irq_enable ffffc2ff419d032c __schedule ffffc2ff419d06c0 schedule ffffc2ff40e4da30 do_notify_resume ffffc2ff40e421b0 work_pending 610 leaf 62f parent 648 main
Adding '--user-callchains' leaves only the wanted symbols in the chain.
--- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_arm_callgraph_fp.sh +1 -1
@@ -43,7 +43,7 @@ CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 -- $TEST_PROGRAM 2> /dev/null & +perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..."
Signature · 1 line
2.18.4
Hi Michael, thanks for the fix
Quoted 8 lines · Michael Petlan
The testcase 'Check Arm64 callgraphs are complete in fp mode' wants to see the following output:
610 leaf 62f parent 648 mainHowever, without excluding user callchains, the output might look like:
I think you meant "kernel callchains"
Quoted 9 lines
ffffc2ff40ef1b5c arch_local_irq_enable ffffc2ff419d032c __schedule ffffc2ff419d06c0 schedule ffffc2ff40e4da30 do_notify_resume ffffc2ff40e421b0 work_pending 610 leaf 62f parent 648 main
Quoted 5 lines
Adding '--user-callchains' leaves only the wanted symbols in the chain.
Suggested-by German Gomez <[email protected]>Tested-by Michael Petlan <[email protected]>Signed-off-by Michael Petlan <[email protected]>
German
Quoted 17 lines
--- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/test_arm_callgraph_fp.sh +1
-1@@ -43,7 +43,7 @@ CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 -- $TEST_PROGRAM 2> /dev/null & +perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..."
Quoted 6 lines · German Gomez
Hi Michael, thanks for the fix
Quoted 3 lines · Michael Petlan
The testcase 'Check Arm64 callgraphs are complete in fp mode' wants to see the following output:
Quoted 7 lines
Quoted 5 lines
610 leaf 62f parent 648 mainHowever, without excluding user callchains, the output might look like:
I think you meant "kernel callchains"
Oh... of course I did. Thanks.
Quoted 40 lines
Quoted 10 lines
ffffc2ff40ef1b5c arch_local_irq_enable ffffc2ff419d032c __schedule ffffc2ff419d06c0 schedule ffffc2ff40e4da30 do_notify_resume ffffc2ff40e421b0 work_pending 610 leaf 62f parent 648 mainQuoted 5 lines
Adding '--user-callchains' leaves only the wanted symbols in the chain.
Suggested-by German Gomez <[email protected]>Tested-by Michael Petlan <[email protected]>Signed-off-by Michael Petlan <[email protected]>Fixes cd6382d82752 ("perf test arm64: Test unwinding using fame-pointer (fp) mode")Reviewed-by German Gomez <[email protected]>German
Quoted 17 lines
--- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/test_arm_callgraph_fp.sh +1
-1@@ -43,7 +43,7 @@ CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 -- $TEST_PROGRAM 2> /dev/null & +perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..."
Arnaldo Carvalho de Melo
maintainerEm Tue, Jun 14, 2022 at 01:11:20PM +0100, German Gomez escreveu:
Quoted 6 lines
Hi Michael, thanks for the fix
Quoted 3 lines · Michael Petlan
The testcase 'Check Arm64 callgraphs are complete in fp mode' wants to see the following output:
Quoted 7 lines
Quoted 5 lines
610 leaf 62f parent 648 mainHowever, without excluding user callchains, the output might look like:
I think you meant "kernel callchains"
Fixed
Quoted 9 lines
Quoted 9 lines
ffffc2ff40ef1b5c arch_local_irq_enable ffffc2ff419d032c __schedule ffffc2ff419d06c0 schedule ffffc2ff40e4da30 do_notify_resume ffffc2ff40e421b0 work_pending 610 leaf 62f parent 648 main
Quoted 8 lines
Quoted 5 lines
Adding '--user-callchains' leaves only the wanted symbols in the chain.
Suggested-by German Gomez <[email protected]>Tested-by Michael Petlan <[email protected]>Signed-off-by Michael Petlan <[email protected]>Fixes cd6382d82752 ("perf test arm64: Test unwinding using fame-pointer (fp) mode")Reviewed-by German Gomez <[email protected]>
Added, thanks.
- Arnaldo
Quoted 19 lines
German
Quoted 17 lines
--- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/test_arm_callgraph_fp.sh +1
-1@@ -43,7 +43,7 @@ CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 -- $TEST_PROGRAM 2> /dev/null & +perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..."
Signature · 1 line
- Arnaldo
Quoted 17 lines · Michael Petlan
The testcase 'Check Arm64 callgraphs are complete in fp mode' wants to see the following output:
610 leaf 62f parent 648 mainHowever, without excluding user callchains, the output might look like:
ffffc2ff40ef1b5c arch_local_irq_enable ffffc2ff419d032c __schedule ffffc2ff419d06c0 schedule ffffc2ff40e4da30 do_notify_resume ffffc2ff40e421b0 work_pending 610 leaf 62f parent 648 main
Quoted 4 lines
Adding '--user-callchains' leaves only the wanted symbols in the chain.
Suggested-by German Gomez <[email protected]>Tested-by Michael Petlan <[email protected]>
Since you are the patch's author, it's not necessary to add your tested tag.
Quoted 1 line
Signed-off-by Michael Petlan <[email protected]>
With addressing German's comment for "excluding kernel callchains":
Quoted 20 lines
--- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/test_arm_callgraph_fp.sh +1
-1@@ -43,7 +43,7 @@ CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 -- $TEST_PROGRAM 2> /dev/null & +perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..."Signature · 1 line
2.18.4
Arnaldo Carvalho de Melo
maintainerEm Tue, Jun 14, 2022 at 09:17:04PM +0800, Leo Yan escreveu:
Quoted 18 lines · Michael Petlan
Quoted 17 lines
The testcase 'Check Arm64 callgraphs are complete in fp mode' wants to see the following output:
610 leaf 62f parent 648 mainHowever, without excluding user callchains, the output might look like:
ffffc2ff40ef1b5c arch_local_irq_enable ffffc2ff419d032c __schedule ffffc2ff419d06c0 schedule ffffc2ff40e4da30 do_notify_resume ffffc2ff40e421b0 work_pending 610 leaf 62f parent 648 main
Quoted 7 lines
Quoted 4 lines
Adding '--user-callchains' leaves only the wanted symbols in the chain.
Suggested-by German Gomez <[email protected]>Tested-by Michael Petlan <[email protected]>Since you are the patch's author, it's not necessary to add your tested tag.
Right, removed, we expect authors test their patches :-)
Quoted 3 lines
Quoted 1 line
Signed-off-by Michael Petlan <[email protected]>With addressing German's comment for "excluding kernel callchains":
Addressed.
Quoted 1 line
Reviewed-by Leo Yan <[email protected]>
Thanks, added.
- Arnaldo
Quoted 20 lines
Quoted 20 lines
--- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/test_arm_callgraph_fp.sh +1
-1@@ -43,7 +43,7 @@ CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 -- $TEST_PROGRAM 2> /dev/null & +perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..."Signature · 1 line
2.18.4
Signature · 1 line
- Arnaldo
On Tue, Jun 14, 2022 at 04:09:48PM -0300, Arnaldo Carvalho de Melo wrote:
[...]
Quoted 7 lines
Quoted 1 line
With addressing German's comment for "excluding kernel callchains":
Addressed.
Quoted 1 line
Reviewed-by Leo Yan <[email protected]>Thanks, added.
Thanks a lot, Arnaldo!
Quoted 10 lines · Leo Yan
On Tue, Jun 14, 2022 at 04:09:48PM -0300, Arnaldo Carvalho de Melo wrote:
[...]
Quoted 5 lines
Quoted 1 line
With addressing German's comment for "excluding kernel callchains":
Addressed.
Quoted 1 line
Reviewed-by Leo Yan <[email protected]>Thanks, added.
Thanks a lot, Arnaldo!
+1, thank you for the edits and merging