[sysprof] libsysprof: avoid kallsyms in capture file
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof: avoid kallsyms in capture file
- Date: Wed, 29 May 2019 22:49:21 +0000 (UTC)
commit 1f91bc77edde0954045c36ba57e997d220d8f7ad
Author: Christian Hergert <chergert redhat com>
Date: Tue May 28 13:54:55 2019 -0700
libsysprof: avoid kallsyms in capture file
The kallsyms is huge (like 12Mb) and we want to avoid adding anything we
don't need. Instead, we can rely on the symbols source to decode the
symbols immediately and add them to supplemental.
src/libsysprof/sysprof-proc-source.c | 32 --------------------------------
1 file changed, 32 deletions(-)
---
diff --git a/src/libsysprof/sysprof-proc-source.c b/src/libsysprof/sysprof-proc-source.c
index e4ae1f9..7846a02 100644
--- a/src/libsysprof/sysprof-proc-source.c
+++ b/src/libsysprof/sysprof-proc-source.c
@@ -51,7 +51,6 @@ struct _SysprofProcSource
GObject parent_instance;
SysprofCaptureWriter *writer;
GArray *pids;
- gint kallsyms_fd;
};
static void source_iface_init (SysprofSourceInterface *iface);
@@ -407,7 +406,6 @@ sysprof_proc_source_get_process_info_cb (GObject *object,
g_assert (SYSPROF_IS_HELPERS (helpers));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (SYSPROF_IS_PROC_SOURCE (self));
- g_assert (self->kallsyms_fd == -1);
if (!sysprof_helpers_get_process_info_finish (helpers, result, &info, &error))
{
@@ -416,14 +414,6 @@ sysprof_proc_source_get_process_info_cb (GObject *object,
}
sysprof_proc_source_populate (self, info);
-
- /* TODO: Make this optional? */
- sysprof_helpers_get_proc_fd (helpers,
- "/proc/kallsyms",
- NULL,
- &self->kallsyms_fd,
- NULL);
-
sysprof_source_emit_finished (SYSPROF_SOURCE (self));
}
@@ -450,21 +440,6 @@ sysprof_proc_source_stop (SysprofSource *source)
g_assert (SYSPROF_IS_PROC_SOURCE (self));
- /* We opened kallsyms when starting the capture, now read it and
- * save it to the end of the file.
- */
- if (self->kallsyms_fd != -1)
- {
- sysprof_capture_writer_add_file_fd (self->writer,
- SYSPROF_CAPTURE_CURRENT_TIME,
- -1,
- -1,
- "/proc/kallsyms",
- self->kallsyms_fd);
- close (self->kallsyms_fd);
- self->kallsyms_fd = -1;
- }
-
g_clear_pointer (&self->writer, sysprof_capture_writer_unref);
}
@@ -515,12 +490,6 @@ sysprof_proc_source_finalize (GObject *object)
{
SysprofProcSource *self = (SysprofProcSource *)object;
- if (self->kallsyms_fd != -1)
- {
- close (self->kallsyms_fd);
- self->kallsyms_fd = -1;
- }
-
g_clear_pointer (&self->writer, sysprof_capture_writer_unref);
g_clear_pointer (&self->pids, g_array_unref);
@@ -539,7 +508,6 @@ static void
sysprof_proc_source_init (SysprofProcSource *self)
{
self->pids = g_array_new (FALSE, FALSE, sizeof (GPid));
- self->kallsyms_fd = -1;
}
SysprofSource *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]