diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-04-07 13:47:40 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2025-04-07 14:35:48 +0200 |
| commit | 1afba39f9305fe4061a4e70baa6ebab9d41459da (patch) | |
| tree | 67e7ed686bd75adc559025870151c4de6d649ced /tools/perf/builtin-annotate.c | |
| parent | fbe43810d563a293e3de301141d33caf1f5d5c5a (diff) | |
| parent | 0af2f6be1b4281385b618cb86ad946eded089ac8 (diff) | |
Merge drm/drm-next into drm-misc-next
Backmerging to get v6.15-rc1 into drm-misc-next. Also fixes a
build issue when enabling CONFIG_DRM_SCHED_KUNIT_TEST.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
| -rw-r--r-- | tools/perf/builtin-annotate.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 836ae0122dab..9833c2c82a2f 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); } } @@ -788,6 +788,8 @@ int cmd_annotate(int argc, const char **argv) "Show instruction stats for the data type annotation"), OPT_BOOLEAN(0, "skip-empty", &symbol_conf.skip_empty, "Do not display empty (or dummy) events in the output"), + OPT_BOOLEAN(0, "code-with-type", &annotate_opts.code_with_type, + "Show data type info in code annotation (memory instructions only)"), OPT_END() }; int ret; @@ -913,6 +915,13 @@ int cmd_annotate(int argc, const char **argv) annotate_opts.annotate_src = false; symbol_conf.annotate_data_member = true; symbol_conf.annotate_data_sample = true; + } else if (annotate_opts.code_with_type) { + symbol_conf.annotate_data_member = true; + + if (!annotate.use_stdio) { + pr_err("--code-with-type only works with --stdio.\n"); + goto out_delete; + } } setup_browser(true); |
