On Fri, Jun 01, 2018 at 03:20:00PM -0600, Mathieu Poirier wrote:
[...]
static int cs_etm__flush(struct cs_etm_queue *etmq) { int err = 0;
struct cs_etm_auxtrace *etm = etmq->etm; struct cs_etm_packet *tmp;
if (!etmq->prev_packet)
@@ -948,12 +972,20 @@ static int cs_etm__flush(struct cs_etm_queue *etmq) err = cs_etm__synth_instruction_sample( etmq, addr, etmq->period_instructions);
if (err)
return err;
To me this is a bug fix and should be in a separate patch.
etmq->period_instructions = 0; }
- if (etm->sample_branches) {
err = cs_etm__synth_branch_sample(etmq);
if (err)
return err;
- }
So is this - we should generate a branch sample when receiving a TRACE_ON packet.
Have splitted into a dedicated patch for 'generate a branch sample when receiving a TRACE_ON packet.' For more clear logic in the patch series, I tried to split into 3 patches:
- Support dummy address in CS_ETM_TRACE_ON packet;
- Fix patch for generating a branch sample when receiving a CS_ETM_TRACE_ON packet;
- Generate branch sample for CS_ETM_TRACE_ON packet
Please let me know if it's doable or any better idea?
I'll review your patches next week and will advise then.
Sure. Thanks, Mathieu.