Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.32

Profiler Sampling

This chapter describes how to periodically sample variables (data variables or program execution) via a debug port. Sampling provides profiling capabilities to devices with limited trace options and hardware trace resources.

 

However this approach can not replace the trace analysis, because it is not guaranteed that all relevant events can actually be captured. Concept of Profiler Sampling is mainly used for statistical analysis or for sampling rather slowly changing variables, and cyclic program execution.

 

In this chapter you can find:

 

 

Requirements

  • winIDEA 9.21
  • BlueBox debugger iC5700, iC6000
  • Target supporting Real-time memory access for Data Sampling
  • Target supporting memory mapped core registers for PC Sampling

 

 

Types

Two types of sampling are implemented:

 

 

Configuration

Data and PC Sampling is configured in the Analyzer Configuration / Profiler under the Data section.

 

 

How does it work?

PCsampling-how

1. Configure the Profiler and select variables, program flow, application etc.

2. Configuration is sent to the BlueBox which is periodically running the Idle loop where the sampling takes place.

3. Idle loop via debug port accesses memory and memory mapped registers on the target in real-time.

4. Data is sent back to the BlueBox where it is equipped with a time stamp.

5. Everything is then transferred  back to winIDEA and visualized in the Profiler Timeline and Profiler Statistics window.

 

 

 

Data presentation

Results are shown in the and Profiler Timeline or in the Profiler Statistics windows.

 

Data Sampling

Sampling-Variable

 

PC Sampling

Profiler Timeline displays how much time the program was in the specific function for the specific application.

Profiler Statistics, e.g. column Count displays how many times a specific address was in a certain function.

PCsampling4

 

Trace

Sampling data can be shown in the Trace window as well, but trace must be recorded with the time stamp source BlueBox Timer or time synchronization must be enabled. Note that his setting is CPU architecture specific.

If a sample pool is larger than the amount of the samples recorded, Profiler Timeline does not show any activity, however the recorded samples can be displayed in the Trace window.

 

PCsampling-Trace

Source ID column - Data from the PC and Data Sampling

Core column - Displays from which core the information came

Content column - Displays memory space ID (MSID). If your application doesn't have a memory space ID, Profiler Timeline displays a message it is not in use.

 

 

Export

Refer to the chapter Profiler Export.

 

 

Limitations

  • Exact time information is limited
  • Data Sampling might give incorrect results in case of MMU (If two Process are running on the same core, on the same address, we can't determine from which Process data write came from)
  • Data Sampling would not return the correct results if caching is used, because with this approach you access the main memory
  • Data Sampling is limited to the maximum memory access size

 

 

bulb

More resources

 

Copyright© iSYSTEM AG Carl-Zeiss-Str.1 85247 Schwabhausen Germany