From 69760e0e9a79b6f0c9afd0a0a24a3127c5fd0dca Mon Sep 17 00:00:00 2001 From: wenlong_12 Date: Tue, 8 Oct 2024 13:53:59 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=20=20arkts-plugin=20=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=97=A5=E8=90=BD=20=20=20=20=20Signed-off-by:wenlong12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wenlong_12 --- device/BUILD.gn | 2 - device/cmds/BUILD.gn | 1 - device/cmds/src/parse_plugin_config.cpp | 19 - device/cmds/test/BUILD.gn | 1 - .../test/unittest/hiprofiler_cmd_test.cpp | 55 -- .../unittest/parse_plugin_config_test.cpp | 1 - device/ohos_test.xml | 10 - device/plugins/arkts_plugin/BUILD.gn | 69 --- .../arkts_plugin/include/arkts_plugin.h | 79 --- .../plugins/arkts_plugin/libarkts_plugin.map | 8 - .../plugins/arkts_plugin/src/arkts_module.cpp | 63 -- .../plugins/arkts_plugin/src/arkts_plugin.cpp | 579 ------------------ device/plugins/arkts_plugin/test/BUILD.gn | 60 -- .../test/resources/entry-default-signed.hap | Bin 445970 -> 0 bytes .../test/unittest/arkts_plugin_unittest.cpp | 132 ---- protos/types/plugins/arkts_plugin/BUILD.gn | 105 ---- .../arkts_plugin/arkts_plugin_config.proto | 36 -- .../arkts_plugin/arkts_plugin_result.proto | 19 - 18 files changed, 1239 deletions(-) mode change 100755 => 100644 device/cmds/src/parse_plugin_config.cpp delete mode 100644 device/plugins/arkts_plugin/BUILD.gn delete mode 100644 device/plugins/arkts_plugin/include/arkts_plugin.h delete mode 100644 device/plugins/arkts_plugin/libarkts_plugin.map delete mode 100644 device/plugins/arkts_plugin/src/arkts_module.cpp delete mode 100644 device/plugins/arkts_plugin/src/arkts_plugin.cpp delete mode 100644 device/plugins/arkts_plugin/test/BUILD.gn delete mode 100644 device/plugins/arkts_plugin/test/resources/entry-default-signed.hap delete mode 100644 device/plugins/arkts_plugin/test/unittest/arkts_plugin_unittest.cpp delete mode 100644 protos/types/plugins/arkts_plugin/BUILD.gn delete mode 100644 protos/types/plugins/arkts_plugin/arkts_plugin_config.proto delete mode 100644 protos/types/plugins/arkts_plugin/arkts_plugin_result.proto diff --git a/device/BUILD.gn b/device/BUILD.gn index 7d74439ef..9829ad004 100644 --- a/device/BUILD.gn +++ b/device/BUILD.gn @@ -18,7 +18,6 @@ group("hiprofiler_targets") { deps = [ "cmds:hiprofiler_cmd", "plugins/api:hiprofiler_plugins", - "plugins/arkts_plugin:arktsplugin", "plugins/cpu_plugin:cpudataplugin", "plugins/diskio_plugin:diskiodataplugin", "plugins/ffrt_profiler/client:libffrt_profiler", @@ -62,7 +61,6 @@ group("unittest") { "base/test:unittest", "cmds/test:unittest", "plugins/api/test:unittest", - "plugins/arkts_plugin/test:unittest", "plugins/cpu_plugin/test:unittest", "plugins/diskio_plugin/test:unittest", "plugins/ffrt_profiler/test:unittest", diff --git a/device/cmds/BUILD.gn b/device/cmds/BUILD.gn index db7f7942c..02f610926 100644 --- a/device/cmds/BUILD.gn +++ b/device/cmds/BUILD.gn @@ -37,7 +37,6 @@ ohos_executable("hiprofiler_cmd") { "${OHOS_PROFILER_DIR}/device/base:hiprofiler_base", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_proto", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_type_source", - "${OHOS_PROFILER_DIR}/protos/types/plugins/arkts_plugin:arkts_plugin_cpp_standard", "${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_plugin_config_cpp_standard", "${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_plugin_config_cpp_standard", "${OHOS_PROFILER_DIR}/protos/types/plugins/ffrt_profiler:ffrt_profiler_cpp_standard", diff --git a/device/cmds/src/parse_plugin_config.cpp b/device/cmds/src/parse_plugin_config.cpp old mode 100755 new mode 100644 index a0477e8a2..46ebb4bdb --- a/device/cmds/src/parse_plugin_config.cpp +++ b/device/cmds/src/parse_plugin_config.cpp @@ -23,7 +23,6 @@ #include "hilog_plugin_config_standard.pb.h" #include "hiperf_plugin_config_standard.pb.h" #include "hisysevent_plugin_config_standard.pb.h" -#include "arkts_plugin_config_standard.pb.h" #include "memory_plugin_common_standard.pb.h" #include "memory_plugin_config_standard.pb.h" #include "native_hook_config_standard.pb.h" @@ -128,8 +127,6 @@ bool ParsePluginConfig::SetSerializePluginsConfig(const std::string& pluginName, ret = SetSerializeHiperfConfig(pluginName, pluginConfig); } else if (pluginName == "hisysevent-plugin") { ret = SetSerializeHisyseventConfig(pluginName, pluginConfig); - } else if (pluginName == "arkts-plugin") { - ret = SetSerializeArkTSConfig(pluginName, pluginConfig); } else if (pluginName == "xpower-plugin") { ret = SetSerializeXpowerConfig(pluginName, pluginConfig); } else if (pluginName == "gpu-plugin") { @@ -369,22 +366,6 @@ bool ParsePluginConfig::SetSerializeHisyseventConfig(const std::string& pluginNa return true; } -bool ParsePluginConfig::SetSerializeArkTSConfig(const std::string& pluginName, ProfilerPluginConfig& pluginConfig) -{ - std::string configData = pluginConfigMap[pluginName]; - auto arkTSConfigNolite = std::make_unique(); - if (!parser_.ParseFromString(configData, arkTSConfigNolite.get())) { - return false; - } - - std::vector configDataVec(arkTSConfigNolite->ByteSizeLong()); - if (arkTSConfigNolite->SerializeToArray(configDataVec.data(), configDataVec.size()) <= 0) { - return false; - } - pluginConfig.set_config_data(static_cast(configDataVec.data()), configDataVec.size()); - return true; -} - bool ParsePluginConfig::SetSerializeXpowerConfig(const std::string& pluginName, ProfilerPluginConfig& pluginConfig) { std::string configData = pluginConfigMap[pluginName]; diff --git a/device/cmds/test/BUILD.gn b/device/cmds/test/BUILD.gn index 42cbf32dd..578f8d441 100644 --- a/device/cmds/test/BUILD.gn +++ b/device/cmds/test/BUILD.gn @@ -33,7 +33,6 @@ ohos_unittest("hiprofiler_cmd_ut") { "${OHOS_PROFILER_DIR}/device/base:hiprofiler_base", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_proto", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_type_source", - "${OHOS_PROFILER_DIR}/protos/types/plugins/arkts_plugin:arkts_plugin_cpp_standard", "${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_plugin_config_cpp_standard", "${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_plugin_config_cpp_standard", "${OHOS_PROFILER_DIR}/protos/types/plugins/ffrt_profiler:ffrt_profiler_cpp_standard", diff --git a/device/cmds/test/unittest/hiprofiler_cmd_test.cpp b/device/cmds/test/unittest/hiprofiler_cmd_test.cpp index a94e8ada7..ab92ea8bf 100644 --- a/device/cmds/test/unittest/hiprofiler_cmd_test.cpp +++ b/device/cmds/test/unittest/hiprofiler_cmd_test.cpp @@ -368,36 +368,6 @@ public: return cmdStr; } - std::string CreateSplitArktsCommand(const std::string &outFile, const std::string &arktsSplitFile, int time) const - { - std::string cmdStr = - "hiprofiler_cmd -s -k \\\n" - "-c - \\\n"; - cmdStr += "-o " + outFile + " \\\n"; - cmdStr += "-t " + std::to_string(time) + " \\\n" - "< - - - - - -