diff --git a/device/plugins/native_hook/src/hook_client.cpp b/device/plugins/native_hook/src/hook_client.cpp index c3b2c9916a6a2ed00596974cefabd40f7c17b61f..d6f8b5bca93840db3d7bd293e34d3d5aef8ced10 100644 --- a/device/plugins/native_hook/src/hook_client.cpp +++ b/device/plugins/native_hook/src/hook_client.cpp @@ -84,10 +84,7 @@ constexpr int STATUS_LINE_SIZE = 512; constexpr int PID_NAMESPACE_ID = 1; // 1: pid is 1 after pid namespace used constexpr int FD_PATH_LENGTH = 64; constexpr int MIN_SAMPLER_INTERVAL = 1; -constexpr int FIRST_HASH = 16; -constexpr int SECOND_HASH = 13; constexpr int THRESHOLD = 256; -constexpr int DIVIDE_VAL = 64; constexpr uintptr_t MAX_UNWIND_ADDR_RANGE = 16 * 1024; //5: fp mode is used, response_library_mode maximum stack depth #if defined(__aarch64__) @@ -98,9 +95,11 @@ std::shared_ptr g_midPartHandler = nullptr; #endif std::shared_ptr g_addrHandler = nullptr; static bool g_isPidChanged = false; -static struct mallinfo2 g_miStart = {0}; std::vector> g_filterStaLibRange; std::atomic targetedRange; +std::shared_ptr g_wholeAddrHandler = nullptr; +std::shared_ptr g_midPartHandler = nullptr; +std::shared_ptr g_addrHandler = nullptr; constexpr int MAX_BITPOOL_SIZE = 1000 * 1024; const MallocDispatchType* GetDispatch() diff --git a/device/plugins/native_hook/src/hook_socket_client.cpp b/device/plugins/native_hook/src/hook_socket_client.cpp index bbc7c3e032d1d308f8d4e30026f4f6204f63353b..23d718b5fa290cab9876f88426bebcd934a1f5b4 100644 --- a/device/plugins/native_hook/src/hook_socket_client.cpp +++ b/device/plugins/native_hook/src/hook_socket_client.cpp @@ -30,7 +30,6 @@ #include namespace { -constexpr int FLUSH_FLAG = 20; constexpr int ONLY_NMD_TYPE = 2; constexpr int SIMP_NMD = 3; std::atomic g_disableHook = true; diff --git a/device/plugins/native_hook/src/runtime_stack_range.cpp b/device/plugins/native_hook/src/runtime_stack_range.cpp index 95b2b62d378158a3f34f9ceee9575c32ed053291..337777d24192b6c7cb2a764fc93037851c480e8d 100644 --- a/device/plugins/native_hook/src/runtime_stack_range.cpp +++ b/device/plugins/native_hook/src/runtime_stack_range.cpp @@ -146,11 +146,6 @@ bool ParseTargetedMaps(std::atomic& targetedRange, std::string targetedLi return ret; } char mapInfo[256] = {0}; // 256: map info size - int pos = 0; - uint64_t begin = 0; - uint64_t end = 0; - uint64_t offset = 0; - char perms[5] = {0}; // 5:rwxp while (fgets(mapInfo, sizeof(mapInfo), fp) != nullptr) { if (strstr(mapInfo, targetedLib.c_str()) != nullptr) { std::string lineStr = mapInfo;