mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf pmu: fix alias->snapshot missing initialization bug
@ 2016-01-06 18:50 Stephane Eranian
  2016-01-06 20:53 ` Arnaldo Carvalho de Melo
  2016-01-09 16:32 ` [tip:perf/core] perf pmu: fix alias-> snapshot " tip-bot for Stephane Eranian
  0 siblings, 2 replies; 3+ messages in thread
From: Stephane Eranian @ 2016-01-06 18:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: acme, peterz, mingo, ak, kan.liang, jolsa

This patch fixes a bug in __perf_pmu__new_alias() whereby
the alias->snapshot field was not initialized to false. This
led to random alias->snapshot value for an alias and
was breaking some measurements such as:

$ perf stat -a -e uncore_imc/data_reads/ -I 1000 sleep 100

Because the event ended up being treated as snapshot mode, when
it is not.

Signed-off-by: Stephane Eranian <eranian@google.com>
---
 tools/perf/util/pmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index e4b173d..b597bcc 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -220,6 +220,7 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
 	alias->scale = 1.0;
 	alias->unit[0] = '\0';
 	alias->per_pkg = false;
+	alias->snapshot = false;
 
 	ret = parse_events_terms(&alias->terms, val);
 	if (ret) {
-- 
2.5.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-09 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-06 18:50 [PATCH] perf pmu: fix alias->snapshot missing initialization bug Stephane Eranian
2016-01-06 20:53 ` Arnaldo Carvalho de Melo
2016-01-09 16:32 ` [tip:perf/core] perf pmu: fix alias-> snapshot " tip-bot for Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome