From 66ebe7a6d7ef42a08006327d99675223da47835c Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Wed, 3 Sep 2025 22:59:32 +0800 Subject: [PATCH] Remove arkinspector sources from arkruntime Signed-off-by: Rokashevich Svetlana Change-Id: If308f7cb4efea93d6eb7be237d30861d5884da2b --- .../ets_test_suite/tooling/CMakeLists.txt | 2 +- static_core/runtime/BUILD.gn | 2 - static_core/runtime/CMakeLists.txt | 2 - .../runtime/tooling/inspector/BUILD.gn | 1 + .../runtime/tooling/inspector/CMakeLists.txt | 48 +++++++++---------- static_core/runtime/tooling/tools.h | 8 ++-- 6 files changed, 29 insertions(+), 34 deletions(-) diff --git a/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt b/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt index 02d3054dcd..9e1e4c3edd 100644 --- a/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt +++ b/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt @@ -37,7 +37,7 @@ panda_ets_add_gtest( SOURCES ${ARG_CPP_SOURCE} LIBRARIES - arkbase arkfile arkruntime arkassembler + arkbase arkfile arkruntime arkassembler arkinspector SANITIZERS ${PANDA_SANITIZERS_LIST} PANDA_STD_LIB diff --git a/static_core/runtime/BUILD.gn b/static_core/runtime/BUILD.gn index 28912c1143..c98ba78db2 100644 --- a/static_core/runtime/BUILD.gn +++ b/static_core/runtime/BUILD.gn @@ -306,8 +306,6 @@ template("libarkruntime_set_static_template") { "tooling/debug_inf.cpp", "tooling/debugger.cpp", "tooling/evaluation/expression_loader.cpp", - "tooling/inspector/debugger_arkapi.cpp", - "tooling/inspector/types/profile_result.cpp", "tooling/pt_default_lang_extension.cpp", "tooling/pt_thread.cpp", "tooling/sampler/lock_free_queue.cpp", diff --git a/static_core/runtime/CMakeLists.txt b/static_core/runtime/CMakeLists.txt index b74b5d6116..dec8ddae68 100644 --- a/static_core/runtime/CMakeLists.txt +++ b/static_core/runtime/CMakeLists.txt @@ -31,8 +31,6 @@ set(SOURCES tooling/backtrace/backtrace.cpp tooling/debugger.cpp tooling/evaluation/expression_loader.cpp - tooling/inspector/debugger_arkapi.cpp - tooling/inspector/types/profile_result.cpp tooling/pt_default_lang_extension.cpp tooling/pt_thread.cpp tooling/debug_inf.cpp diff --git a/static_core/runtime/tooling/inspector/BUILD.gn b/static_core/runtime/tooling/inspector/BUILD.gn index 6e56d8383e..aff568a50d 100644 --- a/static_core/runtime/tooling/inspector/BUILD.gn +++ b/static_core/runtime/tooling/inspector/BUILD.gn @@ -26,6 +26,7 @@ libarkinspector_sources = [ "debugger/debuggable_thread.cpp", "debugger/object_repository.cpp", "debugger/thread_state.cpp", + "debugger_arkapi.cpp", "error.cpp", "evaluation/evaluation_engine.cpp", "init.cpp", diff --git a/static_core/runtime/tooling/inspector/CMakeLists.txt b/static_core/runtime/tooling/inspector/CMakeLists.txt index 2de1d900e8..6a482e75f0 100644 --- a/static_core/runtime/tooling/inspector/CMakeLists.txt +++ b/static_core/runtime/tooling/inspector/CMakeLists.txt @@ -26,6 +26,7 @@ set(ARKINSPECTOR_ROOTS debugger/debuggable_thread.cpp debugger/object_repository.cpp debugger/thread_state.cpp + debugger_arkapi.cpp error.cpp evaluation/evaluation_engine.cpp init.cpp @@ -111,28 +112,25 @@ panda_target_link_libraries(${PROJECT_NAME} panda_add_sanitizers(TARGET ${PROJECT_NAME} SANITIZERS ${PANDA_SANITIZERS_LIST}) -# NOTE(@srokashevich, #29188): enable with asan after fix -if (NOT PANDA_ENABLE_ADDRESS_SANITIZER) - panda_add_gtest( - NAME arkinspector_tests - NO_CORES - SOURCES - tests/base64.cpp - tests/debug_info_cache.cpp - tests/inspector_server.cpp - tests/json_object_matcher.cpp - tests/object_repository.cpp - tests/session_manager.cpp - tests/source_manager.cpp - tests/thread_state.cpp - INCLUDE_DIRS - ${PANDA_ROOT}/runtime/tooling/inspector - LIBRARIES - arkassembler - ${PROJECT_NAME} - arkruntime - gmock - SANITIZERS - ${PANDA_SANITIZERS_LIST} - ) -endif() +panda_add_gtest( + NAME arkinspector_tests + NO_CORES + SOURCES + tests/base64.cpp + tests/debug_info_cache.cpp + tests/inspector_server.cpp + tests/json_object_matcher.cpp + tests/object_repository.cpp + tests/session_manager.cpp + tests/source_manager.cpp + tests/thread_state.cpp + INCLUDE_DIRS + ${PANDA_ROOT}/runtime/tooling/inspector + LIBRARIES + arkassembler + ${PROJECT_NAME} + arkruntime + gmock + SANITIZERS + ${PANDA_SANITIZERS_LIST} +) diff --git a/static_core/runtime/tooling/tools.h b/static_core/runtime/tooling/tools.h index 677877a3bf..efef28516d 100644 --- a/static_core/runtime/tooling/tools.h +++ b/static_core/runtime/tooling/tools.h @@ -31,12 +31,12 @@ public: Tools() = default; ~Tools() = default; - void CreateSamplingProfiler(); - sampler::Sampler *GetSamplingProfiler(); + PANDA_PUBLIC_API void CreateSamplingProfiler(); + PANDA_PUBLIC_API sampler::Sampler *GetSamplingProfiler(); PANDA_PUBLIC_API bool StartSamplingProfiler(std::unique_ptr streamWriter, uint32_t interval); PANDA_PUBLIC_API void StopSamplingProfiler(); - void DestroySamplingProfiler(); - bool IsSamplingProfilerCreate(); + PANDA_PUBLIC_API void DestroySamplingProfiler(); + PANDA_PUBLIC_API bool IsSamplingProfilerCreate(); private: NO_COPY_SEMANTIC(Tools); -- Gitee