On Fri, 15 Jun 2018 at 13:39, Kim Phillips kim.phillips@arm.com wrote:
On Thu, 14 Jun 2018 14:26:55 -0600 Mathieu Poirier mathieu.poirier@linaro.org wrote:
@@ -334,6 +338,18 @@ cs_etm_decoder__buffer_range(struct cs_etm_decoder *decoder, break; }
/*
* At the beginning of a trace session or trace discontinuity, the
* tracers will generate a timestamp packet _after_ a range packet
* has been generated. In order to know when traces started to be
* executed we need to keep track of the amount of instructions that
* were processed. That way when the timestamp packet gets generated
* we can _estimate_ the start time by substracting the number of
* instructions that were executed from the timestamp value.
* Timestamp estimation is done in cs_etm_decoder__buffer_timestamp().
*/
decoder->instr_count += elem->num_instr_range;
so.. using your branch, this line doesn't build, native, gcc 6.3, with O= set:
util/cs-etm-decoder/cs-etm-decoder.c: In function ‘cs_etm_decoder__buffer_range’: util/cs-etm-decoder/cs-etm-decoder.c:351:30: error: ‘ocsd_generic_trace_elem {aka const struct _ocsd_generic_trace_elem}’ has no member named ‘num_instr_range’ decoder->instr_count += elem->num_instr_range; ^~ mv: cannot stat '/nfsroot/linux/tools/arm64-perf/util/cs-etm-decoder/.cs-etm-decoder.o.tmp': No such file or directory linux/tools/build/Makefile.build:96: recipe for target 'linux/tools/arm64-perf/util/cs-etm-decoder/cs-etm-decoder.o' failed
Did the line adding num_instr_range get somehow lost on its way into the patch?
That is not the case nor is it a compiler version problem. I completely forgot to highlight this set need to be compiled with the latest version of the openCSD library where the decoder counts the amount of instruction present in a range.
Thanks for pointing this out.
Kim