aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index c38373195c4a..f15731a3d438 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-annotate.c 3 * builtin-annotate.c
3 * 4 *
@@ -356,7 +357,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
356 } 357 }
357 358
358 if (total_nr_samples == 0) { 359 if (total_nr_samples == 0) {
359 ui__error("The %s file has no samples!\n", session->file->path); 360 ui__error("The %s file has no samples!\n", session->data->file.path);
360 goto out; 361 goto out;
361 } 362 }
362 363
@@ -400,7 +401,7 @@ int cmd_annotate(int argc, const char **argv)
400 .ordering_requires_timestamps = true, 401 .ordering_requires_timestamps = true,
401 }, 402 },
402 }; 403 };
403 struct perf_data_file file = { 404 struct perf_data data = {
404 .mode = PERF_DATA_MODE_READ, 405 .mode = PERF_DATA_MODE_READ,
405 }; 406 };
406 struct option options[] = { 407 struct option options[] = {
@@ -410,7 +411,7 @@ int cmd_annotate(int argc, const char **argv)
410 "only consider symbols in these dsos"), 411 "only consider symbols in these dsos"),
411 OPT_STRING('s', "symbol", &annotate.sym_hist_filter, "symbol", 412 OPT_STRING('s', "symbol", &annotate.sym_hist_filter, "symbol",
412 "symbol to annotate"), 413 "symbol to annotate"),
413 OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"), 414 OPT_BOOLEAN('f', "force", &data.force, "don't complain, do it"),
414 OPT_INCR('v', "verbose", &verbose, 415 OPT_INCR('v', "verbose", &verbose,
415 "be more verbose (show symbol address, etc)"), 416 "be more verbose (show symbol address, etc)"),
416 OPT_BOOLEAN('q', "quiet", &quiet, "do now show any message"), 417 OPT_BOOLEAN('q', "quiet", &quiet, "do now show any message"),
@@ -482,9 +483,9 @@ int cmd_annotate(int argc, const char **argv)
482 if (quiet) 483 if (quiet)
483 perf_quiet_option(); 484 perf_quiet_option();
484 485
485 file.path = input_name; 486 data.file.path = input_name;
486 487
487 annotate.session = perf_session__new(&file, false, &annotate.tool); 488 annotate.session = perf_session__new(&data, false, &annotate.tool);
488 if (annotate.session == NULL) 489 if (annotate.session == NULL)
489 return -1; 490 return -1;
490 491