Advanced Customizations
ARM DUI 0482K
Copyright © 2010-2012 ARM. All rights reserved.
11-6
ID120712
Non-Confidential
11.2.3
gator_events
functions
Here is a brief description of each of the gator event functions:
gator_events_
your_custom
_init
gator
calls this function startup.
gator_events_
your_custom
_interface
Tells gator what triggers calls to your custom events file.
gator_events_
your_custom
_create_files
Adds custom directories and enabled, event, and key files to
/dev/gator/events
gator_events_
your_custom
_start
gator
calls this at the start or execution.
gator_events_
your_custom
_read
gator
calls this function at every sample.
gator_events_
your_custom
_stop
gator
calls this at the termination of a capture session.
11.2.4
Adding your categories and events to the
events.xml
file
There are three important steps to add your counters to events.xml.
1.
Define how many counters exist in your custom set using the
<counter_set
name=”
counter_name
” count=”
x
”>
tag. Give your counter a unique, descriptive name and
enter how many counters are available for the
count
attribute. For example:
<counter_set name="ARM_Cortex-A9_cnt" count="6"/>
2.
For each counter set, you must list each of the possible events. Define the event category
using the
<category>
tag.
The category node has the following attributes:
name
A name for this category of counters. This names the header the counter
appears under in the counter configuration dialog box.
counter_set
Defines the counter set to be used.
per_cpu
Defines whether or not Streamline collects data on a per cpu basis. Set this
value to yes and Streamline collects data from each cpu separately for these
counters.
supports_event_based_sampling
Use
yes
or
no
to define whether or not the counters in this category can be used
for event based sampling. The default value is
no
.
For example:
<category name="Cortex-A9" counter_set="ARM_Cortex-A9_cnt" per_cpu="yes"
supports_event_based_sampling="yes">
3.
Define the individual events for each event category. Use the following attributes in the
event elements:
counter
Every event element must have either the counter or event attribute defined.
Use the counter attribute for fixed counter types, like cycle count. Use the event
attribute for all other events.