[Lldb-commits] [PATCH] D125850: [trace][intelpt] Support system-wide tracing [8] - Improve the single buffer perf_event configuration

Jakob Johnson via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 19 08:14:21 PDT 2022

jj10306 requested changes to this revision.
jj10306 added inline comments.
This revision now requires changes to proceed.

Comment at: lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp:186
   attr.exclude_kernel = 1;
-  attr.sample_type = PERF_SAMPLE_TIME;
-  attr.sample_id_all = 1;
won't we need this in order to get timestamps in the context switching events? I agree we don't need it for the time being so maybe in the diff where you add context switch collection you will reintroduce it 🙂

Comment at: lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp:316
-    if (Error mmap_err = perf_event->MmapMetadataAndBuffers(buffer_numpages,
-                                                            buffer_numpages)) {
       return std::move(mmap_err);
In the future if we need to collect itrace we will need a small data buffer.
Do you plan to collect context switch info as part of the same perf event used for intel pt or will you open a separate event?

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list