Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.244

Navigation: Operating Systems > AUTOSAR > How-to guides > Profile Vector MICROSAR

Scroll Prev Top Next More

Non-Instrumented Task State and ISR Profiling

In this topic:

Introduction

Configure OS/RTE Profiling in DaVinci Configurator

Use iTCHi to generate the XML

Configure winIDEA and start profiling

 

 

Introduction

This section explains how to profile Task states and running ISR information utilizing data tracing without instrumentation (meaning no changes to the source code are necessary).

 

To facilitate this use case, the ORTI file provides a STATE attribute for each task. By evaluating the state expression, the state of the task at a given moment can be deduced. The challenge with Vector MICROSAR state tracing is that the state attribute consists of multiple variables as shown in the following listing.

 

TASK Default_Appl_Init_Task {

PRIORITY = "OsCfg_Task_Default_Appl_Init_Task_Dyn.Priority";

STATE = "OsCfg_Core_OsCore_Core0_Status_Dyn.OsState == 2 ? (

OsCfg_Trace_OsCore_Core0_Dyn.CurrentTask == &OsCfg_Trace_Default_Appl_Init_Task ?

0 : OsCfg_Task_Default_Appl_Init_Task_Dyn.State ) : 0xFF";

/* other attributes here */

}; /* Default_Appl_Init_Task */

 

Warning_orange

To configure this use case properly, two points have to be kept in mind:

Enough data trace comparators to record all variables that are part of the state expression must be available.

Variables that don’t change during the trace recording, have to be preset to their expected value in the Profiler configuration.

oFor example, the OsState variable in the listing above is only written once at the startup of the application. To be able to start a recording at a different point in time, this variable has to be set to 2.

oSimilarly, for a background task, the State variable always has the value 1 for READY.

 

The following configuration steps are required for state analysis without instrumentation:

 

number1

Enabling ORTI file generation in DaVinci Configurator.

 

number2

Configuring iTCHi to generate the XML file.

 

number3

Configuring winIDEA to record all variables that are part of the STATE expression.

 

Number4

Configuring winIDEA to analyze the trace data using the generated XML file.

 

Number5

Configuring hardware tracing to record the instrumentation variables.

 

 

Configure OS/RTE Profiling in DaVinci Configurator

number1

In DaVinci Configurator, open the Basic Editor.

 

number2

In the Basic Editor, expand the OS node.

 

number3

Navigate to the OsOS node and select the OsDebug node.

 

Number4

Activate ORTI Debug Support by selecting ORTI_23_STANDARD or ORTI_23_ADDITIONAL.

 

Number5

Regenerate the OS.

This process enables the OS ORTI file generation. After generating the OS, you should find a file Os_Trace.ORT in your Appl/GenData directory.

 

 

 

Use iTCHi to generate the XML

To generate a winIDEA OS Info XML for task state and ISR analysis without instrumentation, follow these steps:

 

number1

In the iTCHi wizard, make sure your itchi.json file is selected.

 

number2

Ensure your ORTI file and Profiler XML file are specified correctly.

 

number3

Select the Task State analysis technique.

 

Number4

Choose task_state_complex_native as the command and press Next.

ask_state_complex_native

 

You can leave the running_taskisr settings as they are.

 

Number5

Under task_state_complex, use constant_variables to set all non-changing variables to their expected constant value.

For Vector MICROSAR, set OsState variables to 2. The screenshot below shows how this would look like for an application that uses six cores. Also set task State variables to 1 (meaning READY) for tasks that might not otherwise change their state. This might be required for background tasks.

If you start recording before the startup of the application, you don’t have to do this.

For other operating systems, you can leave constant_variables empty.

 

number6

Click Generate to create the XML.

Non-instrumented-task-configuration-iTCHi

 

 

Configure winIDEA and start profiling

After adding the generated Profiler XML to winIDEA, follow these steps to finish the configuration:

 

number1

Create a new Manual Trace Configuration via View / Analyzer / Create New Configuration.

 

number2

Enable data trace for all variables that are part of the state expressions.

hmtoggle_arrow0 Follow the Trace Configuration.

You can use the iTCHi --log_trace_symbols flag if you are not sure which variables are required.

 

number3

Press OK and reopen the configuration, and add the relevant Application.

The application has to include all cores that you want to profile.

 

Number4

Enable OS Objects and all task and ISR objects.

os-objects-isr

 

 

Number5

Start the Analyzer session.

If everything is set up correctly, you should see a trace like the one shown below.

 

Click to enlarge

 

i-icon

If you don’t see any data or the data does not look plausible, please check the Knowledge Base.

 

Copyright © 2024 TASKING Germany GmbH