Bug 208009

Summary: perf script is extremely slow when `srcline` option is passed
Product: Tracing/Profiling Reporter: Vladimir Plyashkun (vladimir.plyashkun)
Component: Perf toolAssignee: Arnaldo Carvalho de Melo (acme)
Status: RESOLVED DUPLICATE    
Severity: normal CC: irogers, jolsa, oparafranky09
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.18 Subsystem:
Regression: No Bisected commit-id:

Description Vladimir Plyashkun 2020-06-01 14:22:26 UTC
Hi!
I have problem with perf script.
Suppose i have very simple program (compiled with debug info): create std::vector, make 100 0000 push_back calls and sort it. 
`perf record --freq=997 --call-graph dwarf -o ./perf.data` generates file of size 10MB.
Then if i execute perf script with following options: `perf script --comm tid,ip,sym,dso -i ./perf.data > ./perf_script` it works for few seconds, but if i call `perf script --comm tid,ip,sym,dso,srcline -i ./perf.data > ./perf_script` it starting to work for few minutes on this simple program.

One more realistic example:
1) Download opencv from: https://github.com/opencv/opencv
2) Build opencv_test_core target
3) Add --gtest_filter=*Mat* to execute less tests
4) As a result for ~30sec long running tests (with frequency 997) perf script 
without srcline took 15 sec, while perf script with srcline working more than 30 minutes on my laptop.

Of course, i'm expecting some kind of slowdown, but this seems that something goes wrong.
Comment 2 Ian Rogers 2022-01-22 03:54:39 UTC
I believe this is a duplicate of bug 202677. I'll mark it so but feel free to re-open or open a new bug if it reproduces on the current code.
Comment 3 Ian Rogers 2022-01-22 03:54:49 UTC

*** This bug has been marked as a duplicate of bug 202677 ***