From: tip-bot for Stephane Eranian <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, acme@redhat.com, tglx@linutronix.de,
mingo@kernel.org, linux-kernel@vger.kernel.org,
eranian@google.com, jolsa@kernel.org, ak@linux.intel.com,
kan.liang@intel.com, peterz@infradead.org
Subject: [tip:perf/core] perf pmu: fix alias-> snapshot missing initialization bug
Date: Sat, 9 Jan 2016 08:32:39 -0800 [thread overview]
Message-ID: <tip-84530920de3c6ccb92c6661da784f6cdb66d3304@git.kernel.org> (raw)
In-Reply-To: <1452106201-13073-1-git-send-email-eranian@google.com>
Commit-ID: 84530920de3c6ccb92c6661da784f6cdb66d3304
Gitweb: http://git.kernel.org/tip/84530920de3c6ccb92c6661da784f6cdb66d3304
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Wed, 6 Jan 2016 19:50:01 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 6 Jan 2016 20:11:16 -0300
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@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1452106201-13073-1-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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) {
prev parent reply other threads:[~2016-01-09 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 18:50 [PATCH] perf pmu: fix alias->snapshot " Stephane Eranian
2016-01-06 20:53 ` Arnaldo Carvalho de Melo
2016-01-09 16:32 ` tip-bot for Stephane Eranian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-84530920de3c6ccb92c6661da784f6cdb66d3304@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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