From: Jiri Olsa <jolsa@redhat.com>
To: David Carrillo-Cisneros <davidcc@google.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Wang Nan <wangnan0@huawei.com>, Andi Kleen <ak@linux.intel.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Stephane Eranian <eranian@google.com>,
Paul Turner <pjt@google.com>
Subject: Re: [PATCH] perf/stat: fix bug in handling events in error state
Date: Thu, 13 Apr 2017 10:28:15 +0200 [thread overview]
Message-ID: <20170413082815.GC4784@krava> (raw)
In-Reply-To: <20170412182301.44406-1-davidcc@google.com>
On Wed, Apr 12, 2017 at 11:23:01AM -0700, David Carrillo-Cisneros wrote:
> From: Stephane Eranian <eranian@google.com>
>
> (This is a patch has been sitting in the Intel CQM/CMT driver series
> for a while, despite not depend on it. Sending it now independently
> since the series is being discarded.)
>
> When an event is in error state, read() returns 0
> instead of sizeof() buffer. In certain modes, such
> as interval printing, ignoring the 0 return value
> may cause bogus count deltas to be computed and
> thus invalid results printed.
>
> This patch fixes this problem by modifying read_counters()
> to mark the event as not scaled (scaled = -1) to force
> the printout routine to show <NOT COUNTED>.
>
> Signed-off-by: Stephane Eranian <eranian@google.com>
> Reviewed-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
next prev parent reply other threads:[~2017-04-13 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 18:23 [PATCH] perf/stat: fix bug in handling events in error state David Carrillo-Cisneros
2017-04-13 8:28 ` Jiri Olsa [this message]
2017-04-17 8:34 ` [tip:perf/core] perf stat: Fix " tip-bot for Stephane Eranian
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=20170413082815.GC4784@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=davidcc@google.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=wangnan0@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.