sysprofd: add proxy support for mmap2/build_id

We will want to be able to open perf event streams with these options so
that we can get the build-id extracted from an ELF without having to rely
on parsing it at resolution time.

Additionally, it could give us an option for live-decoding at some point
in userspace without having to write the major DWARF capture data to disk.
This commit is contained in:
Christian Hergert
2023-07-24 15:30:16 -07:00
parent 0fe69dcc68
commit 29772e7ac2
2 changed files with 28 additions and 8 deletions

View File

@ -122,6 +122,8 @@ build_options_dict (const struct perf_event_attr *attr)
"{'disabled', <%b>},"
"{'exclude_idle', <%b>},"
"{'mmap', <%b>},"
"{'mmap2', <%b>},"
"{'build_id', <%b>},"
"{'wakeup_events', <%u>},"
"{'sample_id_all', <%b>},"
"{'sample_period', <%t>},"
@ -138,6 +140,8 @@ build_options_dict (const struct perf_event_attr *attr)
(gboolean)!!attr->disabled,
(gboolean)!!attr->exclude_idle,
(gboolean)!!attr->mmap,
(gboolean)!!attr->mmap2,
(gboolean)!!attr->build_id,
(guint32)attr->wakeup_events,
(gboolean)!!attr->sample_id_all,
(guint64)attr->sample_period,