From 02d778c2356671c200b8d56cfab61ba3804c160e Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 21 May 2012 10:42:07 +0900 Subject: [PATCH] --- yaml --- r: 305509 b: refs/heads/master c: e40ee742d4542b4c046ac5426654b1494d87ad73 h: refs/heads/master i: 305507: 7d07346ddeed2b8e166714e916a386e6c70468f1 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-top.c | 3 +++ trunk/tools/perf/util/evsel.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 64f2d89dccb7..87d35921833d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e33387fc2748ac78fd577dee2c914fc3ea0ba0cd +refs/heads/master: e40ee742d4542b4c046ac5426654b1494d87ad73 diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index 3e981a710c4d..18bd226f9f2b 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/tools/perf/builtin-top.c @@ -900,6 +900,9 @@ static void perf_top__start_counters(struct perf_top *top) attr->read_format |= PERF_FORMAT_ID; } + if (perf_target__has_cpu(&top->target)) + attr->sample_type |= PERF_SAMPLE_CPU; + if (symbol_conf.use_callchain) attr->sample_type |= PERF_SAMPLE_CALLCHAIN; diff --git a/trunk/tools/perf/util/evsel.c b/trunk/tools/perf/util/evsel.c index f4f427ce4d64..9abd8ac508e2 100644 --- a/trunk/tools/perf/util/evsel.c +++ b/trunk/tools/perf/util/evsel.c @@ -108,7 +108,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts, if (opts->call_graph) attr->sample_type |= PERF_SAMPLE_CALLCHAIN; - if (opts->target.system_wide) + if (perf_target__has_cpu(&opts->target)) attr->sample_type |= PERF_SAMPLE_CPU; if (opts->period)