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

Spinlock Profiling

In this topic:

Introduction

Setup Vector MICROSAR

Setup iTCHi

Setup winIDEA

 

 

Introduction

Spinlock Profiling utilizes the Vector OS Timing Hooks. It only works in combination with instrumented Task and ISR profiling.

 

Warning_orange

Spinlock Profiling is an experimental feature and currently only works with data tracing.

 

 

Setup Vector MICROSAR

Spinlock profiling utilizes the OS Timing Hooks, which should already be enabled. If not, follow the section Task State and ISR Profiling via Instrumentation first, before continuing with this section.

 

Setup iTCHi

For Spinlock profiling to work, two changes are necessary. First, in addition to the thread instrumentation, iTCHi also has to generate the Spinlock instrumentation into OS_TimingHooks_isystem.h. Second, iTCHi has to update the Profiler XML.

 

number1

Open the iTCHi wizard, and load the existing itchi.json.

 

number2

Check task_state_instrumentation and spinlock_instrumentation command and

If you haven’t configured task_state_instrumentation yet, do that first.

 

number3

Press Next and make sure that spinlock_generate_instrumentation is selected.

In the attribute configuration dialog, there is now a new area spinlock_instrumentation.

 

Number4

(optional) Override the definition of the spinlock trace variable.

You can optionally use the attribute spinlock_trace_variable_definition to override the definition of the spinlock trace variable. You can use {{spinlock_trace_variable}} inside the definition string to be replaced by the attributed defined in spinlock_trace_variable.

 

Number5

Click Generate.

 

After iTCHi has finished, carefully check the output to confirm that the instrumentation files have been written. If they have not been written because they already exist, delete or rename them and generate again. Rebuild your application as before. In winIDEA, make sure that the spinlock variable exists and that it changes in the watch window if real-time updates are enabled.

 

 

Setup winIDEA

In the winIDEA Analyzer, open your existing Profiler configuration. In addition to Threads, also enable Spinlocks. Depending on your architecture, manually configure the hardware trace of the spinlock variable and start a new recording.

 

Copyright © 2024 TASKING Germany GmbH