11.2.2
Creating your own counters
ARM DUI 0482K
ID120712
To create your own counters, mimic the methods used in the
the other
files included with the gator source.
gator_events_x
Make sure to do the following to ensure that gatord interacts with your custom source:
1.
Create an empty
gator_events_your_custom.c
2.
Update the
makefile
3.
Add the preprocessor directive
gator_events_mmaped.c
4.
Include the
gator_events_init
5.
Implement the following functions in your new source file:
gator_events_your_custom_init
gator_events_your_custom_create_files
gator_events_your_custom_read
6.
All of your new counters must be added to the events list. You can accomplish this in one
of two ways:
•
Add the list to the
•
Create a new xml file in the same directory as the makefile before building
The makefile pulls in any file that begins with
events-YourCustom.xml
Copyright © 2010-2012 ARM. All rights reserved.
Non-Confidential
Figure 11-1 The Sine counter in the Timeline view
file or duplicate
to build the new
gator_events_your_custom.c
#include "gator.h"
as a template.
macro.
,
gator_events_your_custom_interface
,
gator_events_your_custom_start
, and
gator_events_your_custom_stop
file, located in the same directory as
events.sml
. Re-build
after you create this new xml file.
gatord
Advanced Customizations
gator_events_mmaped.c
gator_events_mmaped.c
file.
if you do not use
,
,
.
gatord
so create a xml file called
events-
or any of
.
.
.
gatord
11-5