diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-28 15:07:56 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-06-05 09:09:54 -0400 |
commit | 4c50563d818622bb0f99b378b4e6683f189b39fb (patch) | |
tree | e64ffdbc2bd7744ebccf6915f2bc6f4c32f0c1cc /tools/perf | |
parent | b879833cbaac85b1437f574791b8855d26b0dc80 (diff) |
perf sched: Use sched->show_callchain where appropriate
Instead of using symbol_conf.use_callchain, reducing its usage a bit
more.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-edgwb1b2mpbrdeg0w64wp7ms@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-sched.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 97f9e755e8e6..cbf39dab19c1 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -2143,7 +2143,7 @@ static void save_task_callchain(struct perf_sched *sched, | |||
2143 | return; | 2143 | return; |
2144 | } | 2144 | } |
2145 | 2145 | ||
2146 | if (!symbol_conf.use_callchain || sample->callchain == NULL) | 2146 | if (!sched->show_callchain || sample->callchain == NULL) |
2147 | return; | 2147 | return; |
2148 | 2148 | ||
2149 | if (thread__resolve_callchain(thread, cursor, evsel, sample, | 2149 | if (thread__resolve_callchain(thread, cursor, evsel, sample, |
@@ -2271,10 +2271,11 @@ static struct thread *get_idle_thread(int cpu) | |||
2271 | return idle_threads[cpu]; | 2271 | return idle_threads[cpu]; |
2272 | } | 2272 | } |
2273 | 2273 | ||
2274 | static void save_idle_callchain(struct idle_thread_runtime *itr, | 2274 | static void save_idle_callchain(struct perf_sched *sched, |
2275 | struct idle_thread_runtime *itr, | ||
2275 | struct perf_sample *sample) | 2276 | struct perf_sample *sample) |
2276 | { | 2277 | { |
2277 | if (!symbol_conf.use_callchain || sample->callchain == NULL) | 2278 | if (!sched->show_callchain || sample->callchain == NULL) |
2278 | return; | 2279 | return; |
2279 | 2280 | ||
2280 | callchain_cursor__copy(&itr->cursor, &callchain_cursor); | 2281 | callchain_cursor__copy(&itr->cursor, &callchain_cursor); |
@@ -2320,7 +2321,7 @@ static struct thread *timehist_get_thread(struct perf_sched *sched, | |||
2320 | 2321 | ||
2321 | /* copy task callchain when entering to idle */ | 2322 | /* copy task callchain when entering to idle */ |
2322 | if (perf_evsel__intval(evsel, sample, "next_pid") == 0) | 2323 | if (perf_evsel__intval(evsel, sample, "next_pid") == 0) |
2323 | save_idle_callchain(itr, sample); | 2324 | save_idle_callchain(sched, itr, sample); |
2324 | } | 2325 | } |
2325 | } | 2326 | } |
2326 | 2327 | ||
@@ -2849,7 +2850,7 @@ static void timehist_print_summary(struct perf_sched *sched, | |||
2849 | printf(" CPU %2d idle entire time window\n", i); | 2850 | printf(" CPU %2d idle entire time window\n", i); |
2850 | } | 2851 | } |
2851 | 2852 | ||
2852 | if (sched->idle_hist && symbol_conf.use_callchain) { | 2853 | if (sched->idle_hist && sched->show_callchain) { |
2853 | callchain_param.mode = CHAIN_FOLDED; | 2854 | callchain_param.mode = CHAIN_FOLDED; |
2854 | callchain_param.value = CCVAL_PERIOD; | 2855 | callchain_param.value = CCVAL_PERIOD; |
2855 | 2856 | ||