Profiling Report Guide
Profiling Report Guide
RECORD OF CHANGE
10
TABLE OF CONTENTS
1 INTRODUCTION....................................................................................................................4
1.1 Purpose................................................................................................................................4
1.2 Scope....................................................................................................................................4
1.3 Definitions, acronyms and abbreviations............................................................................4
1.4 References............................................................................................................................4
1 INTRODUCTION
1.1 Purpose
This document provides introduction on profiling report, guidelines on how to setup, create test case,
execute test and generate profiling report in S32SDK project.
It also includes information on how LauterbachTrace32 obtaining profiling data from hardware and
some common issues when runs profiling test.
1.2 Scope
This document applies for all S32SDK testers, test lead and test architect.
1.4 References
Objective:
Provide the execution time for all driver APIs and the execution time for each critical region. The
report contains information on minimum, average and maximum runtime of APIs.
This is measured through dedicated Test Case. A profile test case can contain one or more
measurement use cases
Compiler names will not be available in the report; the compilers are identified through numbers.
Some sheets are empty, but is not an issue; this is normal behavior of the tool.
File name: <product>_<component>_ProfileReport.xlsx
e.g. S32SDK_CLOCK_ProfileReport.xlsx
Quality Target: No target
MCAL customer requirement example:
“The maximum interrupt lock time equals the maximum execution time of a critical section and shall
be less 100 us. The execution time of ISR shall be minimized.”
What to consider during review:
Reviewer: the list of functions included in each sheet is correct and complete
Quality: template, release information like date, product name & version, spot-check the sheets to
verify if there is data inside.
The profiling reports are created for each test module under folder: \vnv_test\auto\non_asr\sdk\test\
test_adc_pal\specific\<platform_name> \doc\profiling_reports and includes 5 files:
1. 00_trace_time_log.txt – log file for command: B::TRACE.STATISTIC.FUNC_
%LEN_50_NAME_ALL_/SORT_ADDRESS
2. 00_trace_time_log_tree.txt – log file for command
B::TRACE.STATISTIC.TREE_%LEN_50
3. 00_trace_error_log.txt – error log from T32
4. 00_trace_params_log.txt – contains information on system clock frequency, Instruction
cache and Data cache status, data read wait state in flash and ram at which test is run.
5. S32SDK_<derivative_name>_<module_name>_ProfileReport.xlsx – Summary excel file
from 4 above files and generated by Auto tool.
The following table lists all the trace data for an APIs:
Table 4-3: Trace data
No Trace data Description
4.2.1 Software
Have to 2 files .c and .h to define some macro and function to support for trace
- …\test\test\specific\MPC574X\include\sys_trace.h
- …\test\test\specific\MPC574X\include\sys_trace.c
Detail:
TRACE_START: Set breakpoint to starting measurement time
TRACE_STOP: Set breakpoint to stopping measurement time
TRACE_DESCRIPTION: To tester more monitor for that function
TRACE_FILTERS: to support tool filter capture data in logs file
Configuration in VnV
Table 2-5: V&V make configuration
No File Content
1 local_config.m T32_TRACE_APP:=ON
ak
2 config_beart.m SRC_FILES +=
ak $(CFG_DIR)/../../../test/specific/$(PLATFORM)/src/sys_trace.c
INCLUDE_DIRS += $(CFG_DIR)/../../../test/specific/$(PLATFORM)/inc
ifeq ($(T32_TRACE_APP),ON)
No File Content
CFG_OUT_FILES=$(DEV_DIR)/test/specific/$(PLATFORM)/config/
debug/lauterbach/cmm/get_system_params.cmm
endif
Profiling report are measured for sequence of TYPICAL USER CASES of drivers. In the case that it
is very difficult to specify the TYPICAL USER CASE, driver EXAMPLE code is considered as an
important source to develop test case for profiling test.
Example
RTC_DRV_GetDefaultConfig(&T_config);
TRACE_STOP();
T32_TRACE_APP:=ON
Module register number test suite to run Profiling: Make clean generate parse; make build run
report
Output is consist of 4 files for each function at path: vnv_test\output\[*]\
Rtc_c55_TS_PERF_005\debug\trace_log\Rtc_TC_PERF_0501
00_trace_time_log.txt, 00_trace_time_log_tree, 00_trace_error_log.txt, 00_trace_params_log.txt
Command:
trace_extract.exe ..\..\output ..\..\output MPC574X ..\..\non_asr\sdk\test\test\specific\MPC574X\
release_configuration.txt ..\..\tools\templates\excel_header.xlsx ..\..\non_asr\sdk\test\test\specific\
MPC574X\TestReport.config S32SDK_MPC5748G
Detail parameter:
Param 1. Input is path to Lauterbach T32 logs: ..\..\output
Param 2. Output path at ..\..\output\
Param 3. Platform name is MPC574X
Param 4. Excel template path: config ..\..\tools\templates\excel_header.xlsx
Param 5. Report prefix: .\..\non_asr\sdk\test\test\specific\MPC574X\TestReport.
Param 6. Release configuration path at ..\..\non_asr\sdk\test\test\specific\ MPC574X \
release_configuration.txt
Param 7. Product name path: S32SDK_MPC5768G
Profiling data of the MPC77xx devices is collected via Nexus Aurora Trace interface. Lauterbach
provides MPC57xx NEXUS High Speed Serial Trace Port as following figure:
TraceTrigger: Stop the sampling to the trace buffer at the specified event. A trigger delay
is possible.
The following files implement configuration of V&V framework to work with MPC57xx NEXUS
High Speed Serial Trace Port.
1. get_system_params.cmm
- Get System Clock Value, Flash/RAM Latency, CACHE State and BTB state of the targeted
device.
2. trace_init.cmm.m4
- Reset and Initialize the Tracer
- T32 Performance Measurement Configuration for Nexus
- Set a breakpoint to start & stop the tracing
3. trace_performance_analysis.cmm.m4
Currently, S32SDK for MPC57xx uses METHOD 1 for trace, the file will:
- Create *_trace_time_log.txt file and save result for TRACE32 command:
TRACE.STATISTIC.FUNC %LEN 50 NAME ALL /SORT ADDRESS to it.
- Create *_trace_time_log_tree.txt and size result for TRACE32 command:
TRACE.STATISTIC.TREE %LEN 50
- Create *_trace_error_log.txt and size error log into it.
- Crate *_trace_params_log.txt and save value get from get_system_params.cmm