diff options
| author | Namhyung Kim <[email protected]> | 2025-03-10 22:49:22 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2025-03-13 07:19:51 +0000 |
| commit | fe8da6692aa8c1279b97a609f67dd56048b68bec (patch) | |
| tree | bec9d980c679e92cbcd81b309ea803dbf324207d /tools/perf/builtin-annotate.c | |
| parent | perf annotate: Pass annotation_options to annotation_line__print() (diff) | |
| download | kernel-fe8da6692aa8c1279b97a609f67dd56048b68bec.tar.gz kernel-fe8da6692aa8c1279b97a609f67dd56048b68bec.zip | |
perf annotate: Pass hist_entry to annotate functions
It's a prepartion to support code annotation and data type
annotation at the same time. Data type annotation needs more
information in the hist_entry so it needs to be passed deeper.
Also rename a function with the same name in the builtin-annotate.c
to hist_entry__stdio_annotate since it matches better to the command
line option. And change the condition inside to be simpler.
Reviewed-by: Ian Rogers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
| -rw-r--r-- | tools/perf/builtin-annotate.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 836ae0122dab..966950c38306 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -321,14 +321,14 @@ static int process_feature_event(struct perf_session *session, return 0; } -static int hist_entry__tty_annotate(struct hist_entry *he, +static int hist_entry__stdio_annotate(struct hist_entry *he, struct evsel *evsel, struct perf_annotate *ann) { - if (!ann->use_stdio2) - return symbol__tty_annotate(&he->ms, evsel); + if (ann->use_stdio2) + return hist_entry__tty_annotate2(he, evsel); - return symbol__tty_annotate2(&he->ms, evsel); + return hist_entry__tty_annotate(he, evsel); } static void print_annotate_data_stat(struct annotated_data_stat *s) @@ -541,7 +541,7 @@ find_next: if (next != NULL) nd = next; } else { - hist_entry__tty_annotate(he, evsel, ann); + hist_entry__stdio_annotate(he, evsel, ann); nd = rb_next(nd); } } |
