mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-27 00:51:47 +00:00
部件独立编译整改
Signed-off-by:shuxinyi4 <shuxinyi4@h-partners.com> Signed-off-by: wenlong_12 <wenlong12@huawei.com>
This commit is contained in:
parent
62c4356ef2
commit
2e2d6863b9
10
bundle.json
10
bundle.json
@ -50,7 +50,12 @@
|
||||
"window_manager",
|
||||
"image_framework",
|
||||
"ffrt",
|
||||
"storage_service"
|
||||
"openssl",
|
||||
"zlib",
|
||||
"grpc",
|
||||
"cJSON",
|
||||
"storage_service",
|
||||
"abseil-cpp"
|
||||
],
|
||||
"third_party": [
|
||||
"bounds_checking_function",
|
||||
@ -61,7 +66,8 @@
|
||||
"openssl",
|
||||
"protobuf",
|
||||
"zlib",
|
||||
"libpng"
|
||||
"libpng",
|
||||
"abseil-cpp"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
|
@ -50,11 +50,7 @@ config("hiprofiler_base_config") {
|
||||
if (use_musl && !is_asan) {
|
||||
defines += [ "HOOK_ENABLE" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
ohos_source_set("hiprofiler_base") {
|
||||
@ -74,9 +70,9 @@ ohos_source_set("hiprofiler_base") {
|
||||
":hiprofiler_test_config",
|
||||
":hiprofiler_base_config",
|
||||
]
|
||||
public_deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"c_utils:utils",
|
||||
|
@ -26,7 +26,6 @@ ohos_unittest("hiprofiler_base_ut") {
|
||||
module_out_path = module_output_path
|
||||
deps = [ "../:hiprofiler_base" ]
|
||||
configs = [ ":module_private_config" ]
|
||||
include_dirs = [ "//third_party/googletest/googletest/include/gtest" ]
|
||||
sources = [
|
||||
"unittest/common_test.cpp",
|
||||
"unittest/epoll_event_poller_test.cpp",
|
||||
@ -37,7 +36,10 @@ ohos_unittest("hiprofiler_base_ut") {
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "common.h"
|
||||
#include "logging.h"
|
||||
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <chrono>
|
||||
#include <cinttypes>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <memory>
|
||||
#include <sys/eventfd.h>
|
||||
#include <sys/types.h>
|
||||
|
3
device/base/test/unittest/schedule_task_manager_test.cpp
Executable file → Normal file
3
device/base/test/unittest/schedule_task_manager_test.cpp
Executable file → Normal file
@ -14,8 +14,7 @@
|
||||
*/
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <sys/time.h>
|
||||
#include <thread>
|
||||
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <thread>
|
||||
|
||||
#include "i_semaphore.h"
|
||||
|
@ -34,8 +34,6 @@ ohos_executable("hiprofiler_cmd") {
|
||||
include_dirs = [ "include" ]
|
||||
deps = [
|
||||
":command_line",
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf",
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_base",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:profiler_service_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:profiler_service_type_source",
|
||||
@ -57,7 +55,14 @@ ohos_executable("hiprofiler_cmd") {
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/process_data:process_plugin_config_cpp_standard",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/xpower_data:xpower_plugin_config_cpp_standard",
|
||||
]
|
||||
external_deps = [ "init:libbegetutil" ]
|
||||
external_deps = [
|
||||
"abseil-cpp:absl_sync",
|
||||
"grpc:grpc",
|
||||
"grpc:grpcxx",
|
||||
"init:libbegetutil",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
|
||||
install_enable = true
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -30,8 +30,6 @@ ohos_unittest("hiprofiler_cmd_ut") {
|
||||
"unittest/parse_plugin_config_test.cpp",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf",
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_base",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:profiler_service_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:profiler_service_type_source",
|
||||
@ -52,21 +50,26 @@ ohos_unittest("hiprofiler_cmd_ut") {
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/network_profiler:network_profiler_cpp_standard",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/process_data:process_plugin_config_cpp_standard",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/xpower_data:xpower_plugin_config_cpp_standard",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/openssl/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"abseil-cpp:absl_sync",
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"grpc:grpc",
|
||||
"grpc:grpcxx",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <array>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
@ -15,9 +15,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "google/protobuf/text_format.h"
|
||||
#include "parse_plugin_config.h"
|
||||
#include "logging.h"
|
||||
|
@ -36,8 +36,6 @@ ohos_source_set("plugins_sources") {
|
||||
"./include",
|
||||
"../../base/include/",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//third_party/openssl/include",
|
||||
]
|
||||
sources = [
|
||||
"src/buffer_writer.cpp",
|
||||
@ -55,15 +53,19 @@ ohos_source_set("plugins_sources") {
|
||||
"${OHOS_PROFILER_DIR}/protos/services:plugin_service_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
]
|
||||
public_configs = [
|
||||
":hiprofiler_plugins_config",
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
|
||||
}
|
||||
@ -83,7 +85,13 @@ ohos_executable("hiprofiler_plugins") {
|
||||
sources = [ "src/main.cpp" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
install_enable = true
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -34,13 +34,8 @@ ohos_unittest("hiprofiler_plugins_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/services/plugin_service:hiprofiler_plugin_service",
|
||||
"${OHOS_PROFILER_DIR}/device/services/profiler_service:profiler_service",
|
||||
"../:plugins_sources",
|
||||
"//third_party/googletest:gmock",
|
||||
"//third_party/googletest:gtest",
|
||||
]
|
||||
include_dirs = [
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
]
|
||||
include_dirs = [ "${OHOS_PROFILER_DIR}/device/base/include" ]
|
||||
sources = [
|
||||
"unittest/buffer_write_test.cpp",
|
||||
"unittest/command_poller_test.cpp",
|
||||
@ -53,8 +48,19 @@ ohos_unittest("hiprofiler_plugins_ut") {
|
||||
defines = [ "COVERAGE_TEST" ]
|
||||
}
|
||||
configs = [ ":cflags_config" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"abseil-cpp:absl_sync",
|
||||
"googletest:gmock",
|
||||
"googletest:gtest",
|
||||
"grpc:grpc",
|
||||
"grpc:grpcxx",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
}
|
||||
|
||||
group("unittest") {
|
||||
|
@ -32,7 +32,11 @@ ohos_fuzztest("PluginCreateSessionCmdFuzzTest") {
|
||||
#"${OHOS_PROFILER_DIR}/device/services/profiler_service:profiler_service",
|
||||
"../../..:plugins_sources",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
if (is_asan) {
|
||||
defines = [ "ASAN_MODE" ]
|
||||
}
|
||||
|
@ -32,7 +32,11 @@ ohos_fuzztest("PluginDestroySessionCmdFuzzTest") {
|
||||
#"${OHOS_PROFILER_DIR}/device/services/profiler_service:profiler_service",
|
||||
"../../..:plugins_sources",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
if (is_asan) {
|
||||
defines = [ "ASAN_MODE" ]
|
||||
}
|
||||
|
@ -32,7 +32,11 @@ ohos_fuzztest("PluginStartSessionCmdFuzzTest") {
|
||||
#"${OHOS_PROFILER_DIR}/device/services/profiler_service:profiler_service",
|
||||
"../../..:plugins_sources",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
if (is_asan) {
|
||||
defines = [ "ASAN_MODE" ]
|
||||
}
|
||||
|
@ -32,7 +32,11 @@ ohos_fuzztest("PluginStopSessionCmdFuzzTest") {
|
||||
#"${OHOS_PROFILER_DIR}/device/services/profiler_service:profiler_service",
|
||||
"../../..:plugins_sources",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
if (is_asan) {
|
||||
defines = [ "ASAN_MODE" ]
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
#include "buffer_writer.h"
|
||||
|
@ -13,12 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include "command_poller.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "plugin_manager.h"
|
||||
#include "plugin_service.ipc.h"
|
||||
#include "socket_context.h"
|
||||
@ -37,7 +35,7 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool UnloadPlugin(const std::string& pluginPath)
|
||||
bool UnloadPlugin(const std::string& pluginPath) override
|
||||
{
|
||||
if (pluginPath == "existplugin") {
|
||||
return true;
|
||||
@ -46,7 +44,7 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool UnloadPlugin(const uint32_t pluginId)
|
||||
bool UnloadPlugin(const uint32_t pluginId) override
|
||||
{
|
||||
if (pluginId == 0) {
|
||||
return false;
|
||||
@ -54,7 +52,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool CreatePluginSession(const std::vector<ProfilerPluginConfig>& config)
|
||||
bool CreatePluginSession(const std::vector<ProfilerPluginConfig>& config) override
|
||||
{
|
||||
if (config[0].name() == "existplugin") {
|
||||
return true;
|
||||
@ -63,15 +61,15 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool DestroyPluginSession(const std::vector<uint32_t>& pluginIds)
|
||||
bool DestroyPluginSession(const std::vector<uint32_t>& pluginIds) override
|
||||
{
|
||||
if (pluginIds[0] != 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool StartPluginSession(const std::vector<uint32_t>& pluginIds,
|
||||
const std::vector<ProfilerPluginConfig>& config, PluginResult& result)
|
||||
bool StartPluginSession(const std::vector<uint32_t>& pluginIds, const std::vector<ProfilerPluginConfig>& config,
|
||||
PluginResult& result) override
|
||||
{
|
||||
if (pluginIds[0] == 0) {
|
||||
return false;
|
||||
@ -84,7 +82,7 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool StopPluginSession(const std::vector<uint32_t>& pluginIds)
|
||||
bool StopPluginSession(const std::vector<uint32_t>& pluginIds) override
|
||||
{
|
||||
if (pluginIds[0] == 0) {
|
||||
return false;
|
||||
@ -92,35 +90,35 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool CreateWriter(std::string pluginName, uint32_t bufferSize, int smbFd, int eventFd,
|
||||
bool isProtobufSerialize = true)
|
||||
bool CreateWriter(std::string pluginName, uint32_t bufferSize, int smbFd, int eventFd,
|
||||
bool isProtobufSerialize = true) override
|
||||
{
|
||||
if (bufferSize == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool ResetWriter(uint32_t pluginId)
|
||||
bool ResetWriter(uint32_t pluginId) override
|
||||
{
|
||||
if (pluginId == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual void SetCommandPoller(const std::shared_ptr<CommandPoller>& p)
|
||||
void SetCommandPoller(const std::shared_ptr<CommandPoller>& p) override
|
||||
{
|
||||
this->commandPoller_ = p;
|
||||
}
|
||||
|
||||
virtual bool ReportPluginBasicData(const std::vector<uint32_t>& pluginIds)
|
||||
bool ReportPluginBasicData(const std::vector<uint32_t>& pluginIds) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
CommandPollerPtr commandPoller_;
|
||||
};
|
||||
|
||||
|
||||
class CommandPollerTest : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase() {}
|
||||
@ -212,4 +210,4 @@ HWTEST_F(CommandPollerTest, DestoryCmdTest, TestSize.Level1)
|
||||
EXPECT_FALSE(commandPoller->OnDestroySessionCmd(failed2Cmd));
|
||||
EXPECT_FALSE(commandPoller->OnDestroySessionCmd(failed3Cmd));
|
||||
}
|
||||
}
|
||||
} // namespace
|
@ -15,8 +15,7 @@
|
||||
|
||||
#include <google/protobuf/message.h>
|
||||
#include <grpcpp/health_check_service_interface.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <thread>
|
||||
|
||||
#include "command_poller.h"
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <thread>
|
||||
|
||||
#include "common.h"
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "writer_adapter.h"
|
||||
|
||||
using namespace testing::ext;
|
||||
|
@ -28,21 +28,22 @@ ohos_source_set("arkts_source") {
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/api/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/profiler_service/src",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:common_types_lite_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/arkts_plugin:arkts_plugin_data_cpp",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
]
|
||||
|
||||
defines = [ "LITE_PROTO" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines += [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
@ -55,7 +56,11 @@ ohos_shared_library("arktsplugin") {
|
||||
deps = [ ":arkts_source" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
]
|
||||
}
|
||||
install_enable = true
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -29,8 +29,6 @@ ohos_unittest("arktsplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/arkts_plugin:arkts_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:common_types_lite_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/arkts_plugin:arkts_plugin_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
@ -38,14 +36,17 @@ ohos_unittest("arktsplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/api/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/profiler_service/src",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -14,9 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <cinttypes>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <fcntl.h>
|
||||
|
@ -20,7 +20,6 @@ config("bytraceplugin_config") {
|
||||
"../../services/profiler_service/src",
|
||||
"../../base/include",
|
||||
"include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
}
|
||||
|
||||
@ -31,14 +30,14 @@ ohos_shared_library("bytraceplugin") {
|
||||
":bytraceplugin_config",
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config",
|
||||
]
|
||||
public_deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/bytrace_plugin:bytrace_plugin_protos_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
public_deps = [ "${OHOS_PROFILER_DIR}/protos/types/plugins/bytrace_plugin:bytrace_plugin_protos_cpp" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -27,14 +27,12 @@ ohos_source_set("cpudataplugin_source") {
|
||||
"../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
@ -49,7 +47,10 @@ ohos_shared_library("cpudataplugin") {
|
||||
deps = [ ":cpudataplugin_source" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
}
|
||||
install_enable = true
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
@ -64,16 +65,15 @@ ohos_executable("cpudataplugintest") {
|
||||
"../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
deps = [ "${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_data_cpp" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -32,21 +32,24 @@ ohos_unittest("cpudataplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/cpu_plugin:cpudataplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/cpu_plugin:cpudataplugintest",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -31,7 +31,11 @@ ohos_fuzztest("CpuStartPluginFuzzTest") {
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/cpu_data:cpu_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
include_dirs = [
|
||||
"../../../include",
|
||||
"../../../../api/include",
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <cinttypes>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "cpu_data_plugin.h"
|
||||
|
@ -28,18 +28,18 @@ ohos_source_set("diskiodataplugin_source") {
|
||||
"../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
}
|
||||
@ -50,7 +50,10 @@ ohos_shared_library("diskiodataplugin") {
|
||||
deps = [ ":diskiodataplugin_source" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
}
|
||||
install_enable = true
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
@ -67,12 +70,14 @@ ohos_executable("diskiodataplugintest") {
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_data_cpp",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -29,21 +29,24 @@ ohos_unittest("diskiodataplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/diskio_plugin:diskiodataplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/diskio_plugin:diskiodataplugintest",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -31,7 +31,11 @@ ohos_fuzztest("DiskioStartPluginFuzzTest") {
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/diskio_data:diskio_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
include_dirs = [
|
||||
"../../../include",
|
||||
"../../../../api/include",
|
||||
|
@ -13,10 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "diskio_data_plugin.h"
|
||||
#include "plugin_module_api.h"
|
||||
|
||||
|
@ -56,7 +56,10 @@ ohos_shared_library("libffrt_profiler") {
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory_lite",
|
||||
]
|
||||
|
||||
external_deps = [ "init:libbegetutil" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"init:libbegetutil",
|
||||
]
|
||||
|
||||
defines = []
|
||||
if (current_toolchain != host_toolchain) {
|
||||
|
@ -49,6 +49,7 @@ ohos_source_set("ffrt_profiler_service") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"init:libbegetutil",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
|
@ -52,7 +52,6 @@ ohos_unittest("ffrt_profiler_ut") {
|
||||
|
||||
include_dirs = [
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"../service/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/ipc/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory/include",
|
||||
@ -72,7 +71,6 @@ ohos_unittest("ffrt_profiler_ut") {
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_base",
|
||||
"${OHOS_PROFILER_DIR}/device/services/ipc:ipc",
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory",
|
||||
@ -91,8 +89,10 @@ ohos_unittest("ffrt_profiler_ut") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"init:libbegetutil",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <cinttypes>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <csignal>
|
||||
#include <filesystem>
|
||||
|
||||
|
@ -41,22 +41,20 @@ ohos_source_set("ftrace_plugin_source") {
|
||||
"../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_encoder",
|
||||
"tools/device_kernel_version/${device_kernel_version}/event_parsers:ftrace_event_parsers",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines += [ "HAVE_HILOG" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"hiview:libucollection_client",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -47,15 +47,12 @@ ohos_unittest("ftrace_plugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
cflags = [
|
||||
@ -63,8 +60,12 @@ ohos_unittest("ftrace_plugin_ut") {
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"hiview:libucollection_client",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <unistd.h>
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <type_traits>
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
||||
|
@ -12,8 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "ftrace_field_parser.h"
|
||||
#include "securec.h"
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "file_utils.h"
|
||||
#include "flow_controller.h"
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <thread>
|
||||
#include <unistd.h>
|
||||
|
||||
|
3
device/plugins/ftrace_plugin/test/unittest/hitrace_ops_test.cpp
Executable file → Normal file
3
device/plugins/ftrace_plugin/test/unittest/hitrace_ops_test.cpp
Executable file → Normal file
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "hitrace_ops.h"
|
||||
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
#include <cinttypes>
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
||||
|
@ -12,8 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
|
||||
#include "process_utils.h"
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <fstream>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <unistd.h>
|
||||
|
@ -12,8 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include "string_utils.h"
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
#include <chrono>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <thread>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "hitrace_ops.h"
|
||||
#include "trace_ops.h"
|
||||
|
16
device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_formatters/BUILD.gn
Executable file → Normal file
16
device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_formatters/BUILD.gn
Executable file → Normal file
@ -28,24 +28,20 @@ ohos_source_set("ftrace_event_formatters") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/ftrace_plugin/tools/trace_converter/include/linux",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/ftrace_plugin/tools/trace_converter/include/trace",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_cpp_standard",
|
||||
]
|
||||
deps = [ "${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_cpp_standard" ]
|
||||
if (!is_mingw) {
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
]
|
||||
}
|
||||
public_configs =
|
||||
[ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
} else {
|
||||
public_configs = [
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/ftrace_plugin/tools/trace_converter:trace_converter_inner_config",
|
||||
"//commonlibrary/c_utils/base:utils_config",
|
||||
]
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/plugins/ftrace_plugin/tools/trace_converter:trace_converter_inner_config" ]
|
||||
}
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
7
device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_parsers/BUILD.gn
Executable file → Normal file
7
device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_parsers/BUILD.gn
Executable file → Normal file
@ -22,17 +22,18 @@ ohos_source_set("ftrace_event_parsers") {
|
||||
".",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/ftrace_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/ftrace_data/${device_kernel_version}:ftrace_data_encoder",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -27,18 +27,19 @@ ohos_source_set("gpudataplugin_source") {
|
||||
"../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/gpu_data:gpu_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/gpu_data:gpu_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
}
|
||||
@ -65,13 +66,13 @@ ohos_executable("gpudataplugintest") {
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/gpu_data:gpu_data_cpp",
|
||||
]
|
||||
deps = [ "${OHOS_PROFILER_DIR}/protos/types/plugins/gpu_data:gpu_data_cpp" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -29,22 +29,24 @@ ohos_unittest("gpudataplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/gpu_plugin:gpudataplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/gpu_plugin:gpudataplugintest",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/gpu_data:gpu_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -13,8 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <dlfcn.h>
|
||||
#include <fstream>
|
||||
#include "gpu_data_plugin.h"
|
||||
|
9
device/plugins/hidump_plugin/BUILD.gn
Executable file → Normal file
9
device/plugins/hidump_plugin/BUILD.gn
Executable file → Normal file
@ -24,18 +24,19 @@ ohos_source_set("hidumpplugin_source") {
|
||||
"../memory_plugin/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hidump_data:hidump_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hidump_data:hidump_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -28,21 +28,24 @@ ohos_unittest("hidumpplugin_ut") {
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/hidump_plugin:hidumpplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hidump_data:hidump_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
10
device/plugins/hidump_plugin/test/fuzztest/hidumpstartplugin_fuzzer/BUILD.gn
Executable file → Normal file
10
device/plugins/hidump_plugin/test/fuzztest/hidumpstartplugin_fuzzer/BUILD.gn
Executable file → Normal file
@ -29,15 +29,19 @@ ohos_fuzztest("HidumpStartPluginFuzzTest") {
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/hidump_plugin:hidumpplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hidump_data:hidump_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
include_dirs = [
|
||||
"../../../include",
|
||||
"../../../../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
}
|
||||
|
||||
|
3
device/plugins/hidump_plugin/test/unittest/hidump_plugin_unittest.cpp
Executable file → Normal file
3
device/plugins/hidump_plugin/test/unittest/hidump_plugin_unittest.cpp
Executable file → Normal file
@ -16,8 +16,7 @@
|
||||
#include <cstring>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
@ -26,14 +26,11 @@ ohos_source_set("hiebpfplugin_source") {
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/api/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/profiler_service/src",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/protos/services:common_types_lite_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hiebpf_data:hiebpf_data_cpp",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
]
|
||||
|
||||
if (current_toolchain != host_toolchain) {
|
||||
@ -41,7 +38,11 @@ ohos_source_set("hiebpfplugin_source") {
|
||||
"HAVE_HILOG",
|
||||
"LITE_PROTO",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
]
|
||||
}
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -49,11 +49,8 @@ ohos_executable("ebpf_converter") {
|
||||
}
|
||||
|
||||
sources = [ "src/ebpf_converter.cpp" ]
|
||||
include_dirs = [
|
||||
"./include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
include_dirs = [ "./include" ]
|
||||
external_deps = [ "bounds_checking_function:libsec_static" ]
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -26,19 +26,20 @@ ohos_source_set("hilogplugin_source") {
|
||||
"include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hilog_data:hilog_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hilog_data:hilog_data_encoder",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
}
|
||||
|
@ -28,21 +28,24 @@ ohos_unittest("hilogplugin_ut") {
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/hilog_plugin:hilogplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hilog_data:hilog_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -31,7 +31,11 @@ ohos_fuzztest("HilogStartPluginFuzzTest") {
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hilog_data:hilog_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
include_dirs = [
|
||||
"../../../include",
|
||||
"../../../../api/include",
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <cstring>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
11
device/plugins/hiperf_plugin/BUILD.gn
Executable file → Normal file
11
device/plugins/hiperf_plugin/BUILD.gn
Executable file → Normal file
@ -20,7 +20,6 @@ config("hiperfplugin_config") {
|
||||
"../../services/profiler_service/src",
|
||||
"../../base/include",
|
||||
"include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
}
|
||||
|
||||
@ -36,19 +35,21 @@ ohos_source_set("hiperfplugin_source") {
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config",
|
||||
]
|
||||
public_deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/protos/services:common_types_lite_proto",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hiperf_data:hiperf_data_cpp",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [
|
||||
"HAVE_HILOG",
|
||||
"LITE_PROTO",
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -34,8 +34,6 @@ ohos_unittest("hiperfplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
@ -43,6 +41,7 @@ ohos_unittest("hiperfplugin_ut") {
|
||||
]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <cstring>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
@ -25,20 +25,21 @@ ohos_source_set("hisyseventplugin_source") {
|
||||
"include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/device/base:hiprofiler_base",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hisysevent_data:hisysevent_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hisysevent_data:hisysevent_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
}
|
||||
|
@ -28,21 +28,24 @@ ohos_unittest("hisyseventplugin_ut") {
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/hisysevent_plugin:hisyseventplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/hisysevent_data:hisysevent_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include <cstring>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
@ -28,23 +28,22 @@ ohos_source_set("memdataplugin_source") {
|
||||
"../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite",
|
||||
"${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/memory_data:memory_data_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/memory_data:memory_data_encoder",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"c_utils:utils",
|
||||
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
|
||||
"graphic_2d:librender_service_client",
|
||||
"hidumper:lib_dump_usage",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
}
|
||||
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
|
||||
@ -72,16 +71,14 @@ ohos_executable("memorytest") {
|
||||
output_name = "memorytest"
|
||||
sources = [ "src/test_main.cpp" ]
|
||||
|
||||
include_dirs = [
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
|
||||
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
include_dirs = [ "${OHOS_PROFILER_DIR}/device/base/include" ]
|
||||
|
||||
if (current_toolchain != host_toolchain) {
|
||||
defines = [ "HAVE_HILOG" ]
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
}
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -32,25 +32,26 @@ ohos_unittest("memdataplugin_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/memory_plugin:memdataplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/memory_plugin:memorytest",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/memory_data:memory_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"c_utils:utils",
|
||||
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
|
||||
"googletest:gtest",
|
||||
"graphic_2d:librender_service_client",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
@ -64,25 +65,26 @@ ohos_unittest("smaps_stats_ut") {
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/memory_plugin:memdataplugin_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/memory_data:memory_data_cpp",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
include_dirs = [
|
||||
"../include",
|
||||
"../../api/include",
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/base/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Dprivate=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"c_utils:utils",
|
||||
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
|
||||
"googletest:gtest",
|
||||
"graphic_2d:librender_service_client",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -37,6 +37,7 @@ ohos_fuzztest("MemoryStartPluginFuzzTest") {
|
||||
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
|
||||
"graphic_2d:librender_service_client",
|
||||
"hilog:libhilog",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
|
@ -13,10 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <memory>
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "buffer_splitter.h"
|
||||
|
||||
using namespace testing::ext;
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "memory_data_plugin.h"
|
||||
|
@ -14,9 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "memory_data_plugin.h"
|
||||
#include "plugin_module_api.h"
|
||||
#include "smaps_stats.h"
|
||||
|
@ -88,8 +88,6 @@ ohos_executable("native_daemon") {
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/services/ipc/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//third_party/googletest/googletest/include",
|
||||
]
|
||||
|
||||
include_dirs += [
|
||||
@ -117,9 +115,6 @@ ohos_executable("native_daemon") {
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp_standard",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_encoder",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
"//third_party/zlib:libz",
|
||||
]
|
||||
|
||||
if (hiprofiler_use_libunwind) {
|
||||
@ -130,10 +125,15 @@ ohos_executable("native_daemon") {
|
||||
"ability_base:extractortool",
|
||||
"access_token:libaccesstoken_sdk",
|
||||
"access_token:libtoken_setproc",
|
||||
"bounds_checking_function:libsec_static",
|
||||
"init:libbegetutil",
|
||||
"ipc:ipc_core",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
"safwk:system_ability_fwk",
|
||||
"samgr:samgr_proxy",
|
||||
"zlib:libz",
|
||||
]
|
||||
|
||||
defines = [ "ENABLE_HAP_EXTRACTOR" ]
|
||||
|
@ -126,9 +126,6 @@ private:
|
||||
|
||||
std::shared_ptr<UnwindAccessors> accessor_;
|
||||
#endif
|
||||
FRIEND_TEST(CallStackTest, ExpendCallStackFullCache);
|
||||
FRIEND_TEST(CallStackTest, LibUnwindEmptyFunc);
|
||||
FRIEND_TEST(CallStackTest, GetUnwErrorName);
|
||||
};
|
||||
|
||||
struct UnwindInfo {
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gtest/gtest_prod.h>
|
||||
#include "get_thread_id.h"
|
||||
|
||||
namespace OHOS {
|
||||
@ -124,11 +123,6 @@ private:
|
||||
bool exitOnFatal_ = true;
|
||||
std::string logPath_;
|
||||
std::map<std::string, DebugLevel> logTagLevelmap_;
|
||||
|
||||
friend class OptionDebugTest;
|
||||
friend class DebugLoggerTest;
|
||||
FRIEND_TEST(DebugLoggerTest, SetLogTags);
|
||||
FRIEND_TEST(DebugLoggerTest, Disable);
|
||||
};
|
||||
|
||||
#ifdef HIPERF_DEBUG_PRINTF
|
||||
|
10
device/plugins/native_daemon/include/symbols_file.h
Executable file → Normal file
10
device/plugins/native_daemon/include/symbols_file.h
Executable file → Normal file
@ -22,7 +22,6 @@
|
||||
#include <string>
|
||||
#include "dfx_elf.h"
|
||||
#include "dfx_symbol.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include "perf_file_format.h"
|
||||
#include "utilities.h"
|
||||
|
||||
@ -205,15 +204,6 @@ protected:
|
||||
void AdjustSymbols();
|
||||
void SortMatchedSymbols();
|
||||
bool CheckPathReadable(const std::string &path) const;
|
||||
|
||||
FRIEND_TEST(SymbolsFileTest, FindSymbolFile);
|
||||
FRIEND_TEST(SymbolsFileTest, UpdateBuildIdIfMatch);
|
||||
FRIEND_TEST(SymbolsFileTest, exportSymbolToFileFormat);
|
||||
FRIEND_TEST(SymbolsFileTest, exportSymbolToFileFormatMatched);
|
||||
friend class VirtualRuntimeTest;
|
||||
FRIEND_TEST(ReportJsonFileTest, ProcessSymbolsFiles);
|
||||
FRIEND_TEST(ReportProtobufFileTest, ProcessSymbolsFiles);
|
||||
friend class ReportProtobufFileTest;
|
||||
};
|
||||
|
||||
class CCompareSymbolsFile {
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include <unique_fd.h>
|
||||
#include <unistd.h>
|
||||
#if !is_mingw
|
||||
#include <gtest/gtest_prod.h>
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
#include <linux/types.h>
|
||||
|
@ -122,7 +122,6 @@ private:
|
||||
mutable std::vector<std::string> missedSymbolFile_;
|
||||
#endif
|
||||
VirtualRuntime* virtualruntime_;
|
||||
FRIEND_TEST(VirtualThreadTest, ReadRoMemory);
|
||||
};
|
||||
} // namespace NativeDaemon
|
||||
} // namespace Developtools
|
||||
|
@ -54,8 +54,6 @@ config("native_memory_profiler_sa_config") {
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/services/ipc/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"${native_daemon_path}/include",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/native_daemon/native_memory_profiler_sa/include",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/native_daemon/native_memory_profiler_sa/util/include",
|
||||
@ -111,9 +109,6 @@ ohos_unittest("native_memory_profiler_sa_ut") {
|
||||
"${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp_standard",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
"//third_party/zlib:libz",
|
||||
]
|
||||
|
||||
if (hiprofiler_use_libunwind) {
|
||||
@ -129,11 +124,17 @@ ohos_unittest("native_memory_profiler_sa_ut") {
|
||||
"ability_base:extractortool",
|
||||
"access_token:libaccesstoken_sdk",
|
||||
"access_token:libtoken_setproc",
|
||||
"bounds_checking_function:libsec_static",
|
||||
"c_utils:utils",
|
||||
"googletest:gtest",
|
||||
"init:libbegetutil",
|
||||
"ipc:ipc_core",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
"safwk:system_ability_fwk",
|
||||
"samgr:samgr_proxy",
|
||||
"zlib:libz",
|
||||
]
|
||||
|
||||
if (hiprofiler_use_libunwinder) {
|
||||
|
@ -60,9 +60,6 @@ common_deps = [
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp_standard",
|
||||
"../../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/openssl:libcrypto_shared",
|
||||
"//third_party/zlib:libz",
|
||||
]
|
||||
|
||||
config("native_daemon_test_config") {
|
||||
@ -70,7 +67,10 @@ config("native_daemon_test_config") {
|
||||
ldflags = []
|
||||
defines = []
|
||||
|
||||
cflags += [ "-Dprivate=public" ] # allow test code access private members
|
||||
cflags += [
|
||||
"-Dprivate=public",
|
||||
"-Dprotected=public",
|
||||
] # allow test code access private members
|
||||
if (native_daemon_test_coverage && is_ohos) {
|
||||
defines += [ "TEST_COVERAGE" ]
|
||||
cflags += [
|
||||
@ -100,8 +100,6 @@ config("native_daemon_test_config") {
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/services/ipc/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory/include",
|
||||
"//third_party/googletest/googletest/include/gtest",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"${native_daemon_path}/test/unittest/common/native/include",
|
||||
"${native_daemon_path}/include",
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/native_daemon/native_memory_profiler_sa/include",
|
||||
@ -124,8 +122,14 @@ ohos_unittest("native_daemon_ut") {
|
||||
"ability_base:extractortool",
|
||||
"access_token:libaccesstoken_sdk",
|
||||
"access_token:libtoken_setproc",
|
||||
"bounds_checking_function:libsec_static",
|
||||
"faultloggerd:libunwinder_static",
|
||||
"googletest:gtest",
|
||||
"init:libbegetutil",
|
||||
"openssl:libcrypto_shared",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
"zlib:libz",
|
||||
]
|
||||
defines = [ "ENABLE_HAP_EXTRACTOR" ]
|
||||
if (current_toolchain != host_toolchain) {
|
||||
|
@ -13,9 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "hook_manager.h"
|
||||
#include "hook_service.h"
|
||||
#include "hook_socket_client.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "hook_service.h"
|
||||
#include "hook_manager.h"
|
||||
#include "hook_socket_client.h"
|
||||
|
@ -51,8 +51,6 @@ ohos_source_set("native_hook_source") {
|
||||
"${OHOS_PROFILER_DIR}/interfaces/kits",
|
||||
"${OHOS_PROFILER_DIR}/device/services/ipc/include",
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//third_party/googletest/googletest/include",
|
||||
]
|
||||
public_configs = [
|
||||
":hook_config",
|
||||
@ -61,15 +59,15 @@ ohos_source_set("native_hook_source") {
|
||||
deps = [
|
||||
"${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory_lite",
|
||||
"../../base:hiprofiler_base",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/zlib:libz",
|
||||
]
|
||||
if (hiprofiler_use_libunwind) {
|
||||
public_deps = [ "//third_party/libunwind:unwind_source_${target_cpu}" ]
|
||||
}
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"hitrace:libhitracechain",
|
||||
"init:libbegetutil",
|
||||
"zlib:libz",
|
||||
]
|
||||
if (hiprofiler_use_libunwinder) {
|
||||
external_deps += [ "faultloggerd:libunwinder_static" ]
|
||||
@ -113,12 +111,11 @@ ohos_executable("nativetest_c") {
|
||||
}
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
include_dirs = [ "//third_party/bounds_checking_function/include" ]
|
||||
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
cflags = [
|
||||
"-Wno-error=inline-asm",
|
||||
"-O3",
|
||||
]
|
||||
external_deps += [ "bounds_checking_function:libsec_static" ]
|
||||
ldflags = [ "-rdynamic" ]
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
@ -173,13 +170,11 @@ ohos_executable("malloctest_cpp") {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
}
|
||||
|
||||
include_dirs = [ "//third_party/bounds_checking_function/include" ]
|
||||
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
|
||||
cflags = [
|
||||
"-Wno-error=inline-asm",
|
||||
"-O3",
|
||||
]
|
||||
external_deps += [ "bounds_checking_function:libsec_static" ]
|
||||
ldflags = [ "-rdynamic" ]
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
@ -215,10 +210,8 @@ ohos_executable("statisticstest_cpp") {
|
||||
"-Wno-error=inline-asm",
|
||||
"-O3",
|
||||
]
|
||||
|
||||
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
include_dirs = [ "//third_party/bounds_checking_function/include" ]
|
||||
ldflags = [ "-rdynamic" ]
|
||||
external_deps += [ "bounds_checking_function:libsec_static" ]
|
||||
install_enable = false
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
part_name = "${OHOS_PROFILER_PART_NAME}"
|
||||
|
@ -51,7 +51,6 @@ ohos_unittest("nativehook_ut") {
|
||||
"${OHOS_PROFILER_DIR}/device/plugins/native_hook:native_hook_source",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp",
|
||||
"${OHOS_PROFILER_DIR}/protos/types/plugins/native_hook:native_hook_cpp_standard",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
@ -65,9 +64,7 @@ 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/googletest/googletest/include/gtest",
|
||||
"//third_party/musl/include/musl_preinit_common.h",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
|
||||
cflags = [
|
||||
@ -76,9 +73,13 @@ ohos_unittest("nativehook_ut") {
|
||||
"-Dprotected=public", #allow test code access private members
|
||||
]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"faultloggerd:libunwinder_static",
|
||||
"googletest:gtest",
|
||||
"hilog:libhilog",
|
||||
"init:libbegetutil",
|
||||
"protobuf:protobuf",
|
||||
"protobuf:protobuf_lite",
|
||||
]
|
||||
configs = [ ":module_private_config" ]
|
||||
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <vector>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/mman.h>
|
||||
|
@ -14,9 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "hook_client.h"
|
||||
#include "musl_preinit_common.h"
|
||||
#include "init_param.h"
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "hook_socket_client.h"
|
||||
#include "hook_service.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "sampling.h"
|
||||
|
||||
using namespace testing::ext;
|
||||
|
@ -14,8 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <hwext/gtest-ext.h>
|
||||
#include <hwext/gtest-tag.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user