aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2023-11-28 17:54:39 +0000
committerArnaldo Carvalho de Melo <[email protected]>2023-12-07 20:18:24 +0000
commit7f929aea21fd0be5e0d9ee5827d5b809daa69f29 (patch)
tree0ad972fea7ee9e973e9acfb762a5bb428b71168f /tools/perf/builtin-annotate.c
parentperf ui/browser/annotate: Use global annotation_options (diff)
downloadkernel-7f929aea21fd0be5e0d9ee5827d5b809daa69f29.tar.gz
kernel-7f929aea21fd0be5e0d9ee5827d5b809daa69f29.zip
perf annotate: Ensure init/exit for global options
Now it only cares about the global options so it can just handle it without the argument. Reviewed-by: Ian Rogers <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index d17213bd8332..d880f1b039fd 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -615,13 +615,13 @@ int cmd_annotate(int argc, const char **argv)
set_option_flag(options, 0, "show-total-period", PARSE_OPT_EXCLUSIVE);
set_option_flag(options, 0, "show-nr-samples", PARSE_OPT_EXCLUSIVE);
- annotation_options__init(&annotate_opts);
+ annotation_options__init();
ret = hists__init();
if (ret < 0)
return ret;
- annotation_config__init(&annotate_opts);
+ annotation_config__init();
argc = parse_options(argc, argv, options, annotate_usage, 0);
if (argc) {
@@ -651,7 +651,7 @@ int cmd_annotate(int argc, const char **argv)
return -ENOMEM;
}
- if (annotate_check_args(&annotate_opts) < 0)
+ if (annotate_check_args() < 0)
return -EINVAL;
#ifdef HAVE_GTK2_SUPPORT
@@ -732,7 +732,7 @@ out_delete:
#ifndef NDEBUG
perf_session__delete(annotate.session);
#endif
- annotation_options__exit(&annotate_opts);
+ annotation_options__exit();
return ret;
}