mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
elf: track pid root when building lookaside buffers
We want to know the location of our root if it was specified in the capture file. Such is useful for decoding symbols that may not be reported right from perf tooling. This allows us to try to translate maps for processes in containers.
This commit is contained in:
@ -24,12 +24,6 @@
|
||||
|
||||
#include "sysprof-map-lookaside.h"
|
||||
|
||||
struct _SysprofMapLookaside
|
||||
{
|
||||
GSequence *seq;
|
||||
GStringChunk *chunk;
|
||||
};
|
||||
|
||||
static gint
|
||||
sysprof_map_compare (gconstpointer a,
|
||||
gconstpointer b,
|
||||
@ -107,6 +101,16 @@ sysprof_map_lookaside_insert (SysprofMapLookaside *self,
|
||||
g_sequence_insert_sorted (self->seq, copy, sysprof_map_compare, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
sysprof_map_lookaside_set_root (SysprofMapLookaside *self,
|
||||
const char *root)
|
||||
{
|
||||
g_assert (self != NULL);
|
||||
g_assert (root != NULL);
|
||||
|
||||
self->root = g_string_chunk_insert_const (self->chunk, root);
|
||||
}
|
||||
|
||||
const SysprofMap *
|
||||
sysprof_map_lookaside_lookup (SysprofMapLookaside *self,
|
||||
SysprofCaptureAddress address)
|
||||
|
||||
Reference in New Issue
Block a user