mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof-cli: add --no-sysprofd command line option
This tells the SysprofProfiler that it should avoid using sysprofd unless for some reason that instrument simply cannot work without it. Currently that is at least the RAPL and user-space stack decoding instruments but there may be others.
This commit is contained in:
@ -304,6 +304,7 @@ main (int argc,
|
||||
gboolean scheduler_details = FALSE;
|
||||
gboolean system_bus = FALSE;
|
||||
gboolean session_bus = FALSE;
|
||||
gboolean no_sysprofd = FALSE;
|
||||
int stack_size = 0;
|
||||
int pid = -1;
|
||||
int fd;
|
||||
@ -339,6 +340,7 @@ main (int argc,
|
||||
{ "monitor-bus", 0, 0, G_OPTION_ARG_STRING_ARRAY, &monitor_bus, N_("Additional D-Bus address to monitor") },
|
||||
{ "stack-size", 0, 0, G_OPTION_ARG_INT, &stack_size, N_("Stack size to copy for unwinding in user-space") },
|
||||
{ "no-debuginfod", 0, 0, G_OPTION_ARG_NONE, &enable_debuginfod, N_("Do not use debuginfod to resolve symbols") },
|
||||
{ "no-sysprofd", 0, 0, G_OPTION_ARG_NONE, &no_sysprofd, N_("Do not use Sysprofd to acquire privileges") },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@ -457,6 +459,7 @@ Examples:\n\
|
||||
}
|
||||
|
||||
profiler = sysprof_profiler_new ();
|
||||
sysprof_profiler_set_acquire_privileges (profiler, !no_sysprofd);
|
||||
|
||||
if (argc == 2)
|
||||
filename = argv[1];
|
||||
|
||||
Reference in New Issue
Block a user