[sysprof/wip/chergert/control-fd] memprof: remove use of tracefd source
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/control-fd] memprof: remove use of tracefd source
- Date: Tue, 11 Feb 2020 19:36:01 +0000 (UTC)
commit e7dd57b3187597d3ded9ba23b8b3259277956e9f
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 11 11:35:15 2020 -0800
memprof: remove use of tracefd source
We piggy back on the control-fd source now
src/libsysprof/sysprof-memprof-source.c | 11 ++---------
src/libsysprof/sysprof-memprof-source.h | 2 +-
2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/libsysprof/sysprof-memprof-source.c b/src/libsysprof/sysprof-memprof-source.c
index 4856ba7..76a2b27 100644
--- a/src/libsysprof/sysprof-memprof-source.c
+++ b/src/libsysprof/sysprof-memprof-source.c
@@ -26,11 +26,9 @@
struct _SysprofMemprofSource
{
- SysprofTracefdSource parent_instance;
+ GObject parent_instance;
};
-static SysprofSourceInterface *parent_iface;
-
static void
sysprof_memprof_source_modify_spawn (SysprofSource *source,
SysprofSpawnable *spawnable)
@@ -38,8 +36,6 @@ sysprof_memprof_source_modify_spawn (SysprofSource *source,
g_assert (SYSPROF_IS_SOURCE (source));
g_assert (SYSPROF_IS_SPAWNABLE (spawnable));
- parent_iface->modify_spawn (source, spawnable);
-
#ifdef __linux__
sysprof_spawnable_setenv (spawnable, "G_SLICE", "always-malloc");
sysprof_spawnable_setenv (spawnable,
@@ -51,12 +47,10 @@ sysprof_memprof_source_modify_spawn (SysprofSource *source,
static void
source_iface_init (SysprofSourceInterface *iface)
{
- parent_iface = g_type_interface_peek_parent (iface);
-
iface->modify_spawn = sysprof_memprof_source_modify_spawn;
}
-G_DEFINE_TYPE_WITH_CODE (SysprofMemprofSource, sysprof_memprof_source, SYSPROF_TYPE_TRACEFD_SOURCE,
+G_DEFINE_TYPE_WITH_CODE (SysprofMemprofSource, sysprof_memprof_source, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (SYSPROF_TYPE_SOURCE, source_iface_init))
static void
@@ -67,7 +61,6 @@ sysprof_memprof_source_class_init (SysprofMemprofSourceClass *klass)
static void
sysprof_memprof_source_init (SysprofMemprofSource *self)
{
- sysprof_tracefd_source_set_envvar (SYSPROF_TRACEFD_SOURCE (self), "MEMPROF_TRACE_FD");
}
SysprofSource *
diff --git a/src/libsysprof/sysprof-memprof-source.h b/src/libsysprof/sysprof-memprof-source.h
index 9188a89..cfff995 100644
--- a/src/libsysprof/sysprof-memprof-source.h
+++ b/src/libsysprof/sysprof-memprof-source.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
#define SYSPROF_TYPE_MEMPROF_SOURCE (sysprof_memprof_source_get_type())
SYSPROF_AVAILABLE_IN_3_36
-G_DECLARE_FINAL_TYPE (SysprofMemprofSource, sysprof_memprof_source, SYSPROF, MEMPROF_SOURCE,
SysprofTracefdSource)
+G_DECLARE_FINAL_TYPE (SysprofMemprofSource, sysprof_memprof_source, SYSPROF, MEMPROF_SOURCE, GObject)
SYSPROF_AVAILABLE_IN_3_36
SysprofSource *sysprof_memprof_source_new (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]