[sysprof/wip/chergert/sysprof-3] libsysprof: avoid remote call if we can
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] libsysprof: avoid remote call if we can
- Date: Sat, 11 May 2019 03:01:51 +0000 (UTC)
commit 905d9944da3c146fddb84c8cdbdd891bb380b950
Author: Christian Hergert <chergert redhat com>
Date: Fri May 10 20:01:38 2019 -0700
libsysprof: avoid remote call if we can
src/libsysprof/sysprof-helpers.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/libsysprof/sysprof-helpers.c b/src/libsysprof/sysprof-helpers.c
index 72d5d51..8958f6f 100644
--- a/src/libsysprof/sysprof-helpers.c
+++ b/src/libsysprof/sysprof-helpers.c
@@ -154,6 +154,13 @@ sysprof_helpers_list_processes (SysprofHelpers *self,
g_return_val_if_fail (processes != NULL, FALSE);
g_return_val_if_fail (n_processes != NULL, FALSE);
+ if (helpers_can_see_pids ())
+ {
+ /* No need to query remote if we can see pids in this namespace */
+ if (helpers_list_processes (processes, n_processes))
+ return TRUE;
+ }
+
if (ipc_service_call_list_processes_sync (self->proxy, &fixed_ar, cancellable, NULL))
{
const gint32 *data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]