Re: [PATCH v2 2/6] perf test: Handle metric reuse in pmu-events parsing test

John Garry
2021-04-06T13:41:00Z

On 06/04/2021 14:34, Jiri Olsa wrote:
>>
>> }
>>
>> So once we evaluate a pmu_event in pctx->ids in @pe, @all is set false, and
>> we would loop again in the do-while loop, regardless of what
>> expr__find_other() does (apart from erroring), and so call
>> hashmap__for_each_entry_safe(&pctx->ids, ) again.
> ah ok, so it finishes the hash iteration first and
> then restarts it.. ok, I missed that, then it's fine
> >> This is really what is done in __resolve_metric() - indeed, I would
use that
>> function directly, but it looks hard to extract that from metricgroup.c .
> yea, it's another world;-) it's better to keep it separated

ok, so I'll still add the break statement, as suggested.

I'll also wait to see if Ian or you have a strong feeling about the
function naming in patch 1/6.

Thanks,
John