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>
This commit is contained in:
parent
b879833cba
commit
4c50563d81
1 changed files with 6 additions and 5 deletions
|
@ -2143,7 +2143,7 @@ static void save_task_callchain(struct perf_sched *sched,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!symbol_conf.use_callchain || sample->callchain == NULL)
|
||||
if (!sched->show_callchain || sample->callchain == NULL)
|
||||
return;
|
||||
|
||||
if (thread__resolve_callchain(thread, cursor, evsel, sample,
|
||||
|
@ -2271,10 +2271,11 @@ static struct thread *get_idle_thread(int cpu)
|
|||
return idle_threads[cpu];
|
||||
}
|
||||
|
||||
static void save_idle_callchain(struct idle_thread_runtime *itr,
|
||||
static void save_idle_callchain(struct perf_sched *sched,
|
||||
struct idle_thread_runtime *itr,
|
||||
struct perf_sample *sample)
|
||||
{
|
||||
if (!symbol_conf.use_callchain || sample->callchain == NULL)
|
||||
if (!sched->show_callchain || sample->callchain == NULL)
|
||||
return;
|
||||
|
||||
callchain_cursor__copy(&itr->cursor, &callchain_cursor);
|
||||
|
@ -2320,7 +2321,7 @@ static struct thread *timehist_get_thread(struct perf_sched *sched,
|
|||
|
||||
/* copy task callchain when entering to idle */
|
||||
if (perf_evsel__intval(evsel, sample, "next_pid") == 0)
|
||||
save_idle_callchain(itr, sample);
|
||||
save_idle_callchain(sched, itr, sample);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2849,7 +2850,7 @@ static void timehist_print_summary(struct perf_sched *sched,
|
|||
printf(" CPU %2d idle entire time window\n", i);
|
||||
}
|
||||
|
||||
if (sched->idle_hist && symbol_conf.use_callchain) {
|
||||
if (sched->idle_hist && sched->show_callchain) {
|
||||
callchain_param.mode = CHAIN_FOLDED;
|
||||
callchain_param.value = CCVAL_PERIOD;
|
||||
|
||||
|
|
Loading…
Reference in a new issue