[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452106201-13073-1-git-send-email-eranian@google.com>
Date: Wed, 6 Jan 2016 19:50:01 +0100
From: Stephane Eranian <eranian@...gle.com>
To: linux-kernel@...r.kernel.org
Cc: acme@...hat.com, peterz@...radead.org, mingo@...e.hu,
ak@...ux.intel.com, kan.liang@...el.com, jolsa@...nel.org
Subject: [PATCH] perf pmu: fix alias->snapshot missing initialization bug
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@...gle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists