[sysprof] libsysprof: use a{sv} for future profiler specific options
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof: use a{sv} for future profiler specific options
- Date: Wed, 29 May 2019 22:51:42 +0000 (UTC)
commit a74e6daa3b0403b346a51bcab3d94c3e543e4c63
Author: Christian Hergert <chergert redhat com>
Date: Wed May 29 15:08:17 2019 -0700
libsysprof: use a{sv} for future profiler specific options
We may need this in the future to send backend-specific options to the
profiler peer.
src/libsysprof/sysprof-proxy-source.c | 2 +-
src/org.gnome.Sysprof3.Profiler.xml | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof/sysprof-proxy-source.c b/src/libsysprof/sysprof-proxy-source.c
index 536c51e..6c65702 100644
--- a/src/libsysprof/sysprof-proxy-source.c
+++ b/src/libsysprof/sysprof-proxy-source.c
@@ -229,7 +229,7 @@ sysprof_proxy_source_monitor (SysprofProxySource *self,
self->object_path,
"org.gnome.Sysprof3.Profiler",
"Start",
- g_variant_new ("(h)", handle),
+ g_variant_new ("(a{sv}h)", NULL, handle),
G_VARIANT_TYPE ("()"),
G_DBUS_CALL_FLAGS_NO_AUTO_START,
-1,
diff --git a/src/org.gnome.Sysprof3.Profiler.xml b/src/org.gnome.Sysprof3.Profiler.xml
index 619f79b..c5c5e8a 100644
--- a/src/org.gnome.Sysprof3.Profiler.xml
+++ b/src/org.gnome.Sysprof3.Profiler.xml
@@ -2,9 +2,28 @@
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.gnome.Sysprof3.Profiler">
+ <!--
+ Start:
+ @options: an a{sv} of implementation specific options
+ @fd: a file-descriptor for the profiler to write to
+
+ Start the profiler if it is not running.
+
+ If the profiler is already running, this method should return
+ an error so that the caller knows not to call Stop().
+
+ It is also suggested that implementations disable profiling if
+ they lose the peer connection.
+ -->
<method name="Start">
+ <arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="in"/>
</method>
+ <!--
+ Stop:
+
+ Stop the profiler if it is running.
+ -->
<method name="Stop"/>
</interface>
</node>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]