mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof-cli: allow disabling perf stacktraces
This commit is contained in:
@ -82,6 +82,7 @@ main (gint argc,
|
||||
gboolean no_memory = FALSE;
|
||||
gboolean no_cpu = FALSE;
|
||||
gboolean no_decode = FALSE;
|
||||
gboolean no_perf = FALSE;
|
||||
gboolean version = FALSE;
|
||||
gboolean force = FALSE;
|
||||
gboolean use_trace_fd = FALSE;
|
||||
@ -94,6 +95,7 @@ main (gint argc,
|
||||
{ "command", 'c', 0, G_OPTION_ARG_STRING, &command, N_("Run a command and profile the process"), N_("COMMAND") },
|
||||
{ "force", 'f', 0, G_OPTION_ARG_NONE, &force, N_("Force overwrite the capture file") },
|
||||
{ "no-cpu", 0, 0, G_OPTION_ARG_NONE, &no_cpu, N_("Disable recording of CPU statistics") },
|
||||
{ "no-perf", 0, 0, G_OPTION_ARG_NONE, &no_perf, N_("Do not record stacktraces using Linux perf") },
|
||||
{ "no-decode", 0, 0, G_OPTION_ARG_NONE, &no_decode, N_("Do not append symbol name information from local machine") },
|
||||
{ "no-memory", 0, 0, G_OPTION_ARG_NONE, &no_memory, N_("Disable recording of memory statistics") },
|
||||
{ "use-trace-fd", 0, 0, G_OPTION_ARG_NONE, &use_trace_fd, N_("Set SYSPROF_TRACE_FD environment for subprocess") },
|
||||
@ -232,9 +234,14 @@ main (gint argc,
|
||||
sysprof_profiler_add_source (profiler, source);
|
||||
g_object_unref (source);
|
||||
|
||||
source = sysprof_perf_source_new ();
|
||||
sysprof_profiler_add_source (profiler, source);
|
||||
g_object_unref (source);
|
||||
#ifdef __linux__
|
||||
if (!no_perf)
|
||||
{
|
||||
source = sysprof_perf_source_new ();
|
||||
sysprof_profiler_add_source (profiler, source);
|
||||
g_object_unref (source);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!no_decode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user