On 6/20/19 8:15 AM, luoxhu wrote:
> Hi Martin,
> 
> On 2019/6/20 09:59, luoxhu wrote:
>>
>>
>> On 2019/6/19 20:18, Martin Liška wrote:
>>> On 6/19/19 10:56 AM, Martin Liška wrote:
>>>> Thank you very much for the numbers. Today, I'm going to prepare the 
>>>> generalization of single-value counter to track N values.
>>>
>>> Ok, here's a patch candidate that does tracking of most common N values. 
>>> For your test-case I can see:
>>>
>>> pr69678.gcda:    01a90000:  18:COUNTERS indirect_call 9 counts
>>> pr69678.gcda:                   0: 350000000 1868707024 175000000 969338501 
>>> 175000000 0 0 0
>>> pr69678.gcda:                   8: 0
>>>
>>> So for now, you'll need to generalize get_most_common_single_value to return
>>> N most common values.
>>>
>>> Eventually we'll need to renamed the counter as it won't be tracking just a 
>>> single value
>>> any longer. I can take care of it.
>>>
>>> Can you please verify that the patch candidate works for you?
>> Thanks, the profile data seems good, I will try it.  I need rebase my patch
>> to trunk first, as there are many conflicts with your previous patch.
> 
> The patch works perfect for me, lots of duplicate code can be removed base
> on that.  Hope you can upstream it soon.  :)

Yep, I'll send it in coupe of hours.

> BTW, I don't need call the get_most_common_single_value function to access
> the histogram values & counters, I will loop access it directly one by one.

No, please do not do it. I would like to see get_most_common_single_value being 
used
for your purpose. You'll have to generalize it, but please no direct accessed
to the histogram values.

Thanks,
Martin

> 
> Thanks
> Xionghu
> 
>>
>>
>>> Thanks,
>>> Martin
>>>
> 

Reply via email to