You copied the Doc URL to your clipboard.

Creating a configuration.xml file

A configuration.xml file defines the set of counters and their attributes that you want Streamline to collect from the target.

You normally configure counters using the Counter Configuration dialog, but if you have no network connection to your target, then you configure them by manually creating a configuration.xml file before running a capture session.

Note

Streamline defines a default set of counters. If this is sufficient, you do not need to create a configuration.xml file.

Procedure

  1. Start gatord, then run ls /dev/gator/events to list all the counters that your target supports.

    The list might look like this:

    ARMv7_Cortex_A9_ccnt  Linux_block_rq_wr          Linux_power_cpu_freq
    ARMv7_Cortex_A9_cnt0  Linux_cpu_wait_contention  Linux_proc_statm_data
    ARMv7_Cortex_A9_cnt1  Linux_cpu_wait_io          Linux_proc_statm_share
    ARMv7_Cortex_A9_cnt2  Linux_irq_irq              Linux_proc_statm_size
    ARMv7_Cortex_A9_cnt3  Linux_irq_softirq          Linux_proc_statm_text
    ARMv7_Cortex_A9_cnt4  Linux_meminfo_bufferram    Linux_sched_switch
    ARMv7_Cortex_A9_cnt5  Linux_meminfo_memfree      mmapped_cnt0
    L2C-310_cnt0          Linux_meminfo_memused      mmapped_cnt1
    L2C-310_cnt1          Linux_net_rx               mmapped_cnt2
    Linux_block_rq_rd     Linux_net_tx
  2. Counters whose name does not end in _cnt<n>, for example Linux_block_rq_rd, support a single event only. To find out which event these counters support, search for the counter name in events-*.xml in the gator daemon source code, for example:
    $ grep Linux_block_rq_rd events-*.xml
    events-Linux.xml:    <event counter="Linux_block_rq_rd" title="Disk I/O" name="Read" units="B" description="Disk I/O Bytes Read"/>

    This shows that the Linux_block_rq_rd counter is associated with the Disk IO: Read event.

  3. Counters whose name ends in _cnt<n> usually support more than one event. To find out which events these counters support, search for the events-*.xml file they are defined in.

    For example, to search for the file that defines the ARMv7_Cortex_A9 counters, use the following command:

    $ grep -l ARMv7_Cortex_A9 events-*.xml
    events-Cortex-A9.xml

    Next, view the contents of events-Cortex-A9.xml to find out which events the ARMv7_Cortex_A9 counters correspond to, for example:

    $ cat events-Cortex-A9.xml
      <counter_set name="ARMv7_Cortex_A9_cnt" count="6"/>
      <category name="Cortex-A9" counter_set="ARMv7_Cortex_A9_cnt" per_cpu="yes" supports_event_based_sampling="yes">
        <event counter="ARMv7_Cortex_A9_ccnt" event="0xff" title="Clock" name="Cycles" display="hertz" units="Hz" average_selection="yes" average_cores="yes" description="The number of core clock cycles"/>
        <event event="0x00" title="Software" name="Increment" description="Incremented only on writes to the Software Increment Register"/>
        <event event="0x01" title="Cache" name="Instruction refill" description="Instruction fetch that causes a refill of at least the level of instruction or unified cache closest to the processor"/>
        <event event="0x02" title="Cache" name="Inst TLB refill" description="Instruction fetch that causes a TLB refill of at least the level of TLB closest to the processor"/>
    ...

    This shows that the ARMv7_Cortex_A9_ccnt counter is the Clock: Cycles event. It also shows that the ARMv7_Cortex_A9_cnt<n> counters can be associated with a large number of events, including Software: Increment, Cache: Instruction refill, and Cache: Inst TLB refill.

    After following this step, you should know which events are available for your target.

  4. Create an empty configuration.xml file. Copy and paste into it the counter, event (if any), title, and name attributes from the <event .../> nodes for the events you are interested in.

    For example, to add the Disk IO: Read event, copy the required attributes from events-Linux.xml. Your configuration.xml file should look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <configurations revision="3">
            <configuration counter="Linux_block_rq_rd" title="Disk I/O" name="Read"/>
    </configurations>

    Note

    The Linux_block_rq_rd counter does not have an event attribute.
    To add another event, for example Clock: Cycles, copy its attributes, including the event attribute, into a new <configuration> node:
    <?xml version="1.0" encoding="UTF-8"?>
    <configurations revision="3">
            <configuration counter="Linux_block_rq_rd" title="Disk I/O" name="Read"/>
            <configuration counter="ARMv7_Cortex_A9_ccnt" event="0xff" title="Clock" name="Cycles"/>
    </configurations>

    To add an event that does not have a counter attribute, for example Cache: Instruction refill, you must choose a counter value from the category for the event. For example, the category for the Cache: Instruction refill event uses counter_set="ARMv7_Cortex_A9_cnt". This means you can choose one of the unused ARMv7_Cortex_A9_cnt<n> counters to associate with the Cache: Instruction refill event, for example ARMv7_Cortex_A9_cnt0. Your configuration.xml file should look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <configurations revision="3">
            <configuration counter="Linux_block_rq_rd" title="Disk I/O" name="Read"/>
            <configuration counter="ARMv7_Cortex_A9_ccnt" event="0xff" title="Clock" name="Cycles"/>
            <configuration counter="ARMv7_Cortex_A9_cnt0" event="0x01" title="Cache" name="Instruction refill"/>
    </configurations>

    Note

    You can only associate each _cnt<n> counter with a single event at the same time, so you cannot include all possible events in this configuration.xml file.

These steps should enable you to create a configuration.xml file for a specific target to capture the events you are interested in.

Was this page helpful? Yes No