This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I want to use Streamline offline, how to create a configuration.xml file? In case no connection between host and target

Hi, All,

i am trying to analyze performance using streamline offline, in help document it say that must create a configuration.xml file for gatord, but it just list the steps with connection, how to create a configuration.xml file if not connection???

thanks

To capture data locally, follow these steps:

Procedure
  1. Create a session.xml file. To do so, use the Capture & Analysis Options dialog box to set your capture options, then click the Export... button to save the new session.xml file. Alternatively, you can copy a session.xml file from an existing Capture.
  2. Create a configuration.xml file. To do so, define your target in the Connection field, then open the Counter Configuration dialog box from the Streamline Data view. Set up the counters you want to collect, then click Save. A new configuration.xml file is created in the directory where gatord is running. This file is automatically used when you run gatord. To define a specific configuration file, use the -c option when you run gatord. If your target is not TCP/IP capable, you must create a configuration.xml file and manually transfer it to your target.

ARM Information Center

  • Hi jiangbo,

    To manually create a configuration.xml file in order to run Streamline offline, it's easiest to take an example file and modify it. Here's one from C:/Program Files/DS-5/arm/gator/protocol/gator_protocol-5-16.html

    <?xml version="1.0" encoding="utf-8"?>

    <captured version="1" created="1361467764" protocol="16">

      <target sample_rate="100" cores="5" cpuid="0xc0f"/>

      <counters>

        <counter key="0x3" type="ARM_Cortex-A7_cnt1" event="0x10"/>

        <counter key="0x4" type="ARM_Cortex-A7_cnt2" event="0x16"/>

        <counter key="0x1" type="ARM_Cortex-A7_ccnt" event="0xff"/>

        <counter key="0x2" type="ARM_Cortex-A7_cnt0" event="0x8"/>

        <counter key="0x15" type="Linux_power_cpu_freq" event="0x0"/>

        <counter key="0x9" type="Linux_block_rq_rd" event="0x0"/>

        <counter key="0x8" type="Linux_block_rq_wr" event="0x0"/>

        <counter key="0xc" type="Linux_meminfo_memfree" event="0x0"/>

        <counter key="0xd" type="Linux_meminfo_memused" event="0x0"/>

        <counter key="0x12" type="Linux_net_rx" event="0x0"/>

        <counter key="0x13" type="Linux_net_tx" event="0x0"/>

      </counters>

    </captured>


    You can then modify it to support the counters that you require (and configure for a specific CPU). To understand the counter hex codes for each CPU, look in the source: C:\Program Files\DS-5\arm\gator\daemon-src


    Edit - the counters will be in files such as: events-Cortex-A9.xml

    Hope this helps,

    Joe

  • A configuration.xml file is not required if the default counters are sufficient. However if they are not sufficient, creating a valid configuration.xml can be tricky. If at all possible you should use the Streamline Counter Configuration dialogue to create one instead of doing it by hand. Naturally this is not an option in your case because you do not have a network connection to your target. I'm going to assume you're running the latest version of Streamline, 5.16. If you're running earlier versions it's still possible but more complicated.

    Start gatord and then run "ls /dev/gator/events" to see all the counters supported by your target. On my target I see this:

    $ ls /dev/gator/events

    ARM_Cortex-A9_ccnt  Linux_block_rq_rd          Linux_net_rx

    ARM_Cortex-A9_cnt0  Linux_block_rq_wr          Linux_net_tx

    ARM_Cortex-A9_cnt1  Linux_cpu_wait_contention  Linux_power_cpu_freq

    ARM_Cortex-A9_cnt2  Linux_cpu_wait_io          Linux_power_cpu_idle

    ARM_Cortex-A9_cnt3  Linux_irq_irq              Linux_sched_switch

    ARM_Cortex-A9_cnt4  Linux_irq_softirq          mmaped_cnt0

    ARM_Cortex-A9_cnt5  Linux_meminfo_bufferram    mmaped_cnt1

    L2C-310_cnt0        Linux_meminfo_memfree      mmaped_cnt2

    L2C-310_cnt1        Linux_meminfo_memused

    Counters like Linux_block_rq_rd only support a single event, but counters that end in _cnt# usually support more than one event. To see what events can be associated with counters you have, look at events-*.xml in the gator daemon source.

    daemon> grep Linux_block_rq_rd events-*.xml

    events-Linux.xml:    <event counter="Linux_block_rq_rd" title="Disk IO" name="Read" units="B" description="Disk IO Bytes Read"/>

    This means the Linux_block_rq_rd counter is the Disk IO: Read event. You can follow a similar process for all the non-_cnt and non_ccnt counters. To see what events can be associated with _cnt counters, find the events-*.xml file they're in and take a look at it.

    daemon> grep -l ARM_Cortex-A9 events-*.xml

    events-Cortex-A9.xml

    daemon> cat events-Cortex-A9.xml

      <counter_set name="ARM_Cortex-A9_cnt" count="6"/>

      <category name="Cortex-A9" counter_set="ARM_Cortex-A9_cnt" per_cpu="yes" supports_event_based_sampling="yes">

        <event counter="ARM_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 means that the ARM_Cortex-A9_ccnt counter is the Clock: Cycles event and the ARM_Cortex-A9_cnt# counters can be associated with a large number of events including Software: Increment, Cache: Instruction refill and Cache: Inst TLB refill. You should now know all available events for your target. Once you've picked the events you're interested in you need to copy the counter, event (if any), title and name attributes from the <event .../> node into the skeleton of a configuration.xml file.

    <?xml version="1.0" encoding="UTF-8"?>

    <configurations revision="3">

            <configuration .../>

    </configurations>

    So if I choose to add the Disk IO: Read event from above, I'd copy the attributes from events-Linux.xml above (notice that this event doesn't have an event attribute) and end up with this:

    <?xml version="1.0" encoding="UTF-8"?>

    <configurations revision="3">

            <configuration counter="Linux_block_rq_rd" title="Disk IO" name="Read"/>

    </configurations>


    If I also wanted to add the Clock: Cycles event, I'd copy the attributes above (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 IO" name="Read"/>

            <configuration counter="ARM_Cortex-A9_ccnt" event="0xff" title="Clock" name="Cycles"/>

    </configurations>


    And finally if I wanted to add Cache: Instruction refill event I'd again copy the attributes from above, but in this case the <events .../> node does not have a counter attribute, so I look at the category for the event and see it uses counter_set="ARM_Cortex-A9_cnt". That means I pick one of the unused ARM_Cortex-A9_cnt# counters and associate it with the Cache: Instruction event. Note that each _cnt counter can only be associated with a single event at a time so you can not configure all possible events at the same time. Here's what my configuration.xml now looks like:

    <?xml version="1.0" encoding="UTF-8"?>

    <configurations revision="3">

            <configuration counter="Linux_block_rq_rd" title="Disk IO" name="Read"/>

            <configuration counter="ARM_Cortex-A9_ccnt" event="0xff" title="Clock" name="Cycles"/>

            <configuration counter="ARM_Cortex-A9_cnt0" event="0x01" title="Cache" name="Instruction refill"/>

    </configurations>


    These steps should help you create a configuration.xml file for your specific target to capture the events you're interested in.