ARM Technical Support Knowledge Articles

How do I connect ARM Profiler 2.1 to a Fast Models Virtual Platform?

Applies to: Fast Models, RealView Development Suite (RVDS)

Answer

The version of the ARM Profiler that can be used with Virtual Platform / RTSM depends on the version of the Fast Model tool used to build the model. For a list of compatible version please see here.

The Fast Models 5.0 SP1 release supports both the 2.0 (RVDS 4.0 Professional SP1) and 2.1 (RVDS 4.0 Professional SP2) version of the ARM Profiler. From Fast Models 5.1 onwards, support for version 2.0 of the ARM Profiler has been removed.

ARM Profiler 2.0

The core models include an "enable-profiler" parameter.  When set to true, the models will ouput profiling data to file.  This file is in ARM Profiler 2.0 format, which is not compatible with 2.1.  If you are using ARM Profiler 2.1, do NOT enable this parameter.

ARM Profiler 2.1

If you are launching your simulation from within ARM Workbench IDE, the tool will automatically perform the below operations and loads the collected profile data. If your VP is not run from within the IDE or you wish to profile a Export Virtual Subsystem (EVS), you will have to manually perform the below operations.

For ARM Profiler 2.1, the model does not directly generate an output file.  Instead it is generated by a utility called armprocap, which the model connects to using a TCP/IP port.  The armprocap utility can be found in your RVDS 4.0 SP2 Professional installation:

  $ARMROOT\Profiler\tools\<version>\<os>\

The armprocap utility must be invoked before you start the simulation.  The command line arguments are:

  armprocap --create_connection_script <con_script> --models --load <axf> --output <profiling_dir_name>

Where:
con_script = A script file that armprocap will generate
axf = The image you wish to profile (and will be loading on to the model)
profiling_dir_name = The output directory for the profiling data

For example:

> armprocap --create_connection_script script.bat --models --load image.axf --output /path/to/output_dir
Configuration:
Images:
image.axf
Target:
Created connection script: script.bat
Waiting for model connection...

The result of running the above command is two fold. Firstly it opens a TCP/IP port for the model to send trace data to and secondly it generates a script file. The produced script file sets environment variables used by the model to connect to armprocap.

In order for these environment variables to be visable to the model, the script must be run, in the same terminal, before launching the simulation. For example:

> script.bat
> model_shell -m cadi_system_Win32-Release-VC2005.dll -a my_system.core="image.axf"

Once the simulation has launched it will communicate with armprocap.  Armprocap will exit once the simulation has terminated.  You should see this relfected in the terminal from which you ran armprocap, for example:

Loading symbols from ...
Finished loading symbols.
Transferring target image
Enabled streaming trace.

ARM Profiler (Build: Jul 10 2009, 03:32:02)
Writing ARM Profiler analysis file to 'C:\path\to\output_dir\.apd'.
Please wait.
Done. (0.1 seconds)


Disconnect...

Once the profiling data has been generated you can load it into the profiler.

Article last edited on: 2009-10-06 11:24:18

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential