|
@@ -161,6 +161,13 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
|
|
|
|
|
|
attr->inherit = !no_inherit;
|
|
attr->inherit = !no_inherit;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Some events get initialized with sample_(period/type) set,
|
|
|
|
+ * like tracepoints. Clear it up for counting.
|
|
|
|
+ */
|
|
|
|
+ attr->sample_period = 0;
|
|
|
|
+ attr->sample_type = 0;
|
|
|
|
+
|
|
if (target__has_cpu(&target))
|
|
if (target__has_cpu(&target))
|
|
return perf_evsel__open_per_cpu(evsel, perf_evsel__cpus(evsel));
|
|
return perf_evsel__open_per_cpu(evsel, perf_evsel__cpus(evsel));
|
|
|
|
|