[sysprof/wip/chergert/path-resolver] elf: fix pid usage
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/path-resolver] elf: fix pid usage
- Date: Tue, 21 Sep 2021 22:36:27 +0000 (UTC)
commit bf8a851a5717eae6f40e95dcb2be67143e66c093
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 21 15:35:37 2021 -0700
elf: fix pid usage
We want the pid from the event.
src/libsysprof/sysprof-elf-symbol-resolver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libsysprof/sysprof-elf-symbol-resolver.c b/src/libsysprof/sysprof-elf-symbol-resolver.c
index c500bbb..516e632 100644
--- a/src/libsysprof/sysprof-elf-symbol-resolver.c
+++ b/src/libsysprof/sysprof-elf-symbol-resolver.c
@@ -187,12 +187,12 @@ sysprof_elf_symbol_resolver_load (SysprofSymbolResolver *resolver,
if (type == SYSPROF_CAPTURE_FRAME_FILE_CHUNK)
{
const SysprofCaptureFileChunk *ev;
- int pid;
+ int out_pid;
if (!(ev = sysprof_capture_reader_read_file (reader)))
break;
- pi = sysprof_elf_symbol_resolver_get_process (self, pid);
+ pi = sysprof_elf_symbol_resolver_get_process (self, ev->frame.pid);
if (strcmp (ev->path, "/.flatpak-info") == 0)
{
@@ -208,7 +208,7 @@ sysprof_elf_symbol_resolver_load (SysprofSymbolResolver *resolver,
}
else if (g_str_has_prefix (ev->path, "/proc/") &&
g_str_has_suffix (ev->path, "/mountinfo") &&
- sscanf (ev->path, "/proc/%u/mountinfo", &pid) == 1)
+ sscanf (ev->path, "/proc/%u/mountinfo", &out_pid) == 1)
{
if (pi->mountinfo_data == NULL)
pi->mountinfo_data = g_byte_array_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]