Profile Vector MICROSAR
These topics explain how to profile and analyze the timing-behavior of Vector MICROSAR-based AUTOSAR applications.
•Task State and ISR Profiling via Instrumentation
•Non-Instrumented Task State and ISR Profiling
•Runnable Profiling via Instrumentation
•Running Task and ISR Profiling
You should be familiar with:
•the different types of Profiler objects (e.g., tasks, ISRs and Runnables)
•the trace capabilities available on the microcontroller to properly utilize this resource
The first step to analyze Vector MICROSAR is task state and running ISR analysis. There are two approaches for this type of analysis:
•Non-Instrumented (also called native) task state profiling.
Instrumented task state and ISR profiling works by utilizing the Vector MICROSAR OS Timing Hooks. It is the recommended approach in cases where the amount of data comparators is limited (four or less) or when data tracing is not available. This approach works by writing into a single global variable or utilizing instrumentation trace capabilities by the microcontroller (see choosing the right instrumentation technique) and is straightforward to set up. The downside is that instrumentation is necessary.
Native task state and ISR profiling works by tracing the OS data structures of the Vector MICROSAR OS. Each task has its own state variable which combined with the running task variable represents the current state of a task. The microcontroller must provide enough data comparators to trace all of these variables to make this approach viable.
Note that Vector MICROSAR also supports Running Task and ISR profiling via the ORTI file. This approach does not provide task state information and is therefore not desirable for most use cases. Nevertheless, if your goal is basic CPU load analysis, you can follow the Running Task and ISR Profiling section.
When task state and ISR profiling is working, the next step is to add Runnables.
Historically, Runnables can be profiled by utilizing program flow trace. Based on experience, this approach does not yield satisfactory results in most cases, either because of bandwidth limitations or because of intricacies in the compressed program flow logic by the semiconductor vendors. Therefore, instrumented Runnable profiling via instrumentation is the recommended approach. It works by instrumenting the RTE VFB trace hooks.
Lastly, the Vector MICROSAR OS Timing hooks provide support for Spinlock instrumentation. The winIDEA Analyzer supports Spinlock Profiling via these hooks.