diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-05-03 07:54:47 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-05 20:04:01 -0400 |
commit | fa82911a1bdf4f9870ffca097d7fe21128b5639c (patch) | |
tree | 0f58b9654df678f6915c99d0d7b51ecf0289a1db /tools/perf/ui | |
parent | 35a634f76c02b98d31397a589544022b478c0e12 (diff) |
perf hists: Move sort__has_thread into struct perf_hpp_list
Now we have sort dimensions private for struct hists, we need to make
dimension booleans hists specific as well.
Moving sort__has_thread into struct perf_hpp_list.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1462276488-26683-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index b25bf82c121f..dda5b4322945 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -2135,7 +2135,7 @@ static int hists__browser_title(struct hists *hists, | |||
2135 | printed += snprintf(bf + printed, size - printed, | 2135 | printed += snprintf(bf + printed, size - printed, |
2136 | ", UID: %s", hists->uid_filter_str); | 2136 | ", UID: %s", hists->uid_filter_str); |
2137 | if (thread) { | 2137 | if (thread) { |
2138 | if (sort__has_thread) { | 2138 | if (hists__has(hists, thread)) { |
2139 | printed += scnprintf(bf + printed, size - printed, | 2139 | printed += scnprintf(bf + printed, size - printed, |
2140 | ", Thread: %s(%d)", | 2140 | ", Thread: %s(%d)", |
2141 | (thread->comm_set ? thread__comm_str(thread) : ""), | 2141 | (thread->comm_set ? thread__comm_str(thread) : ""), |
@@ -2320,7 +2320,7 @@ do_zoom_thread(struct hist_browser *browser, struct popup_action *act) | |||
2320 | { | 2320 | { |
2321 | struct thread *thread = act->thread; | 2321 | struct thread *thread = act->thread; |
2322 | 2322 | ||
2323 | if ((!sort__has_thread && !sort__has_comm) || thread == NULL) | 2323 | if ((!hists__has(browser->hists, thread) && !sort__has_comm) || thread == NULL) |
2324 | return 0; | 2324 | return 0; |
2325 | 2325 | ||
2326 | if (browser->hists->thread_filter) { | 2326 | if (browser->hists->thread_filter) { |
@@ -2329,7 +2329,7 @@ do_zoom_thread(struct hist_browser *browser, struct popup_action *act) | |||
2329 | thread__zput(browser->hists->thread_filter); | 2329 | thread__zput(browser->hists->thread_filter); |
2330 | ui_helpline__pop(); | 2330 | ui_helpline__pop(); |
2331 | } else { | 2331 | } else { |
2332 | if (sort__has_thread) { | 2332 | if (hists__has(browser->hists, thread)) { |
2333 | ui_helpline__fpush("To zoom out press ESC or ENTER + \"Zoom out of %s(%d) thread\"", | 2333 | ui_helpline__fpush("To zoom out press ESC or ENTER + \"Zoom out of %s(%d) thread\"", |
2334 | thread->comm_set ? thread__comm_str(thread) : "", | 2334 | thread->comm_set ? thread__comm_str(thread) : "", |
2335 | thread->tid); | 2335 | thread->tid); |
@@ -2354,10 +2354,10 @@ add_thread_opt(struct hist_browser *browser, struct popup_action *act, | |||
2354 | { | 2354 | { |
2355 | int ret; | 2355 | int ret; |
2356 | 2356 | ||
2357 | if ((!sort__has_thread && !sort__has_comm) || thread == NULL) | 2357 | if ((!hists__has(browser->hists, thread) && !sort__has_comm) || thread == NULL) |
2358 | return 0; | 2358 | return 0; |
2359 | 2359 | ||
2360 | if (sort__has_thread) { | 2360 | if (hists__has(browser->hists, thread)) { |
2361 | ret = asprintf(optstr, "Zoom %s %s(%d) thread", | 2361 | ret = asprintf(optstr, "Zoom %s %s(%d) thread", |
2362 | browser->hists->thread_filter ? "out of" : "into", | 2362 | browser->hists->thread_filter ? "out of" : "into", |
2363 | thread->comm_set ? thread__comm_str(thread) : "", | 2363 | thread->comm_set ? thread__comm_str(thread) : "", |
@@ -2954,7 +2954,7 @@ skip_annotation: | |||
2954 | goto skip_scripting; | 2954 | goto skip_scripting; |
2955 | 2955 | ||
2956 | if (browser->he_selection) { | 2956 | if (browser->he_selection) { |
2957 | if (sort__has_thread && thread) { | 2957 | if (hists__has(hists, thread) && thread) { |
2958 | nr_options += add_script_opt(browser, | 2958 | nr_options += add_script_opt(browser, |
2959 | &actions[nr_options], | 2959 | &actions[nr_options], |
2960 | &options[nr_options], | 2960 | &options[nr_options], |