2.3.128. STATS

Displays bus and processor cycles for RVISS targets. You can specify user-defined reference points to show the counts from specific points in the execution.

Syntax

STATS [[=]ref_name]

STATS {,setref | ,clearref} [[=]ref_name]

STATS ,reset [=]ref_name

STATS ,clearall

where:

clearall

Removes all user-defined reference points.

clearref

Removes the specified user-defined reference point.

If no reference point is specified, the last reference point in the list is deleted, if any.

reset

Resets the specified user-defined reference point.

setref

Creates a specified user-defined reference point.

If no reference point is specified, a reference point is created, which has the the default name:

Ref_nn

where nn is a numerical identifier starting at 01. This is incremented with each new reference point you create.

ref_name

The name of a user-defined reference point, which can have a maximum of nine characters. The name can include alphanumeric characters and the underscore (_), colon (:), and space characters. You cannot specify the default reference point name Ref_Cur (see Default reference point).

For example, i10_a:1.

Note

If you include a space character, then delimit the name with double quotation marks, for example "a1 loop".

Description

This command enables you to:

  • display values of statistics counters

  • create one or more reference point for those counters

  • reset an existing reference point

  • delete an existing reference point or all reference points.

Note

The statistics counters are the values returned by the RVISS $statistics structure.

Statistics counters

The statistics counters displayed depends on the type of processor:

  • uncached von Neuman cores, such as the ARM7TDMI, display:

    Instructions, Core_Cycles, S_Cycles, N_Cycles, I_Cycles, and C_Cycles

  • Harvard cores, such as the ARM9TDMI® display:

    Instructions, Core_Cycles, ID_Cycles, IBus_Cycles, Idle_Cycles, and Dbus_Cycles

  • cores with AMBA® ASB interfaces, such as the ARM940T, display:

    Instructions, Core_Cycles, S_Cycles, N_Cycles, A_Cycles, and C_Cycles

  • cores with AMBA AHB interfaces, such as the ARM946E-S™, display:

    Instructions, Core_Cyles, SEQ, NON-SEQ, IDLE, and BUSY.

For all types a total count is also displayed.

Default reference point

A default reference point exists, called Ref_Cur, which shows the total counts for the target. You cannot delete or reset the values for this reference point. These default reference point counts are also shown in the CycleCount tab of the Registers view.

You can access the individual statistics count values for the default reference point using debugger symbols. To find the symbol name for a statistics counter, enter the command:

REGINFO,access,match:@stats

User-defined reference points

A user-defined reference point shows the counts only from the point at which it is created.

If you enter the command without a qualifier or reference name, then the statistics counters for all reference points are displayed.

If you enter the command with a reference name only, then the statistics counters are displayed only for that reference point.

Note

When you disconnect from the target, the user-defined reference points are deleted and the Ref_Cur counts are reset to zero.

Example

For example, you might want to view the counts from the point at which a breakpoint is hit. To do this, you might set a breakpoint that is activated after 10 passes, then create a reference point to show the counts from this point onwards. The following example uses the dhrystone image:

  1. Connect to an RVISS target on the RealView Instruction Set Simulator Debug Interface.

  2. Load the example dhrystone image ...\Debug\dhrystone.axf.

  3. Enter the following command to set a breakpoint:

    BREAKINSTRUCTION,passcount:10 \DHRY_1\#149:1

  4. Start execution.

  5. Enter 1000 when prompted for the number of runs.

  6. When the breakpoint is activated, create your reference point (iter:10):

    STATS,setref iter:10

  7. View the current values:

    > STATS
    Ref_Point Instructions Core_Cycles _S_Cycles _N_Cycles _A_Cycles C_Cycles Total   
    Ref_Cur   00007cb1    0000c703   0000e4b6 00000000 00031279 00000000 0003f72f 
    iter:10   00000000    00000000   00000000 00000000 00000000 00000000 00000000
    
  8. Restart execution.

  9. View the current values:

    > STATS
    Ref_Point Instructions Core_Cycles _S_Cycles _N_Cycles _A_Cycles C_Cycles Total   
    Ref_Cur   00007e97    0000ca13   0000e800 00000000 00031e87 00000000 00040687 
    iter:10   000001e6    00000310   0000034a 00000000 00000c0e 00000000 00000f58
    
  10. You can create additional reference points as required.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111