From 5f5868c0604a839f35b82e14b33b3a7626f9abd3 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 24 Jul 2023 15:34:35 -0700 Subject: [PATCH] libsysprof: add control structure for mmap2 events --- .../sysprof-perf-event-stream-private.h | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/libsysprof/sysprof-perf-event-stream-private.h b/src/libsysprof/sysprof-perf-event-stream-private.h index aab37632..a1d0a047 100644 --- a/src/libsysprof/sysprof-perf-event-stream-private.h +++ b/src/libsysprof/sysprof-perf-event-stream-private.h @@ -75,6 +75,35 @@ typedef struct _SysprofPerfEventMmap } SysprofPerfEventMmap SYSPROF_ALIGNED_END(1); +SYSPROF_ALIGNED_BEGIN(1) +typedef struct _SysprofPerfEventMmap2 +{ + struct perf_event_header header; + guint32 pid; + guint32 tid; + guint64 addr; + guint64 len; + guint64 pgoff; + union { + struct { + guint32 maj; + guint32 min; + guint64 ino; + guint64 ino_generation; + }; + struct { + guint8 build_id_size; + guint8 __reserved_1; + guint16 __reserved_2; + guint8 build_id[20]; + }; + }; + guint32 prot; + guint32 flags; + char filename[0]; +} SysprofPerfEventMmap2 +SYSPROF_ALIGNED_END(1); + SYSPROF_ALIGNED_BEGIN(1) typedef struct _SysprofPerfEventCallchain {