From 458b5b12f087d3eae1ea7dcf811d68da8e5fe704 Mon Sep 17 00:00:00 2001 From: zyxzyx Date: Fri, 12 Sep 2025 11:47:38 +0800 Subject: [PATCH] enable hook gpu Signed-off-by: zyxzyx --- device/plugins/native_daemon/include/hook_common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/device/plugins/native_daemon/include/hook_common.h b/device/plugins/native_daemon/include/hook_common.h index 85aebb9b6..272cef782 100644 --- a/device/plugins/native_daemon/include/hook_common.h +++ b/device/plugins/native_daemon/include/hook_common.h @@ -24,6 +24,7 @@ #include "register.h" #include "utilities.h" +#include #define MAX_THREAD_NAME (32) #define MAX_UNWIND_DEPTH (100) @@ -38,6 +39,14 @@ constexpr int32_t MIN_STACK_DEPTH = 6; // filter two layers of dwarf stack in libnative_hook.z.so const size_t FILTER_STACK_DEPTH = 2; const size_t MAX_CALL_FRAME_UNWIND_SIZE = MAX_UNWIND_DEPTH + FILTER_STACK_DEPTH; +const size_t GPU_TYPE_COUNT = 5; +const size_t GPU_RANGE_COUNT = 2; +const size_t GPU_VK_INDEX = 0; +const size_t GPU_GLES_IMAGE_INDEX = 1; +const size_t GPU_GLES_BUFFER_INDEX = 2; +const size_t GPU_CL_IMAGE_INDEX = 3; +const size_t GPU_CL_BUFFER_INDEX = 4; + // dlopen function minimum stack depth const int32_t DLOPEN_MIN_UNWIND_DEPTH = 5; // default max js stack depth -- Gitee