|
@@ -1016,16 +1016,16 @@ out_delete:
|
|
|
}
|
|
|
|
|
|
static int
|
|
|
-parse_callchain_opt(const struct option *opt, const char *arg, int unset)
|
|
|
+callchain_opt(const struct option *opt, const char *arg, int unset)
|
|
|
{
|
|
|
- /*
|
|
|
- * --no-call-graph
|
|
|
- */
|
|
|
- if (unset)
|
|
|
- return 0;
|
|
|
-
|
|
|
symbol_conf.use_callchain = true;
|
|
|
+ return record_callchain_opt(opt, arg, unset);
|
|
|
+}
|
|
|
|
|
|
+static int
|
|
|
+parse_callchain_opt(const struct option *opt, const char *arg, int unset)
|
|
|
+{
|
|
|
+ symbol_conf.use_callchain = true;
|
|
|
return record_parse_callchain_opt(opt, arg, unset);
|
|
|
}
|
|
|
|
|
@@ -1106,9 +1106,12 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
|
"sort by key(s): pid, comm, dso, symbol, parent, weight, local_weight"),
|
|
|
OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples,
|
|
|
"Show a column with the number of samples"),
|
|
|
- OPT_CALLBACK_DEFAULT('G', "call-graph", &top.record_opts,
|
|
|
- "mode[,dump_size]", record_callchain_help,
|
|
|
- &parse_callchain_opt, "fp"),
|
|
|
+ OPT_CALLBACK_NOOPT('G', NULL, &top.record_opts,
|
|
|
+ NULL, "enables call-graph recording",
|
|
|
+ &callchain_opt),
|
|
|
+ OPT_CALLBACK(0, "call-graph", &top.record_opts,
|
|
|
+ "mode[,dump_size]", record_callchain_help,
|
|
|
+ &parse_callchain_opt),
|
|
|
OPT_CALLBACK(0, "ignore-callees", NULL, "regex",
|
|
|
"ignore callees of these functions in call graphs",
|
|
|
report_parse_ignore_callees_opt),
|