intel/perf: set read buffer len to 0 to identify empty buffer
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 3 Dec 2019 14:12:03 +0000 (16:12 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 4 Dec 2019 09:21:15 +0000 (09:21 +0000)
commit9d0a5c817ce21adabeda5153035b30609e2862b2
tree5898a2c9072c97577a3b1c0fd4b115df41280237
parentacea59dbf8056b46444c820115d86c42d0411686
intel/perf: set read buffer len to 0 to identify empty buffer

We always add an empty buffer in the list when creating the query.
Let's set the len appropriately so that we can recognize it when we
read OA reports up to the end of a query.

We were using an 0 timestamp value associated with the empty buffer
and incorrectly assuming this was a valid value. In turn that led to
not reading enough reports and resulted in deltas added to our counter
values which should have been discarded because those would be flagged
for a different context.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/perf/gen_perf.c