[sysprof] libsysprof: ignore kernel symbols if embedded resolver is found
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof: ignore kernel symbols if embedded resolver is found
- Date: Wed, 29 May 2019 22:50:52 +0000 (UTC)
commit 1ee1a7cc3a1cd2717f0eaa3172fb0dd40ac51a2e
Author: Christian Hergert <chergert redhat com>
Date: Tue May 28 22:47:27 2019 -0700
libsysprof: ignore kernel symbols if embedded resolver is found
This ensures that we don't mix symbols from kernels if we can reasonably
expect that the necessary symbols were decoded by the peer.
src/libsysprof/sysprof-kernel-symbol-resolver.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/libsysprof/sysprof-kernel-symbol-resolver.c b/src/libsysprof/sysprof-kernel-symbol-resolver.c
index ee6ec82..5975616 100644
--- a/src/libsysprof/sysprof-kernel-symbol-resolver.c
+++ b/src/libsysprof/sysprof-kernel-symbol-resolver.c
@@ -82,6 +82,14 @@ sysprof_kernel_symbol_resolver_load (SysprofSymbolResolver *resolver,
g_assert (SYSPROF_IS_KERNEL_SYMBOL_RESOLVER (self));
g_assert (reader != NULL);
+ /* If there is an embedded __symbols__ file, then we won't do anything
+ * because we want to use the symbols from the peer.
+ */
+ if (sysprof_capture_reader_find_file (reader, "__symbols__"))
+ return;
+
+ sysprof_capture_reader_reset (reader);
+
if (-1 == (data_fd = sysprof_memfd_create ("[sysprof-kallsyms]")) ||
!sysprof_capture_reader_read_file_fd (reader, "/proc/kallsyms", data_fd))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]