On Wed, Apr 12, 2017 at 11:23:01AM -0700, David Carrillo-Cisneros wrote: > From: Stephane Eranian <[email protected]> > > (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 <[email protected]> > Reviewed-by: David Carrillo-Cisneros <[email protected]>
Acked-by: Jiri Olsa <[email protected]> thanks, jirka

