You can export trace data collected on a project to a CSV file using Jython console.
Note: Another way of exporting trace data to a CSV file is through buttons available on the Trace Data , Critical Code , and Performance viewers.
To export trace data using Jython console, perform the following steps. Make sure that you have some trace data collected that you want to export to CSV files.
- Open the Remote Launch and Jython Consoles views.
- Activate remote launch by clicking the Enable Remote Launch button.
- Open the View menu in the Jython Consoles view, and select the New Interpreter option. This step is not required if you have opened Jython Consoles for the first time.
- Type a name and click OK in the Input Name dialog box.
- Type the following commands one by one in the Jython command prompt:
>>> from scripting_sa import TestExportTrace
>>> test = TestExportTrace.TestExportTrace()
>>> test.testExportTrace(config_path)
where config_path is a string containing the full path (in double quotes) of the .config file present
in the .Analysis Data
directory (in your project workspace) with path separators '/' or
'\\'. The .config file contains the configuration details of the project the trace data of
which you are exporting to CSV.
Note: The from scripting_sa import TestExportTrace command imports the Python script TestExportTrace.py written for exporting trace results in CSV files. This script is located at <CW Installation Directory>\eclipse\plugins\com.freescale.sa.scripting_*\remote\scripting_sa.
Figure 1. Running Commands in Jython Console 
The following output is shown in the Jython console and four .csv files are created in
the .Analysis Data directory of your workspace.
Figure 2. Output in Jython Console After Running Export Commands 
- Browse to the .Analysis Data directory and view the .csv files containing the exported data.
This is how you export trace data to a CSV file using the Jython console.