1# hidebug.h
2
3
4## 概述
5
6定义HiDebug模块的调试功能。
7
8**库:** libohhidebug.so
9
10**系统能力:** SystemCapability.HiviewDFX.HiProfiler.HiDebug
11
12**引用文件:** <hidebug/hidebug.h>
13
14**起始版本:** 12
15
16**相关模块:**[HiDebug](_hi_debug.md)
17
18
19## 汇总
20
21
22### 函数
23
24| 名称 | 描述 |
25| -------- | -------- |
26| double [OH_HiDebug_GetSystemCpuUsage](_hi_debug.md#oh_hidebug_getsystemcpuusage) () | 获取系统的CPU资源占用情况百分比。  |
27| double [OH_HiDebug_GetAppCpuUsage](_hi_debug.md#oh_hidebug_getappcpuusage) () | 获取进程的CPU使用率百分比。  |
28| [HiDebug_ThreadCpuUsagePtr](_hi_debug.md#hidebug_threadcpuusageptr) [OH_HiDebug_GetAppThreadCpuUsage](_hi_debug.md#oh_hidebug_getappthreadcpuusage) () | 获取应用所有线程CPU使用情况。  |
29| void [OH_HiDebug_FreeThreadCpuUsage](_hi_debug.md#oh_hidebug_freethreadcpuusage) ([HiDebug_ThreadCpuUsagePtr](_hi_debug.md#hidebug_threadcpuusageptr) \*threadCpuUsage) | 释放线程数据结构。  |
30| void [OH_HiDebug_GetSystemMemInfo](_hi_debug.md#oh_hidebug_getsystemmeminfo) ([HiDebug_SystemMemInfo](_hi_debug___system_mem_info.md) \*systemMemInfo) | 获取系统内存信息。  |
31| void [OH_HiDebug_GetAppNativeMemInfo](_hi_debug.md#oh_hidebug_getappnativememinfo) ([HiDebug_NativeMemInfo](_hi_debug___native_mem_info.md) \*nativeMemInfo) | 获取应用程序进程的内存信息。  |
32| void [OH_HiDebug_GetAppMemoryLimit](_hi_debug.md#oh_hidebug_getappmemorylimit) ([HiDebug_MemoryLimit](_hi_debug___memory_limit.md) \*memoryLimit) | 获取应用程序进程的内存限制。  |
33| [HiDebug_ErrorCode](_hi_debug.md#hidebug_errorcode) [OH_HiDebug_StartAppTraceCapture](_hi_debug.md#oh_hidebug_startapptracecapture) ([HiDebug_TraceFlag](_hi_debug.md#hidebug_traceflag) flag, uint64_t tags, uint32_t limitSize, char \*fileName, uint32_t length) | 启动应用trace采集。  |
34| [HiDebug_ErrorCode](_hi_debug.md#hidebug_errorcode) [OH_HiDebug_StopAppTraceCapture](_hi_debug.md#oh_hidebug_stopapptracecapture) () | 停止采集应用程序trace。  |
35| [HiDebug_ErrorCode](_hi_debug.md#hidebug_errorcode) [OH_HiDebug_GetGraphicsMemory](_hi_debug.md#oh_hidebug_getgraphicsmemory) ()     | 获取应用显存大小。   |
36