From nobody Wed Dec 17 10:58:48 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25A10C4167B for ; Tue, 28 Nov 2023 17:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346823AbjK1Rzd (ORCPT ); Tue, 28 Nov 2023 12:55:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346723AbjK1Ry5 (ORCPT ); Tue, 28 Nov 2023 12:54:57 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 207C01727; Tue, 28 Nov 2023 09:54:55 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6bd32d1a040so5736862b3a.3; Tue, 28 Nov 2023 09:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701194094; x=1701798894; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=8d1bVoRgK9y5LwRIkv9wOKItAYFVYohC3YMot6kdjDk=; b=Ky5Amp35IgFW41uaZV29/0m6+zG0js9KTtyih57qlYm9D/yh2SdqMqSjx9RH764MlP fP901UBQNKakdFCDBCqsOZTHK1JQjzIw4jBPvqETPUt4092CTbLfHwbbQyVrkUmhUrKa HucJd9qJaCkpNNPXfrodW8ceEBELG5/7rkz4JaJYzXWlukZROVAbCQFaDtf9yvuTFl64 3hn5WsSVyGlIVtXTBeQCok34ImC34FUqezjOXhl68G32TU9J1ouN8yE8NSWaiL1hjEHy yQ+hXDZo0IkRdfNmOiUk3hlr3+LdgbdmyB0XnoBFwTRLAUdPpDp/DFPT4oaTaHUJmpNN 3rNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701194094; x=1701798894; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8d1bVoRgK9y5LwRIkv9wOKItAYFVYohC3YMot6kdjDk=; b=eoiRBYQWp2S+Cnp5UPsioGFjfg/eqjDhxDkY0jFBn1nhpmdGM1dO8GCo0ELtyfmeia q1JLRh5G4ANuXmtx8cYP8K0O+rTaejpyRO9smjzTX/KNvoQonPKbAC0byuIRlDrnQkdt IK+g9tWVWXVHz7C3+42lcZJ8WWBHBeUXIuU5CaKpj6scXyzoE4mVAQJZRaIqpPH7ydYx yJUJbtdk3COQcFixkfrKiyL80uaYkTPbdSae3v+qKLtBQLHLNtA+dDhNGp8hS9HY1sPq al2QN2Ksce5k8ITYxAF4EcqHYLbiiiS4sNlkvZXDc87oMKQex1eGR6++H9Hq8c+MgCkB op0Q== X-Gm-Message-State: AOJu0YwtNK+dYTK04ZEFvcLReTWC+KYjXsUyLbk0PJxtAM+VupAnmd79 PLcEZUh3gYipIjhOdIa9bSOAg5SziLwdvw== X-Google-Smtp-Source: AGHT+IFPGJkZ+WZeiyKEhNZYRhVZvueJNwts0SVpx+Kie0BpceRGAIn+b1XarauxX9niu1nEzNXwYg== X-Received: by 2002:a05:6a20:a10b:b0:187:d808:f082 with SMTP id q11-20020a056a20a10b00b00187d808f082mr20092906pzk.48.1701194094296; Tue, 28 Nov 2023 09:54:54 -0800 (PST) Received: from bangji.corp.google.com ([2620:15c:2c0:5:146f:6347:3bb4:8cf4]) by smtp.gmail.com with ESMTPSA id y2-20020aa78042000000b006cbbc07a1c0sm9224721pfm.156.2023.11.28.09.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 09:54:53 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH 5/8] perf ui/browser/annotate: Use global annotation_options Date: Tue, 28 Nov 2023 09:54:38 -0800 Message-ID: <20231128175441.721579-6-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231128175441.721579-1-namhyung@kernel.org> References: <20231128175441.721579-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Now it can use the global options and no need save local browser options separately. Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-report.c | 8 ++-- tools/perf/builtin-top.c | 3 +- tools/perf/ui/browsers/annotate.c | 65 ++++++++++++++----------------- tools/perf/ui/browsers/hists.c | 34 ++++++---------- tools/perf/ui/browsers/hists.h | 2 - tools/perf/util/annotate.h | 6 +-- tools/perf/util/block-info.c | 6 +-- tools/perf/util/block-info.h | 3 +- tools/perf/util/hist.h | 25 ++++-------- 10 files changed, 59 insertions(+), 95 deletions(-) diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index a53a4e711899..87af95634879 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -382,7 +382,7 @@ static void hists__find_annotations(struct hists *hists, /* skip missing symbols */ nd =3D rb_next(nd); } else if (use_browser =3D=3D 1) { - key =3D hist_entry__tui_annotate(he, evsel, NULL, &annotate_opts); + key =3D hist_entry__tui_annotate(he, evsel, NULL); =20 switch (key) { case -1: diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 2b86651615cd..bc0d986c1e0c 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -540,8 +540,7 @@ static int evlist__tui_block_hists_browse(struct evlist= *evlist, struct report * evlist__for_each_entry(evlist, pos) { ret =3D report__browse_block_hists(&rep->block_reports[i++].hist, rep->min_percent, pos, - &rep->session->header.env, - &annotate_opts); + &rep->session->header.env); if (ret !=3D 0) return ret; } @@ -573,8 +572,7 @@ static int evlist__tty_browse_hists(struct evlist *evli= st, struct report *rep, c =20 if (rep->total_cycles_mode) { report__browse_block_hists(&rep->block_reports[i++].hist, - rep->min_percent, pos, - NULL, NULL); + rep->min_percent, pos, NULL); continue; } =20 @@ -669,7 +667,7 @@ static int report__browse_hists(struct report *rep) } =20 ret =3D evlist__tui_browse_hists(evlist, help, NULL, rep->min_percent, - &session->header.env, true, &annotate_opts); + &session->header.env, true); /* * Usually "ret" is the last pressed key, and we only * care if the key notifies us to switch data file. diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 80d126279208..60399e4233ee 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -646,8 +646,7 @@ static void *display_thread_tui(void *arg) } =20 ret =3D evlist__tui_browse_hists(top->evlist, help, &hbt, top->min_percen= t, - &top->session->header.env, !top->record_opts.overwrite, - &annotate_opts); + &top->session->header.env, !top->record_opts.overwrite); if (ret =3D=3D K_RELOAD) { top->zero =3D true; goto repeat; diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/ann= otate.c index ed0e692afdbe..fda17c1f2031 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -27,7 +27,6 @@ struct annotate_browser { struct rb_node *curr_hot; struct annotation_line *selection; struct arch *arch; - struct annotation_options *opts; bool searching_backwards; char search_bf[128]; }; @@ -97,7 +96,7 @@ static void annotate_browser__write(struct ui_browser *br= owser, void *entry, int struct annotation_write_ops ops =3D { .first_line =3D row =3D=3D 0, .current_entry =3D is_current_entry, - .change_color =3D (!notes->options->hide_src_code && + .change_color =3D (!annotate_opts.hide_src_code && (!is_current_entry || (browser->use_navkeypressed && !browser->navkeypressed))), @@ -128,7 +127,7 @@ static int is_fused(struct annotate_browser *ab, struct= disasm_line *cursor) =20 while (pos && pos->al.offset =3D=3D -1) { pos =3D list_prev_entry(pos, al.node); - if (!ab->opts->hide_src_code) + if (!annotate_opts.hide_src_code) diff++; } =20 @@ -195,7 +194,7 @@ static void annotate_browser__draw_current_jump(struct = ui_browser *browser) return; } =20 - if (notes->options->hide_src_code) { + if (annotate_opts.hide_src_code) { from =3D cursor->al.idx_asm; to =3D target->idx_asm; } else { @@ -224,7 +223,7 @@ static unsigned int annotate_browser__refresh(struct ui= _browser *browser) int ret =3D ui_browser__list_head_refresh(browser); int pcnt_width =3D annotation__pcnt_width(notes); =20 - if (notes->options->jump_arrows) + if (annotate_opts.jump_arrows) annotate_browser__draw_current_jump(browser); =20 ui_browser__set_color(browser, HE_COLORSET_NORMAL); @@ -258,7 +257,7 @@ static void disasm_rb_tree__insert(struct annotate_brow= ser *browser, parent =3D *p; l =3D rb_entry(parent, struct annotation_line, rb_node); =20 - if (disasm__cmp(al, l, browser->opts->percent_type) < 0) + if (disasm__cmp(al, l, annotate_opts.percent_type) < 0) p =3D &(*p)->rb_left; else p =3D &(*p)->rb_right; @@ -294,11 +293,10 @@ static void annotate_browser__set_top(struct annotate= _browser *browser, static void annotate_browser__set_rb_top(struct annotate_browser *browser, struct rb_node *nd) { - struct annotation *notes =3D browser__annotation(&browser->b); struct annotation_line * pos =3D rb_entry(nd, struct annotation_line, rb_= node); u32 idx =3D pos->idx; =20 - if (notes->options->hide_src_code) + if (annotate_opts.hide_src_code) idx =3D pos->idx_asm; annotate_browser__set_top(browser, pos, idx); browser->curr_hot =3D nd; @@ -331,7 +329,7 @@ static void annotate_browser__calc_percent(struct annot= ate_browser *browser, double percent; =20 percent =3D annotation_data__percent(&pos->al.data[i], - browser->opts->percent_type); + annotate_opts.percent_type); =20 if (max_percent < percent) max_percent =3D percent; @@ -380,12 +378,12 @@ static bool annotate_browser__toggle_source(struct an= notate_browser *browser) browser->b.seek(&browser->b, offset, SEEK_CUR); al =3D list_entry(browser->b.top, struct annotation_line, node); =20 - if (notes->options->hide_src_code) { + if (annotate_opts.hide_src_code) { if (al->idx_asm < offset) offset =3D al->idx; =20 browser->b.nr_entries =3D notes->src->nr_entries; - notes->options->hide_src_code =3D false; + annotate_opts.hide_src_code =3D false; browser->b.seek(&browser->b, -offset, SEEK_CUR); browser->b.top_idx =3D al->idx - offset; browser->b.index =3D al->idx; @@ -403,7 +401,7 @@ static bool annotate_browser__toggle_source(struct anno= tate_browser *browser) offset =3D al->idx_asm; =20 browser->b.nr_entries =3D notes->src->nr_asm_entries; - notes->options->hide_src_code =3D true; + annotate_opts.hide_src_code =3D true; browser->b.seek(&browser->b, -offset, SEEK_CUR); browser->b.top_idx =3D al->idx_asm - offset; browser->b.index =3D al->idx_asm; @@ -483,8 +481,8 @@ static bool annotate_browser__callq(struct annotate_bro= wser *browser, target_ms.map =3D ms->map; target_ms.sym =3D dl->ops.target.sym; annotation__unlock(notes); - symbol__tui_annotate(&target_ms, evsel, hbt, browser->opts); - sym_title(ms->sym, ms->map, title, sizeof(title), browser->opts->percent_= type); + symbol__tui_annotate(&target_ms, evsel, hbt); + sym_title(ms->sym, ms->map, title, sizeof(title), annotate_opts.percent_t= ype); ui_browser__show_title(&browser->b, title); return true; } @@ -659,7 +657,6 @@ bool annotate_browser__continue_search_reverse(struct a= nnotate_browser *browser, =20 static int annotate_browser__show(struct ui_browser *browser, char *title,= const char *help) { - struct annotate_browser *ab =3D container_of(browser, struct annotate_bro= wser, b); struct map_symbol *ms =3D browser->priv; struct symbol *sym =3D ms->sym; char symbol_dso[SYM_TITLE_MAX_SIZE]; @@ -667,7 +664,7 @@ static int annotate_browser__show(struct ui_browser *br= owser, char *title, const if (ui_browser__show(browser, title, help) < 0) return -1; =20 - sym_title(sym, ms->map, symbol_dso, sizeof(symbol_dso), ab->opts->percent= _type); + sym_title(sym, ms->map, symbol_dso, sizeof(symbol_dso), annotate_opts.per= cent_type); =20 ui_browser__gotorc_title(browser, 0, 0); ui_browser__set_color(browser, HE_COLORSET_ROOT); @@ -809,7 +806,7 @@ static int annotate_browser__run(struct annotate_browse= r *browser, annotate_browser__show(&browser->b, title, help); continue; case 'k': - notes->options->show_linenr =3D !notes->options->show_linenr; + annotate_opts.show_linenr =3D !annotate_opts.show_linenr; continue; case 'l': annotate_browser__show_full_location (&browser->b); @@ -822,18 +819,18 @@ static int annotate_browser__run(struct annotate_brow= ser *browser, ui_helpline__puts(help); continue; case 'o': - notes->options->use_offset =3D !notes->options->use_offset; + annotate_opts.use_offset =3D !annotate_opts.use_offset; annotation__update_column_widths(notes); continue; case 'O': - if (++notes->options->offset_level > ANNOTATION__MAX_OFFSET_LEVEL) - notes->options->offset_level =3D ANNOTATION__MIN_OFFSET_LEVEL; + if (++annotate_opts.offset_level > ANNOTATION__MAX_OFFSET_LEVEL) + annotate_opts.offset_level =3D ANNOTATION__MIN_OFFSET_LEVEL; continue; case 'j': - notes->options->jump_arrows =3D !notes->options->jump_arrows; + annotate_opts.jump_arrows =3D !annotate_opts.jump_arrows; continue; case 'J': - notes->options->show_nr_jumps =3D !notes->options->show_nr_jumps; + annotate_opts.show_nr_jumps =3D !annotate_opts.show_nr_jumps; annotation__update_column_widths(notes); continue; case '/': @@ -897,15 +894,15 @@ static int annotate_browser__run(struct annotate_brow= ser *browser, annotation__update_column_widths(notes); continue; case 'c': - if (notes->options->show_minmax_cycle) - notes->options->show_minmax_cycle =3D false; + if (annotate_opts.show_minmax_cycle) + annotate_opts.show_minmax_cycle =3D false; else - notes->options->show_minmax_cycle =3D true; + annotate_opts.show_minmax_cycle =3D true; annotation__update_column_widths(notes); continue; case 'p': case 'b': - switch_percent_type(browser->opts, key =3D=3D 'b'); + switch_percent_type(&annotate_opts, key =3D=3D 'b'); hists__scnprintf_title(hists, title, sizeof(title)); annotate_browser__show(&browser->b, title, help); continue; @@ -932,26 +929,23 @@ static int annotate_browser__run(struct annotate_brow= ser *browser, } =20 int map_symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, - struct hist_browser_timer *hbt, - struct annotation_options *opts) + struct hist_browser_timer *hbt) { - return symbol__tui_annotate(ms, evsel, hbt, opts); + return symbol__tui_annotate(ms, evsel, hbt); } =20 int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel, - struct hist_browser_timer *hbt, - struct annotation_options *opts) + struct hist_browser_timer *hbt) { /* reset abort key so that it can get Ctrl-C as a key */ SLang_reset_tty(); SLang_init_tty(0, 0, 0); =20 - return map_symbol__tui_annotate(&he->ms, evsel, hbt, opts); + return map_symbol__tui_annotate(&he->ms, evsel, hbt); } =20 int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, - struct hist_browser_timer *hbt, - struct annotation_options *opts) + struct hist_browser_timer *hbt) { struct symbol *sym =3D ms->sym; struct annotation *notes =3D symbol__annotation(sym); @@ -965,7 +959,6 @@ int symbol__tui_annotate(struct map_symbol *ms, struct = evsel *evsel, .priv =3D ms, .use_navkeypressed =3D true, }, - .opts =3D opts, }; struct dso *dso; int ret =3D -1, err; @@ -996,7 +989,7 @@ int symbol__tui_annotate(struct map_symbol *ms, struct = evsel *evsel, browser.b.entries =3D ¬es->src->source, browser.b.width +=3D 18; /* Percentage */ =20 - if (notes->options->hide_src_code) + if (annotate_opts.hide_src_code) ui_browser__init_asm_mode(&browser.b); =20 ret =3D annotate_browser__run(&browser, evsel, hbt); diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index f4812b226818..3061dea29e6b 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -2250,8 +2250,7 @@ struct hist_browser *hist_browser__new(struct hists *= hists) static struct hist_browser * perf_evsel_browser__new(struct evsel *evsel, struct hist_browser_timer *hbt, - struct perf_env *env, - struct annotation_options *annotation_opts) + struct perf_env *env) { struct hist_browser *browser =3D hist_browser__new(evsel__hists(evsel)); =20 @@ -2259,7 +2258,6 @@ perf_evsel_browser__new(struct evsel *evsel, browser->hbt =3D hbt; browser->env =3D env; browser->title =3D hists_browser__scnprintf_title; - browser->annotation_opts =3D annotation_opts; } return browser; } @@ -2432,8 +2430,8 @@ do_annotate(struct hist_browser *browser, struct popu= p_action *act) struct hist_entry *he; int err; =20 - if (!browser->annotation_opts->objdump_path && - perf_env__lookup_objdump(browser->env, &browser->annotation_opts->obj= dump_path)) + if (!annotate_opts.objdump_path && + perf_env__lookup_objdump(browser->env, &annotate_opts.objdump_path)) return 0; =20 notes =3D symbol__annotation(act->ms.sym); @@ -2445,8 +2443,7 @@ do_annotate(struct hist_browser *browser, struct popu= p_action *act) else evsel =3D hists_to_evsel(browser->hists); =20 - err =3D map_symbol__tui_annotate(&act->ms, evsel, browser->hbt, - browser->annotation_opts); + err =3D map_symbol__tui_annotate(&act->ms, evsel, browser->hbt); he =3D hist_browser__selected_entry(browser); /* * offer option to annotate the other branch source or target @@ -2943,11 +2940,10 @@ static void hist_browser__update_percent_limit(stru= ct hist_browser *hb, =20 static int evsel__hists_browse(struct evsel *evsel, int nr_events, const c= har *helpline, bool left_exits, struct hist_browser_timer *hbt, float min_pcnt, - struct perf_env *env, bool warn_lost_event, - struct annotation_options *annotation_opts) + struct perf_env *env, bool warn_lost_event) { struct hists *hists =3D evsel__hists(evsel); - struct hist_browser *browser =3D perf_evsel_browser__new(evsel, hbt, env,= annotation_opts); + struct hist_browser *browser =3D perf_evsel_browser__new(evsel, hbt, env); struct branch_info *bi =3D NULL; #define MAX_OPTIONS 16 char *options[MAX_OPTIONS]; @@ -3398,7 +3394,6 @@ static int evsel__hists_browse(struct evsel *evsel, i= nt nr_events, const char *h struct evsel_menu { struct ui_browser b; struct evsel *selection; - struct annotation_options *annotation_opts; bool lost_events, lost_events_warned; float min_pcnt; struct perf_env *env; @@ -3499,8 +3494,7 @@ static int perf_evsel_menu__run(struct evsel_menu *me= nu, hbt->timer(hbt->arg); key =3D evsel__hists_browse(pos, nr_events, help, true, hbt, menu->min_pcnt, menu->env, - warn_lost_event, - menu->annotation_opts); + warn_lost_event); ui_browser__show_title(&menu->b, title); switch (key) { case K_TAB: @@ -3557,7 +3551,7 @@ static bool filter_group_entries(struct ui_browser *b= rowser __maybe_unused, =20 static int __evlist__tui_browse_hists(struct evlist *evlist, int nr_entrie= s, const char *help, struct hist_browser_timer *hbt, float min_pcnt, struct perf_env = *env, - bool warn_lost_event, struct annotation_options *annotation_opts) + bool warn_lost_event) { struct evsel *pos; struct evsel_menu menu =3D { @@ -3572,7 +3566,6 @@ static int __evlist__tui_browse_hists(struct evlist *= evlist, int nr_entries, con }, .min_pcnt =3D min_pcnt, .env =3D env, - .annotation_opts =3D annotation_opts, }; =20 ui_helpline__push("Press ESC to exit"); @@ -3607,8 +3600,7 @@ static bool evlist__single_entry(struct evlist *evlis= t) } =20 int evlist__tui_browse_hists(struct evlist *evlist, const char *help, stru= ct hist_browser_timer *hbt, - float min_pcnt, struct perf_env *env, bool warn_lost_event, - struct annotation_options *annotation_opts) + float min_pcnt, struct perf_env *env, bool warn_lost_event) { int nr_entries =3D evlist->core.nr_entries; =20 @@ -3617,7 +3609,7 @@ single_entry: { struct evsel *first =3D evlist__first(evlist); =20 return evsel__hists_browse(first, nr_entries, help, false, hbt, min_pcnt, - env, warn_lost_event, annotation_opts); + env, warn_lost_event); } } =20 @@ -3635,7 +3627,7 @@ single_entry: { } =20 return __evlist__tui_browse_hists(evlist, nr_entries, help, hbt, min_pcnt= , env, - warn_lost_event, annotation_opts); + warn_lost_event); } =20 static int block_hists_browser__title(struct hist_browser *browser, char *= bf, @@ -3654,8 +3646,7 @@ static int block_hists_browser__title(struct hist_bro= wser *browser, char *bf, } =20 int block_hists_tui_browse(struct block_hist *bh, struct evsel *evsel, - float min_percent, struct perf_env *env, - struct annotation_options *annotation_opts) + float min_percent, struct perf_env *env) { struct hists *hists =3D &bh->block_hists; struct hist_browser *browser; @@ -3672,7 +3663,6 @@ int block_hists_tui_browse(struct block_hist *bh, str= uct evsel *evsel, browser->title =3D block_hists_browser__title; browser->min_pcnt =3D min_percent; browser->env =3D env; - browser->annotation_opts =3D annotation_opts; =20 /* reset abort key so that it can get Ctrl-C as a key */ SLang_reset_tty(); diff --git a/tools/perf/ui/browsers/hists.h b/tools/perf/ui/browsers/hists.h index 1e938d9ffa5e..de46f6c56b0e 100644 --- a/tools/perf/ui/browsers/hists.h +++ b/tools/perf/ui/browsers/hists.h @@ -4,7 +4,6 @@ =20 #include "ui/browser.h" =20 -struct annotation_options; struct evsel; =20 struct hist_browser { @@ -15,7 +14,6 @@ struct hist_browser { struct hist_browser_timer *hbt; struct pstack *pstack; struct perf_env *env; - struct annotation_options *annotation_opts; struct evsel *block_evsel; int print_seq; bool show_dso; diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 7bf29baa43f5..857c5fa0e6b1 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -418,13 +418,11 @@ int symbol__tty_annotate2(struct map_symbol *ms, stru= ct evsel *evsel); =20 #ifdef HAVE_SLANG_SUPPORT int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, - struct hist_browser_timer *hbt, - struct annotation_options *opts); + struct hist_browser_timer *hbt); #else static inline int symbol__tui_annotate(struct map_symbol *ms __maybe_unuse= d, struct evsel *evsel __maybe_unused, - struct hist_browser_timer *hbt __maybe_unused, - struct annotation_options *opts __maybe_unused) + struct hist_browser_timer *hbt __maybe_unused) { return 0; } diff --git a/tools/perf/util/block-info.c b/tools/perf/util/block-info.c index 08f82c1f166c..dec910989701 100644 --- a/tools/perf/util/block-info.c +++ b/tools/perf/util/block-info.c @@ -464,8 +464,7 @@ void block_info__free_report(struct block_report *reps,= int nr_reps) } =20 int report__browse_block_hists(struct block_hist *bh, float min_percent, - struct evsel *evsel, struct perf_env *env, - struct annotation_options *annotation_opts) + struct evsel *evsel, struct perf_env *env) { int ret; =20 @@ -477,8 +476,7 @@ int report__browse_block_hists(struct block_hist *bh, f= loat min_percent, return 0; case 1: symbol_conf.report_individual_block =3D true; - ret =3D block_hists_tui_browse(bh, evsel, min_percent, - env, annotation_opts); + ret =3D block_hists_tui_browse(bh, evsel, min_percent, env); return ret; default: return -1; diff --git a/tools/perf/util/block-info.h b/tools/perf/util/block-info.h index 42e9dcc4cf0a..96f53e89795e 100644 --- a/tools/perf/util/block-info.h +++ b/tools/perf/util/block-info.h @@ -78,8 +78,7 @@ struct block_report *block_info__create_report(struct evl= ist *evlist, void block_info__free_report(struct block_report *reps, int nr_reps); =20 int report__browse_block_hists(struct block_hist *bh, float min_percent, - struct evsel *evsel, struct perf_env *env, - struct annotation_options *annotation_opts); + struct evsel *evsel, struct perf_env *env); =20 float block_info__total_cycles_percent(struct hist_entry *he); =20 diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index afc9f1c7f4dc..5d0db96609df 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -457,7 +457,6 @@ struct hist_browser_timer { int refresh; }; =20 -struct annotation_options; struct res_sample; =20 enum rstype { @@ -473,16 +472,13 @@ struct block_hist; void attr_to_script(char *buf, struct perf_event_attr *attr); =20 int map_symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, - struct hist_browser_timer *hbt, - struct annotation_options *annotation_opts); + struct hist_browser_timer *hbt); =20 int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel, - struct hist_browser_timer *hbt, - struct annotation_options *annotation_opts); + struct hist_browser_timer *hbt); =20 int evlist__tui_browse_hists(struct evlist *evlist, const char *help, stru= ct hist_browser_timer *hbt, - float min_pcnt, struct perf_env *env, bool warn_lost_event, - struct annotation_options *annotation_options); + float min_pcnt, struct perf_env *env, bool warn_lost_event); =20 int script_browse(const char *script_opt, struct evsel *evsel); =20 @@ -492,8 +488,7 @@ int res_sample_browse(struct res_sample *res_samples, i= nt num_res, void res_sample_init(void); =20 int block_hists_tui_browse(struct block_hist *bh, struct evsel *evsel, - float min_percent, struct perf_env *env, - struct annotation_options *annotation_opts); + float min_percent, struct perf_env *env); #else static inline int evlist__tui_browse_hists(struct evlist *evlist __maybe_unused, @@ -501,23 +496,20 @@ int evlist__tui_browse_hists(struct evlist *evlist __= maybe_unused, struct hist_browser_timer *hbt __maybe_unused, float min_pcnt __maybe_unused, struct perf_env *env __maybe_unused, - bool warn_lost_event __maybe_unused, - struct annotation_options *annotation_options __maybe_unused) + bool warn_lost_event __maybe_unused) { return 0; } static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_u= nused, struct evsel *evsel __maybe_unused, - struct hist_browser_timer *hbt __maybe_unused, - struct annotation_options *annotation_options __maybe_unused) + struct hist_browser_timer *hbt __maybe_unused) { return 0; } =20 static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_u= nused, struct evsel *evsel __maybe_unused, - struct hist_browser_timer *hbt __maybe_unused, - struct annotation_options *annotation_opts __maybe_unused) + struct hist_browser_timer *hbt __maybe_unused) { return 0; } @@ -541,8 +533,7 @@ static inline void res_sample_init(void) {} static inline int block_hists_tui_browse(struct block_hist *bh __maybe_unu= sed, struct evsel *evsel __maybe_unused, float min_percent __maybe_unused, - struct perf_env *env __maybe_unused, - struct annotation_options *annotation_opts __maybe_unused) + struct perf_env *env __maybe_unused) { return 0; } --=20 2.43.0.rc1.413.gea7ed67945-goog