From 4d04192ba8f03d889b923bcc4644d51e725a408b Mon Sep 17 00:00:00 2001 From: ganchuantao1 Date: Thu, 12 Jun 2025 11:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=20=20=E5=9B=9E=E9=80=80=20=E9=80=82?= =?UTF-8?q?=E9=85=8D=E8=87=AA=E5=AE=9A=E4=B9=89dispatch=20table,=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0ndk=20=E6=8E=A5=E5=8F=A3=20=20=20=20=20Signed-off-by:g?= =?UTF-8?q?anchuantao1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao1 --- hiviewdfx/hidebug/include/hidebug/hidebug.h | 27 ------------------- .../hidebug/include/hidebug/hidebug_type.h | 16 ----------- hiviewdfx/hidebug/libhidebug.ndk.json | 13 --------- 3 files changed, 56 deletions(-) diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug.h b/hiviewdfx/hidebug/include/hidebug/hidebug.h index 7b3c7756d..02bf031a4 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug.h @@ -151,33 +151,6 @@ HiDebug_ErrorCode OH_HiDebug_StopAppTraceCapture(); */ HiDebug_ErrorCode OH_HiDebug_GetGraphicsMemory(uint32_t *value); -/** - * @brief Replace MallocDispatch table with developer customized memory functions. - * - * @param dispatchTable Indicates pointer of custom dispatch table. - * @return Result code - * {@link HIDEBUG_SUCCESS} Set customized dispatch table success. - * {@link HIDEBUG_INVALID_ARGUMENT} Invalid argument, dispatchTable is null pointer - * @since 20 - */ -HiDebug_ErrorCode OH_HiDebug_SetMallocDispatchTable(struct HiDebug_MallocDispatch *dispatchTable); - -/** - * @brief Obtain current MallocDispatch table. - * - * @return The default dispatch table of malloc function. - - * @since 20 - */ -HiDebug_MallocDispatch* OH_HiDebug_GetDefaultMallocDispatchTable(void); - -/** - * @brief Restore original MallocDispatch table. - * - * @since 20 - */ -void OH_HiDebug_RestoreMallocDispatchTable(void); - /** * @brief Get backtrace frames start from the given frame pointer and the function is signal-safe. * diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h index 4779148f8..a4ed43c1c 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h @@ -39,8 +39,6 @@ #define HIVIEWDFX_HIDEBUG_TYPE_H #include -#include -#include #ifdef __cplusplus extern "C" { #endif // __cplusplus @@ -181,20 +179,6 @@ typedef enum HiDebug_TraceFlag { HIDEBUG_TRACE_FLAG_ALL_THREADS = 2 } HiDebug_TraceFlag; -/** - * @brief Defines structure type of malloc dispatch table. - * - * @since 20 -*/ -typedef struct HiDebug_MallocDispatch { - void* (*malloc)(size_t); - void* (*calloc)(size_t, size_t); - void* (*realloc)(void*, size_t); - void (*free)(void*); - void* (*mmap) (void*, size_t, int, int, int, off_t); - int (*munmap) (void*, size_t); -} HiDebug_MallocDispatch; - /** * @brief Defines Js stack frame content * diff --git a/hiviewdfx/hidebug/libhidebug.ndk.json b/hiviewdfx/hidebug/libhidebug.ndk.json index d9862a9ca..422952c97 100644 --- a/hiviewdfx/hidebug/libhidebug.ndk.json +++ b/hiviewdfx/hidebug/libhidebug.ndk.json @@ -39,18 +39,6 @@ "first_introduced": "14", "name": "OH_HiDebug_GetGraphicsMemory" }, - { - "first_introduced": "20", - "name": "OH_HiDebug_SetMallocDispatchTable" - }, - { - "first_introduced": "20", - "name": "OH_HiDebug_GetDefaultMallocDispatchTable" - }, - { - "first_introduced": "20", - "name": "OH_HiDebug_RestoreMallocDispatchTable" - }, { "first_introduced": "20", "name": "OH_HiDebug_BacktraceFromFp" @@ -67,5 +55,4 @@ "first_introduced": "20", "name": "OH_HiDebug_DestroyBacktraceObject" } - ] \ No newline at end of file -- Gitee