[nemiver/profiler] WIP
- From: Fabien Parent <fparent src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver/profiler] WIP
- Date: Sun, 5 Aug 2012 16:27:49 +0000 (UTC)
commit f73c68f05f3bd5338841b18ea9680ae1ca83be87
Author: Fabien Parent <parent f gmail com>
Date: Sun Aug 5 16:40:00 2012 +0200
WIP
src/profengine/nmv-perf-engine.cc | 11 ++++++++++-
src/profengine/nmv-perf-server.cc | 13 +++++++------
2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/src/profengine/nmv-perf-engine.cc b/src/profengine/nmv-perf-engine.cc
index 8145430..a4095e5 100644
--- a/src/profengine/nmv-perf-engine.cc
+++ b/src/profengine/nmv-perf-engine.cc
@@ -493,7 +493,16 @@ PerfEngine::stop_recording ()
THROW_IF_FAIL (m_priv);
if (m_priv->is_using_prof_server) {
- m_priv->proxy->call_sync ("DetachFromProcess");
+ Glib::Variant<unsigned> request_param =
+ Glib::Variant<unsigned>::create (m_priv->request_id);
+
+ std::vector<Glib::VariantBase> parameters;
+ parameters.push_back (request_param);
+
+ Glib::VariantContainerBase parameters_variant =
+ Glib::VariantContainerBase::create_tuple (parameters);
+
+ m_priv->proxy->call_sync ("DetachFromProcess", parameters_variant);
} else {
THROW_IF_FAIL (m_priv->perf_pid);
kill (m_priv->perf_pid, SIGINT);
diff --git a/src/profengine/nmv-perf-server.cc b/src/profengine/nmv-perf-server.cc
index 5e2589c..e2e5692 100644
--- a/src/profengine/nmv-perf-server.cc
+++ b/src/profengine/nmv-perf-server.cc
@@ -55,13 +55,13 @@ static const char *const NMV_DBUS_PROFILER_SERVER_INTROSPECTION_DATA =
" <arg type='i' name='uid' direction='in' />"
" <arg type='i' name='gid' direction='in' />"
// " <arg type='u' name='cookie' direction='in' />"
- " <arg type='i' name='request_id' direction='out' />"
+ " <arg type='u' name='request_id' direction='out' />"
" </method>"
" <method name='DetachFromProcess'>"
- " <arg type='i' name='request_id' direction='in' />"
+ " <arg type='u' name='request_id' direction='in' />"
" </method>"
" <method name='RecordDoneSignal'>"
- " <arg type='i' name='request_id' direction='in' />"
+ " <arg type='u' name='request_id' direction='in' />"
" <arg type='s' name='report_filepath' direction='out' />"
" </method>"
" </interface>"
@@ -134,11 +134,12 @@ public:
struct RequestInfo {
int gid;
int uid;
- SafePtr<PerfEngine> profiler;
+ SafePtr<PerfEngine, ObjectRef, ObjectUnref> profiler;
Glib::RefPtr<Gio::DBus::MethodInvocation> invocation;
RequestInfo () :
- profiler (new PerfEngine (0)),
+ profiler (nemiver::load_iface_and_confmgr<PerfEngine> ("perfengine",
+ "IProfiler")),
invocation (0)
{
}
@@ -200,7 +201,7 @@ struct PerfServer::Priv {
argv.push_back ("--pid");
argv.push_back (UString::compose ("%1", pid));
- request_map[pid] = request;
+ request_map[next_request_id] = request;
PerfRecordOptions options;
THROW_IF_FAIL (request.profiler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]