libsysprof-analyze: add build-id to SysprofDocumentMmap

In anticipation of getting PERF_EVENT_MMAP2 events, assume we tack on the
build-id in hex after the filename like "filename\0@build-id\0" so that we
can use it when decoding frames. That will allow us to avoid doing inode
checks (which breaks when moving files between computers anyway) as well
as potentially supporting debuginfod in the future via build-id.
This commit is contained in:
Christian Hergert
2023-05-08 14:25:27 -07:00
parent dc57721699
commit 7c57da2440
2 changed files with 42 additions and 1 deletions

View File

@ -45,6 +45,8 @@ SYSPROF_AVAILABLE_IN_ALL
guint64 sysprof_document_mmap_get_file_offset (SysprofDocumentMmap *self);
SYSPROF_AVAILABLE_IN_ALL
const char *sysprof_document_mmap_get_file (SysprofDocumentMmap *self);
SYSPROF_AVAILABLE_IN_ALL
const char *sysprof_document_mmap_get_build_id (SysprofDocumentMmap *self);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentMmap, g_object_unref)