This is an archive of the discontinued LLVM Phabricator instance.

[trace][intelpt] Support system-wide tracing [8] - Improve the single buffer perf_event configuration
ClosedPublic

Authored by wallace on May 17 2022, 9:49 PM.

Details

Summary

We were setting some events to be written in the data buffer of the
perf_event, but we don't need that.

Besides that, we don't need the data buffer to be larger than 1, so we
can reduce its size.

Diff Detail

Event Timeline

wallace created this revision.May 17 2022, 9:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 9:49 PM
wallace requested review of this revision.May 17 2022, 9:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 9:49 PM
wallace retitled this revision from [trace][intelpt] Support system-wide tracing [7] - Improve the single buffer perf_event configuration to [trace][intelpt] Support system-wide tracing [8] - Improve the single buffer perf_event configuration.May 17 2022, 9:50 PM
jj10306 requested changes to this revision.May 19 2022, 8:14 AM
jj10306 added inline comments.
lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp
186

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 🙂

316

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?

This revision now requires changes to proceed.May 19 2022, 8:14 AM
wallace added inline comments.Jun 9 2022, 2:07 PM
lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp
186

in a later diff I define separate settings for context switches, so this one should be fine

316

context switches are done separately
besides, that let's see in the future if itrace is useful

wallace requested review of this revision.Jun 15 2022, 9:29 AM
jj10306 accepted this revision.Jun 15 2022, 9:34 AM
This revision is now accepted and ready to land.Jun 15 2022, 9:34 AM