当前位置:网站首页>B_ QuRT_ User_ Guide(38)
B_ QuRT_ User_ Guide(38)
2022-07-07 23:30:00 【weixin_ thirty-eight million four hundred and ninety-eight thou】
B_QuRT_User_Guide(38)
24 Performance Monitor
Threads use performance monitors to measure code performance in real time during user program execution .
Performance monitoring unit (PMU) yes Hexagon A hardware function of the processor . It is controlled by accessing a set of dedicated processor registers .
The performance monitor is QuRT The following operations are used to control .- qurt_pmu_enable()
- qurt_pmu_get()
- qurt_pmu_set()
- Macros
24.1 qurt_pmu_enable()
24.1.1 Function document
24.1.1.1 void qurt_pmu_enable ( int enable )
Enable or disable Hexagon Processor performance monitoring unit (PMU). By default , Profiling is disabled .
Disabled by default .
Be careful : Enabling profiling does not automatically reset the count register – Must be done explicitly before starting the event count .
Parameters 
Return value
None.
Dependencies
None.
24.2 qurt_pmu_get()
24.2.1 Function document
24.2.1.1 unsigned int qurt_pmu_get ( int reg_id )
obtain PMU register .
Returns the specified PMU The current value of the register .
Parameters 
Return value
Integer - Appoint PMU The current value of the register .
Dependencies
None.
24.3 qurt_pmu_set()
24.3.1 Function document
24.3.1.1 void qurt_pmu_set ( int reg_id, unsigned int reg_value )
Set specified PMU Register value .
Be careful : Set up PMUEVTCFG It will automatically clear PMU register PMUCNT0 To PMUCNT3.
Parameters 
Return value
None.
Dependencies
None.
25 Error Results
QuRT The function returns an error result in one of two ways .
- As the result value of the function
- As the value passed to the user-defined exception handler
QuRT A set of standard symbols is defined for the error result value . This section lists these symbols and their corresponding values .
26 Function Tracing
QuRT Support function tracing to assist debugging programs .- qurt_trace_changed()
- qurt_trace_get_marker()
- qurt_etm_set_pc_range()
- qurt_etm_set_atb()
- qurt_stm_trace_set_config() - data type
- Macro instructions
26.1 qurt_trace_changed()
26.1.1 Function document
26.1.1.1 int qurt_trace_changed ( unsigned int prev_trace_marker, unsigned int trace_mask )
Determine whether a specific kernel event has occurred .
Returns a value , Indicates that since the specified kernel trace flag was obtained , Whether the specified kernel event is recorded in the kernel trace buffer .
prev_trace_marker Parameters are specified by calling qurt_trace_get_marker() Obtained kernel trace flags .
Be careful .
And qurt_trace_get_marker() Use it together , This function determines whether some kernel events occur in a code block .
This function cannot determine whether a specific kernel event type has occurred , Unless the event type is in trace_mask Element is enabled .
QuRT Only interrupt and context switching events are supported ( Such as trace_mask The value is 0x3).
Parameters 
Return value
1 - Since obtaining the specified trace mark , The specified type of kernel event has occurred .
0 - Since obtaining the specified trace mark , No kernel event of the specified type occurred .
Dependencies
None.
26.2 qurt_trace_get_marker()
26.2.1 Function document
26.2.1.1 unsigned int qurt_trace_get_marker ( void )
Get kernel trace flags .
Returns the current value of the kernel trace tag . The tag consists of a hardware thread identifier and an index of the kernel trace buffer . The trace buffer records various kernel events .
Be careful : Let's combine this function with qurt_trace_changed() Together, you can determine whether some kernel events occur in a code block .
Return value
Integer - Kernel trace flags .
Dependencies
None.
26.3 qurt_etm_set_pc_range()
26.3.1 Function document
26.3.1.1 unsigned int qurt_etm_set_pc_range ( unsigned int range_num, unsigned int low_addr, unsigned int high_addr )
Setting is used for ETM The filter PC Address range . according to Hexagon Core design , It can support up to four PC Range .
Parameters 
Return value
QURT_ETM_SETUP_OK - success .
QURT_ETM_SETUP_ERR - Failure .
Dependencies
None.
26.4 qurt_etm_set_atb()
26.4.1 Function document
26.4.1.1 unsigned int qurt_etm_set_atb ( unsigned int flag )
Set up ATB Status of the bus , To inform QuRT ATB The bus is actively enabled or disabled .QuRT perform
Perform corresponding actions under low power management .
Parameters 
Return value
QURT_ETM_SETUP_OK - success .
QURT_ETM_SETUP_ERR - Failure
Dependencies
None.
26.5 qurt_stm_trace_set_config()
26.5.1 Function document
26.5.1.1 unsigned int qurt_stm_trace_set_config ( qurt_stm_trace_info_t ∗ stm_config_info )
Set up a STM Ports are used to track events .
Parameters 
Return value
QURT_EOK - success .
QURT_EINVALID - Failure ; It may be because the port address passed is not in the page table .
Dependencies
None.
26.6 Data Types
This section introduces the data types of function tracking service .
26.6.1 Data Structure Documentation
26.6.1.1 struct qurt_stm_trace_info_t
26.7 Macros
STM Tracking information .
26.7.1 Define Documentation 26.7.1.1 #define QURT_ETM_SETUP_OK 0
ETM setup OK.
26.7.1.2 #define QURT_ETM_SETUP_ERR 1
ETM setup error.
26.7.1.3
ATB off.
26.7.1.4
ATB on.
26.7.1.5 #define QURT_TRACE( str, … ) VA_ARGS
Function tracing is through a debug macro (QURT_TRACE) Realized , It can choose to generate printf
sentence , Before and after every function call passed as a macro parameter . for example , The following macro calls in the source code :
QURT_TRACE(myfunc, my_func(33))
The following debug output is generated :
myfile:nnn: my_func >>> calling my_func(33)
myfile:nnn: my_func >>> returned my_func(33)
The debug output includes the source file and line number of the function call , And the text of the call itself . When compiling the client source file , Its file name is defined -D FILENAME.
Debug output is to use functions in the Library qurt_printf Generated . Symbol QURT_DEBUG Control the generation of debug output . If this symbol is not defined , Function trace will not be generated .
Be careful : Debug macro is passed QuRT API Header file access .
边栏推荐
- 系统设计概述
- UE4_UE5蓝图command节点的使用(开启关闭屏幕响应-log-发布全屏显示)
- USB (XVI) 2022-04-28
- PCI-Express接口的PCB布线规则
- Opencv scalar passes in three parameters, which can only be displayed in black, white and gray. Solve the problem
- LDO voltage stabilizing chip - internal block diagram and selection parameters
- UE4_ Ue5 panoramic camera
- Live-Server使用
- Solution: prompt "unsupported video format" when inserting avi format video into the message
- Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
猜你喜欢

B_QuRT_User_Guide(36)

Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting

One week learning summary of STL Standard Template Library
![Given an array, such as [7864, 284, 347, 7732, 8498], now you need to splice the numbers in the array to return the](/img/21/2e99dd6173ab4925ec22290cd4a357.png)
Given an array, such as [7864, 284, 347, 7732, 8498], now you need to splice the numbers in the array to return the "largest possible number."

UE4_ Ue5 combined with Logitech handle (F710) use record

Matlab-SEIR传染病模型预测

LDO稳压芯片-内部框图及选型参数

Mobile heterogeneous computing technology - GPU OpenCL programming (basic)

MySQL Index Optimization Practice II

UE4_UE5结合罗技手柄(F710)使用记录
随机推荐
Installing spss25
RE1 attack and defense world reverse
违法行为分析1
USB (XIV) 2022-04-12
B_ QuRT_ User_ Guide(40)
ROS2专题(03):ROS1和ROS2的区别【02】
云原生正在吞噬一切,开发者该如何应对?
Vs extension tool notes
LM12丨Rolling Heikin Ashi二重K线滤波器
Live-Server使用
Matlab 信号处理【问答随笔·2】
Unity3d Learning Notes 6 - GPU instantiation (1)
FPGA basics catalog
Unity3D学习笔记4——创建Mesh高级接口
统计电影票房排名前10的电影并存入还有一个文件
PHP uses Alibaba cloud storage
Entity层、DAO层、Service层、Controller层 先后顺序
Technology at home and abroad people "see" the future of audio and video technology
Experience sharing of system architecture designers in preparing for the exam: the direction of paper writing
USB (XVI) 2022-04-28