ARM-software / gator

Sources for Arm Streamline's gator daemon, part of Arm Mobile Studio suite of performance analysis tools
https://www.arm.com/products/development-tools/graphics/arm-mobile-studio
133 stars 70 forks source link

Streamline counter name duplicate in streamline 2020. #32

Closed haruzheng closed 2 years ago

haruzheng commented 2 years ago

"Invalid capture, analysis stopped. Reason: Duplicate counter alias(es) :""

Hi

I want to add event with gator. If in event attr has event and counter, it is not working. if in event attr only has event, and no counter are working.

like. not working

<counter_set name="our_pmu_cnt" count="4"/>
  <category name="OUR_PMU" counter_set="our_pmu_cnt" per_cpu="no">
    <event counter="our_pmu_cnt0" event="0x000" title="pmu0" name="PMU 0" description="PMU 0" display="hertz" units=""/>
    <event counter="our_pmu_cnt1" event="0x001" title="pmu1" name="PMU 1" description="PMU 1" display="hertz" units=""/>
    <event counter="our_pmu_cnt2" event="0x002" title="pmu2" name="PMU 2" description="PMU 2" display="hertz" units=""/>
    <event counter="our_pmu_cnt3" event="0x003" title="pmu3" name="PMU 3" description="PMU 3" display="hertz" units=""/>
  </category>

working

<counter_set name="our_pmu_cnt" count="4"/>
  <category name="OUR_PMU" counter_set="our_pmu_cnt" per_cpu="no">
    <event event="0x000" title="pmu0" name="PMU 0" description="PMU 0" display="hertz" units=""/>
    <event event="0x001" title="pmu1" name="PMU 1" description="PMU 1" display="hertz" units=""/>
    <event event="0x002" title="pmu2" name="PMU 2" description="PMU 2" display="hertz" units=""/>
    <event event="0x003" title="pmu3" name="PMU 3" description="PMU 3" display="hertz" units=""/>
  </category>

Thank you

bengaineyarm commented 2 years ago

Hi @haruzheng

Typically, ""Invalid capture, analysis stopped. Reason: Duplicate counter alias(es) :"" happens when you select two or more counters in the capture that have the same combination of "title" and "name" string. For example, under the "Linux" category there is a "Interrupts: IRQ", likewise for most Cortex-XXX CPUs there is also an "Interrupts: IRQ" counter. If you select both, you will get this error, this is a known issue.

regarding your custom events, if they are for a PMU (such as CPU or interconnect) then you should only specify the "event" attribute. If the PMU has an additional Cycle counter that can be selected without being counted towards the counter limit specified by "count=4" then you should give it a counter="our_pmu_ccnt" attribute as well as an event attribute, otherwise it should just have the event attribute.

Regards Ben

haruzheng commented 2 years ago

Hi @bengaineyarm

In my case are if i has counter attr, i only to get our_pmu_cnt0, no matter if i choose any one from 0 to 3.

So i confusing it.

So you think this not a issue? Just remove counter attr, it will mapping by event attr? <- I just want to check this.

Thank you.

Haru

bengaineyarm commented 2 years ago

That is correct. For PMU's with multiple configurable "slots" in a counter set (in your case count=4, so 4 possible slots), the "counter" is generated dynamically by gatord, you only need to specify the "event" attribute and because the category has a "counter_set" then gatord will create 4 counter slots for you to configure your PMU events to.

haruzheng commented 2 years ago

Thank you.

Right, it is not a problem.