-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Dev Platform 2022-01-10, Dev Platform 2022-01-24, Dev Platform 2022-02-07, Dev Platform 2022-02-21
After recording profiles with "perf record" it's possible later to view per-instruction counter stats with "perf annotate" (or interactively from "perf report"). However, when building with `--link-model=dynamic` the report only shows assembly and doesn't include source lines.
Full build command: `./buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_stable_clang.vars --ninja generate-ninja ICECC=icecc CCACHE=ccache --dbg=off --opt=on --link-model=dynamic`
Running perf tool:
1. Start mongod
2. $ perf record -p $(pidof mongod) -e cpu-cycles
3. Execute a query against mongod
4. stop perf (Ctrl+C), it will create perf.data file in the working dir
5. $ perf annotate (by default it will use perf.data file)
The tool should show information similar to this:
│ switch (conf->go[*(const uint8_t *)conf->cur]) { 4.00 │ 80: movzbl (%rbx),%r10d 2.00 │ movsbl (%rax,%r10,1),%eax 20.64 │ add $0xffffffff,%eax
But when using dynamic linking it only shows disassembly and "s" command doesn't toggle the sources on/off (only recolors the line numbers).
- is related to
-
SERVER-59243 icecream 1.1 remotes fail to handle sanitizer black list filepaths properly.
- Closed
-
SERVER-62313 Compiling pre-processed sourcecode with CCache loses path information
- Closed