[sysprof] sysprofd: fix error path and add some logging
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] sysprofd: fix error path and add some logging
- Date: Wed, 29 May 2019 22:17:22 +0000 (UTC)
commit 4a6f7324c18dccfb0f32b145a6b4e1d93eceb4cc
Author: Christian Hergert <chergert redhat com>
Date: Wed May 8 21:36:17 2019 -0700
sysprofd: fix error path and add some logging
src/sysprofd/ipc-service-impl.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/sysprofd/ipc-service-impl.c b/src/sysprofd/ipc-service-impl.c
index c215134..8c5263a 100644
--- a/src/sysprofd/ipc-service-impl.c
+++ b/src/sysprofd/ipc-service-impl.c
@@ -51,6 +51,8 @@ ipc_service_impl_handle_list_processes (IpcService *service,
g_assert (IPC_IS_SERVICE_IMPL (service));
g_assert (G_IS_DBUS_METHOD_INVOCATION (invocation));
+ g_message ("ListProcesses()");
+
if (!(dir = g_dir_open ("/proc/", 0, NULL)))
{
g_dbus_method_invocation_return_error (g_steal_pointer (&invocation),
@@ -99,6 +101,8 @@ ipc_service_impl_handle_get_proc_file (IpcService *service,
g_assert (IPC_IS_SERVICE_IMPL (service));
g_assert (G_IS_DBUS_METHOD_INVOCATION (invocation));
+ g_message ("GetProcFile(%s)", path);
+
canon = g_canonicalize_filename (path, "/proc/");
if (!g_str_has_prefix (canon, "/proc/"))
@@ -168,6 +172,8 @@ ipc_service_impl_handle_perf_event_open (IpcService *service,
g_assert (IPC_IS_SERVICE_IMPL (service));
g_assert (G_IS_DBUS_METHOD_INVOCATION (invocation));
+ g_message ("PerfEventOpen(pid=%d, cpu=%d)", pid, cpu);
+
if (pid < -1 || cpu < -1)
{
g_dbus_method_invocation_return_error (g_steal_pointer (&invocation),
@@ -307,6 +313,7 @@ ipc_service_impl_handle_perf_event_open (IpcService *service,
G_DBUS_ERROR_FAILED,
"Failed to open perf event stream: %s",
g_strerror (errno));
+ return TRUE;
}
fd_list = g_unix_fd_list_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]