Messages in this thread | | | Date | Wed, 22 Feb 2012 08:39:49 -0700 | From | David Ahern <> | Subject | Re: [PATCH] perf tools: Fix ordering with unstable tsc |
| |
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
| |