From 147f8038a5dc1e2c17f4caa1bcc88ec2ffc7ac1d Mon Sep 17 00:00:00 2001 From: wenlong_12 Date: Mon, 2 Dec 2024 10:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=20=20hiprofiler=20test=20=E9=83=A8?= =?UTF-8?q?=E4=BB=B6=E4=BE=9D=E8=B5=96=E6=95=B4=E6=94=B9=20=20=20=20=20Sig?= =?UTF-8?q?ned-off-by:wenlong12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wenlong_12 --- device/plugins/api/test/BUILD.gn | 1 + .../test/fuzztest/plugincreatesessioncmd_fuzzer/BUILD.gn | 1 + .../test/fuzztest/plugindestroysessioncmd_fuzzer/BUILD.gn | 1 + .../test/fuzztest/pluginstartsessioncmd_fuzzer/BUILD.gn | 1 + .../api/test/fuzztest/pluginstopsessioncmd_fuzzer/BUILD.gn | 1 + device/plugins/cpu_plugin/BUILD.gn | 1 + .../test/fuzztest/cpustartplugin_fuzzer/BUILD.gn | 1 - device/plugins/diskio_plugin/BUILD.gn | 1 + .../test/fuzztest/diskiostartplugin_fuzzer/BUILD.gn | 1 - device/plugins/ffrt_profiler/test/BUILD.gn | 1 + device/plugins/ftrace_plugin/BUILD.gn | 1 + device/plugins/ftrace_plugin/test/BUILD.gn | 2 +- .../device_kernel_version/6.6.30/event_parsers/BUILD.gn | 1 + .../device_kernel_version/default/event_parsers/BUILD.gn | 1 + .../test/fuzztest/hilogstartplugin_fuzzer/BUILD.gn | 1 - .../test/fuzztest/hiperfstartplugin_fuzzer/BUILD.gn | 1 - .../test/fuzztest/memorystartplugin_fuzzer/BUILD.gn | 1 - device/plugins/native_hook/test/BUILD.gn | 1 - .../test/fuzztest/networkstartplugin_fuzzer/BUILD.gn | 1 - device/plugins/network_profiler/service/BUILD.gn | 1 + hiebpf/BUILD.gn | 7 +++++-- proto_encoder/BUILD.gn | 1 - proto_encoder/test/BUILD.gn | 1 + 23 files changed, 19 insertions(+), 11 deletions(-) diff --git a/device/plugins/api/test/BUILD.gn b/device/plugins/api/test/BUILD.gn index 8b369b5a3..28ee6b9b6 100644 --- a/device/plugins/api/test/BUILD.gn +++ b/device/plugins/api/test/BUILD.gn @@ -50,6 +50,7 @@ ohos_unittest("hiprofiler_plugins_ut") { configs = [ ":cflags_config" ] external_deps = [ "abseil-cpp:absl_sync", + "bounds_checking_function:libsec_shared", "googletest:gmock", "googletest:gtest", "grpc:grpc", diff --git a/device/plugins/api/test/fuzztest/plugincreatesessioncmd_fuzzer/BUILD.gn b/device/plugins/api/test/fuzztest/plugincreatesessioncmd_fuzzer/BUILD.gn index 0c060f18f..1eaf4e6b7 100644 --- a/device/plugins/api/test/fuzztest/plugincreatesessioncmd_fuzzer/BUILD.gn +++ b/device/plugins/api/test/fuzztest/plugincreatesessioncmd_fuzzer/BUILD.gn @@ -33,6 +33,7 @@ ohos_fuzztest("PluginCreateSessionCmdFuzzTest") { "../../..:plugins_sources", ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "protobuf:protobuf_lite", ] diff --git a/device/plugins/api/test/fuzztest/plugindestroysessioncmd_fuzzer/BUILD.gn b/device/plugins/api/test/fuzztest/plugindestroysessioncmd_fuzzer/BUILD.gn index d1295ab3f..9c4f3f28a 100644 --- a/device/plugins/api/test/fuzztest/plugindestroysessioncmd_fuzzer/BUILD.gn +++ b/device/plugins/api/test/fuzztest/plugindestroysessioncmd_fuzzer/BUILD.gn @@ -33,6 +33,7 @@ ohos_fuzztest("PluginDestroySessionCmdFuzzTest") { "../../..:plugins_sources", ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "protobuf:protobuf_lite", ] diff --git a/device/plugins/api/test/fuzztest/pluginstartsessioncmd_fuzzer/BUILD.gn b/device/plugins/api/test/fuzztest/pluginstartsessioncmd_fuzzer/BUILD.gn index 2f52be092..8e8c22563 100644 --- a/device/plugins/api/test/fuzztest/pluginstartsessioncmd_fuzzer/BUILD.gn +++ b/device/plugins/api/test/fuzztest/pluginstartsessioncmd_fuzzer/BUILD.gn @@ -33,6 +33,7 @@ ohos_fuzztest("PluginStartSessionCmdFuzzTest") { "../../..:plugins_sources", ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "protobuf:protobuf_lite", ] diff --git a/device/plugins/api/test/fuzztest/pluginstopsessioncmd_fuzzer/BUILD.gn b/device/plugins/api/test/fuzztest/pluginstopsessioncmd_fuzzer/BUILD.gn index 30c1b07e8..a21bb13a7 100644 --- a/device/plugins/api/test/fuzztest/pluginstopsessioncmd_fuzzer/BUILD.gn +++ b/device/plugins/api/test/fuzztest/pluginstopsessioncmd_fuzzer/BUILD.gn @@ -33,6 +33,7 @@ ohos_fuzztest("PluginStopSessionCmdFuzzTest") { "../../..:plugins_sources", ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "protobuf:protobuf_lite", ] diff --git a/device/plugins/cpu_plugin/BUILD.gn b/device/plugins/cpu_plugin/BUILD.gn index 9d7fb0b0a..8929a004d 100644 --- a/device/plugins/cpu_plugin/BUILD.gn +++ b/device/plugins/cpu_plugin/BUILD.gn @@ -36,6 +36,7 @@ ohos_source_set("cpudataplugin_source") { if (current_toolchain != host_toolchain) { defines = [ "HAVE_HILOG" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "hisysevent:libhisysevent", "protobuf:protobuf_lite", diff --git a/device/plugins/cpu_plugin/test/fuzztest/cpustartplugin_fuzzer/BUILD.gn b/device/plugins/cpu_plugin/test/fuzztest/cpustartplugin_fuzzer/BUILD.gn index 34cdda708..90847ee8f 100644 --- a/device/plugins/cpu_plugin/test/fuzztest/cpustartplugin_fuzzer/BUILD.gn +++ b/device/plugins/cpu_plugin/test/fuzztest/cpustartplugin_fuzzer/BUILD.gn @@ -41,7 +41,6 @@ ohos_fuzztest("CpuStartPluginFuzzTest") { "../../../../api/include", "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", - "//third_party/bounds_checking_function/include", ] } diff --git a/device/plugins/diskio_plugin/BUILD.gn b/device/plugins/diskio_plugin/BUILD.gn index f98489554..798bb04fc 100644 --- a/device/plugins/diskio_plugin/BUILD.gn +++ b/device/plugins/diskio_plugin/BUILD.gn @@ -37,6 +37,7 @@ ohos_source_set("diskiodataplugin_source") { if (current_toolchain != host_toolchain) { defines = [ "HAVE_HILOG" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "hisysevent:libhisysevent", "protobuf:protobuf_lite", diff --git a/device/plugins/diskio_plugin/test/fuzztest/diskiostartplugin_fuzzer/BUILD.gn b/device/plugins/diskio_plugin/test/fuzztest/diskiostartplugin_fuzzer/BUILD.gn index e14f6130c..feafb0cd7 100644 --- a/device/plugins/diskio_plugin/test/fuzztest/diskiostartplugin_fuzzer/BUILD.gn +++ b/device/plugins/diskio_plugin/test/fuzztest/diskiostartplugin_fuzzer/BUILD.gn @@ -41,7 +41,6 @@ ohos_fuzztest("DiskioStartPluginFuzzTest") { "../../../../api/include", "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", - "//third_party/bounds_checking_function/include", ] } diff --git a/device/plugins/ffrt_profiler/test/BUILD.gn b/device/plugins/ffrt_profiler/test/BUILD.gn index 96d5e765d..11bd38d82 100644 --- a/device/plugins/ffrt_profiler/test/BUILD.gn +++ b/device/plugins/ffrt_profiler/test/BUILD.gn @@ -89,6 +89,7 @@ ohos_unittest("ffrt_profiler_ut") { ] external_deps = [ + "bounds_checking_function:libsec_shared", "googletest:gtest", "hilog:libhilog_base", "init:libbegetutil", diff --git a/device/plugins/ftrace_plugin/BUILD.gn b/device/plugins/ftrace_plugin/BUILD.gn index 4755e21ef..f42a4a3ba 100644 --- a/device/plugins/ftrace_plugin/BUILD.gn +++ b/device/plugins/ftrace_plugin/BUILD.gn @@ -69,6 +69,7 @@ ohos_shared_library("ftrace_plugin") { if (current_toolchain != host_toolchain) { defines = [ "HAVE_HILOG" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "hiview:libucollection_client", "init:libbegetutil", diff --git a/device/plugins/ftrace_plugin/test/BUILD.gn b/device/plugins/ftrace_plugin/test/BUILD.gn index c48112e62..2c01e7f50 100644 --- a/device/plugins/ftrace_plugin/test/BUILD.gn +++ b/device/plugins/ftrace_plugin/test/BUILD.gn @@ -50,7 +50,6 @@ ohos_unittest("ftrace_plugin_ut") { "../../../memory_plugin/include", "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", - "//commonlibrary/c_utils/base/include", ] cflags = [ "-Wno-inconsistent-missing-override", @@ -58,6 +57,7 @@ ohos_unittest("ftrace_plugin_ut") { ] external_deps = [ "bounds_checking_function:libsec_shared", + "c_utils:utils", "googletest:gtest", "hilog:libhilog_base", "hiview:libucollection_client", diff --git a/device/plugins/ftrace_plugin/tools/device_kernel_version/6.6.30/event_parsers/BUILD.gn b/device/plugins/ftrace_plugin/tools/device_kernel_version/6.6.30/event_parsers/BUILD.gn index de1d7676b..5a4449141 100644 --- a/device/plugins/ftrace_plugin/tools/device_kernel_version/6.6.30/event_parsers/BUILD.gn +++ b/device/plugins/ftrace_plugin/tools/device_kernel_version/6.6.30/event_parsers/BUILD.gn @@ -31,6 +31,7 @@ ohos_source_set("ftrace_event_parsers") { if (current_toolchain != host_toolchain) { defines = [ "HAVE_HILOG" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "protobuf:protobuf_lite", ] diff --git a/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_parsers/BUILD.gn b/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_parsers/BUILD.gn index de1d7676b..5a4449141 100644 --- a/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_parsers/BUILD.gn +++ b/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_parsers/BUILD.gn @@ -31,6 +31,7 @@ ohos_source_set("ftrace_event_parsers") { if (current_toolchain != host_toolchain) { defines = [ "HAVE_HILOG" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog_base", "protobuf:protobuf_lite", ] diff --git a/device/plugins/hilog_plugin/test/fuzztest/hilogstartplugin_fuzzer/BUILD.gn b/device/plugins/hilog_plugin/test/fuzztest/hilogstartplugin_fuzzer/BUILD.gn index b9d7b87f0..3aac6ef90 100644 --- a/device/plugins/hilog_plugin/test/fuzztest/hilogstartplugin_fuzzer/BUILD.gn +++ b/device/plugins/hilog_plugin/test/fuzztest/hilogstartplugin_fuzzer/BUILD.gn @@ -40,7 +40,6 @@ ohos_fuzztest("HilogStartPluginFuzzTest") { "../../../../api/include", "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", - "//third_party/bounds_checking_function/include", ] } diff --git a/device/plugins/hiperf_plugin/test/fuzztest/hiperfstartplugin_fuzzer/BUILD.gn b/device/plugins/hiperf_plugin/test/fuzztest/hiperfstartplugin_fuzzer/BUILD.gn index 4ee5e8d25..354f3dff4 100644 --- a/device/plugins/hiperf_plugin/test/fuzztest/hiperfstartplugin_fuzzer/BUILD.gn +++ b/device/plugins/hiperf_plugin/test/fuzztest/hiperfstartplugin_fuzzer/BUILD.gn @@ -44,7 +44,6 @@ ohos_fuzztest("HiperfStartPluginFuzzTest") { "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", "${OHOS_PROFILER_DIR}/device/services/profiler_service/src", - "//commonlibrary/c_utils/base/include", ] defines = [ "LITE_PROTO" ] external_deps = [ diff --git a/device/plugins/memory_plugin/test/fuzztest/memorystartplugin_fuzzer/BUILD.gn b/device/plugins/memory_plugin/test/fuzztest/memorystartplugin_fuzzer/BUILD.gn index 7fb1aa667..24a1840b0 100644 --- a/device/plugins/memory_plugin/test/fuzztest/memorystartplugin_fuzzer/BUILD.gn +++ b/device/plugins/memory_plugin/test/fuzztest/memorystartplugin_fuzzer/BUILD.gn @@ -45,7 +45,6 @@ ohos_fuzztest("MemoryStartPluginFuzzTest") { "../../../../api/include", "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", - "//third_party/bounds_checking_function/include", ] } diff --git a/device/plugins/native_hook/test/BUILD.gn b/device/plugins/native_hook/test/BUILD.gn index cd6696bb0..4ccef300a 100644 --- a/device/plugins/native_hook/test/BUILD.gn +++ b/device/plugins/native_hook/test/BUILD.gn @@ -64,7 +64,6 @@ ohos_unittest("nativehook_ut") { "${OHOS_PROFILER_DIR}/device/services/ipc/include", "${OHOS_PROFILER_DIR}/device/services/shared_memory/include", "${OHOS_PROFILER_DIR}/device/services/profiler_service/include", - "//third_party/musl/include/musl_preinit_common.h", ] cflags = [ diff --git a/device/plugins/network_plugin/test/fuzztest/networkstartplugin_fuzzer/BUILD.gn b/device/plugins/network_plugin/test/fuzztest/networkstartplugin_fuzzer/BUILD.gn index 90b63a2c7..d192e1fb3 100644 --- a/device/plugins/network_plugin/test/fuzztest/networkstartplugin_fuzzer/BUILD.gn +++ b/device/plugins/network_plugin/test/fuzztest/networkstartplugin_fuzzer/BUILD.gn @@ -42,7 +42,6 @@ ohos_fuzztest("NetworkStartPluginFuzzTest") { "../../../../api/include", "${OHOS_PROFILER_DIR}/interfaces/kits", "${OHOS_PROFILER_DIR}/device/base/include", - "//third_party/bounds_checking_function/include", ] } diff --git a/device/plugins/network_profiler/service/BUILD.gn b/device/plugins/network_profiler/service/BUILD.gn index 8e76a46de..e48385e7e 100644 --- a/device/plugins/network_profiler/service/BUILD.gn +++ b/device/plugins/network_profiler/service/BUILD.gn @@ -49,6 +49,7 @@ ohos_source_set("network_profiler_service") { ] external_deps = [ + "bounds_checking_function:libsec_shared", "hisysevent:libhisysevent", "init:libbegetutil", "protobuf:protobuf_lite", diff --git a/hiebpf/BUILD.gn b/hiebpf/BUILD.gn index 72f2d721b..bf92c5d61 100644 --- a/hiebpf/BUILD.gn +++ b/hiebpf/BUILD.gn @@ -40,7 +40,6 @@ config("common_config") { include_dirs = [ "$skel_out_dir", "./include", - "//third_party/libbpf/src", ] } @@ -80,6 +79,7 @@ ohos_source_set("hiebpf.bpf") { ":common_config", ":kern_common_config", ] + external_deps = [ "libbpf:libbpf" ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" output_name = "hiebpf.bpf.o" @@ -138,7 +138,10 @@ ohos_executable("hiebpf") { sources = [ "./src/hiebpf.cpp" ] # this is main() deps = [ ":hiebpf_source_common" ] - external_deps = [ "bounds_checking_function:libsec_shared" ] + external_deps = [ + "bounds_checking_function:libsec_shared", + "libbpf:libbpf", + ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" output_name = "hiebpf" diff --git a/proto_encoder/BUILD.gn b/proto_encoder/BUILD.gn index 6d1ea2e43..b67840d43 100644 --- a/proto_encoder/BUILD.gn +++ b/proto_encoder/BUILD.gn @@ -17,7 +17,6 @@ import("//developtools/profiler/device/base/config.gni") config("proto_encoder_config") { include_dirs = [ "include", - "//third_party/bounds_checking_function/include", "${OHOS_PROFILER_DIR}/interfaces/kits", ] } diff --git a/proto_encoder/test/BUILD.gn b/proto_encoder/test/BUILD.gn index 3ded4baf4..e608a22f1 100644 --- a/proto_encoder/test/BUILD.gn +++ b/proto_encoder/test/BUILD.gn @@ -83,6 +83,7 @@ ohos_unittest("proto_encoder_ut") { "$proto_out_dir", ] external_deps = [ + "bounds_checking_function:libsec_shared", "googletest:gtest", "protobuf:protobuf_lite", ]