diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-04-02 13:00:04 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-04-03 09:22:42 -0400 |
commit | f016d24acd95660ca264e0424c8037391d165553 (patch) | |
tree | 483310f2eb26c702221114181dfaebc3f772e812 | |
parent | 709846725673a944ee38da1c275a6dfbf0576d0f (diff) |
perf hists browser: Rename perf_evsel_browser_title to a more descriptive name
Rename it to hists_browser__scnprintf_title() to better reflect that it
provides a scnprintf-like function operating on a hists_browser
instance.
This paves the way to have a non-hists_browser specific function to
scnprintf format a title with per evsel information to use in other
tools or UIs.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Martin Liška <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935
Link: https://lkml.kernel.org/n/tip-sntpyzxsnme9jvuz2qntwoh2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 8b4e82548f8e..2ac66011354f 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -32,8 +32,7 @@ | |||
32 | 32 | ||
33 | extern void hist_browser__init_hpp(void); | 33 | extern void hist_browser__init_hpp(void); |
34 | 34 | ||
35 | static int perf_evsel_browser_title(struct hist_browser *browser, | 35 | static int hists_browser__scnprintf_title(struct hist_browser *browser, char *bf, size_t size); |
36 | char *bf, size_t size); | ||
37 | static void hist_browser__update_nr_entries(struct hist_browser *hb); | 36 | static void hist_browser__update_nr_entries(struct hist_browser *hb); |
38 | 37 | ||
39 | static struct rb_node *hists__filter_entries(struct rb_node *nd, | 38 | static struct rb_node *hists__filter_entries(struct rb_node *nd, |
@@ -2183,7 +2182,7 @@ perf_evsel_browser__new(struct perf_evsel *evsel, | |||
2183 | if (browser) { | 2182 | if (browser) { |
2184 | browser->hbt = hbt; | 2183 | browser->hbt = hbt; |
2185 | browser->env = env; | 2184 | browser->env = env; |
2186 | browser->title = perf_evsel_browser_title; | 2185 | browser->title = hists_browser__scnprintf_title; |
2187 | } | 2186 | } |
2188 | return browser; | 2187 | return browser; |
2189 | } | 2188 | } |
@@ -2209,8 +2208,7 @@ static inline bool is_report_browser(void *timer) | |||
2209 | return timer == NULL; | 2208 | return timer == NULL; |
2210 | } | 2209 | } |
2211 | 2210 | ||
2212 | static int perf_evsel_browser_title(struct hist_browser *browser, | 2211 | static int hists_browser__scnprintf_title(struct hist_browser *browser, char *bf, size_t size) |
2213 | char *bf, size_t size) | ||
2214 | { | 2212 | { |
2215 | struct hist_browser_timer *hbt = browser->hbt; | 2213 | struct hist_browser_timer *hbt = browser->hbt; |
2216 | struct hists *hists = browser->hists; | 2214 | struct hists *hists = browser->hists; |