Re: [PATCH] perf tools: Fix ordering with unstable tsc

From: David Ahern
Date: Wed Feb 22 2012 - 10:39:54 EST


On 2/22/12 8:35 AM, Stephane Eranian wrote:
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 302d49a..1c8eb4b 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -119,9 +119,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts)
if (opts->raw_samples) {
attr->sample_type |= PERF_SAMPLE_TIME;
attr->sample_type |= PERF_SAMPLE_RAW;
- attr->sample_type |= PERF_SAMPLE_CPU;
}

I don't get this bit here. You may want CPU information when capturing
in raw + per-thread mode.

TIME is added to sample_type for raw samples and then CPU gets added below.



+ /* Need to know the CPU for tools that need to order events */
+ if (attr->sample_type& PERF_SAMPLE_TIME)
+ attr->sample_type |= PERF_SAMPLE_CPU;
+


David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/