On 10/12/22 22:18, Ilya Leoshkevich wrote:
Add ability to dump /tmp/perf-<pid>.map and jit-<pid>.dump.
The first one allows the perf tool to map samples to each individual
translation block. The second one adds the ability to resolve symbol
names, line numbers and inspect JITed code.

Example of use:

     perf record qemu-x86_64 -perfmap ./a.out
     perf report

or

     perf record -k 1 qemu-x86_64 -jitdump ./a.out
     perf inject -j -i perf.data -o perf.data.jitted
     perf report -i perf.data.jitted

Co-developed-by: Vanderson M. do Rosario <vanderson...@gmail.com>
Co-developed-by: Alex Bennée <alex.ben...@linaro.org>
Signed-off-by: Ilya Leoshkevich <i...@linux.ibm.com>

I think I remember this, and the question that was never answered was:

@@ -1492,6 +1493,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
      }
      tb->tc.size = gen_code_size;
+ perf_report_code(gen_code_buf, gen_code_size, tb->icount, tb->pc);

When do_tb_flush is called, everything that is recorded in perfmap is 
invalidated.
How do you tell perf about that?


r~


Reply via email to