hilog整改为hilog_base

Signed-off-by: ganchuantao <ganchuantao1@huawei.com>
Change-Id: I45194f31eff07b9e05cf9787924b984527fe2888
This commit is contained in:
ganchuantao 2024-09-24 10:36:06 +08:00
parent d629c917cd
commit b6f3444998
98 changed files with 142 additions and 143 deletions

View File

@ -84,6 +84,6 @@ ohos_source_set("hiprofiler_base") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
}

View File

@ -34,7 +34,7 @@
#endif
#ifdef HAVE_HILOG
#include "hilog/log.h"
#include "hilog_base/log_base.h"
#include <string>
#else // HAVE_HILOG
#include <mutex>
@ -107,10 +107,10 @@ static inline int HiLogPrint(int type, int prio, int domain, ConstCharPtr tag, C
#define LOG_CORE 0
#endif
#define HILOG_DEBUG(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_INFO(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_INFO, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_WARN(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_WARN, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_ERROR(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_ERROR, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_BASE_DEBUG(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_BASE_INFO(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_INFO, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_BASE_WARN(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_WARN, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#define HILOG_BASE_ERROR(LOG_CORE, fmt, ...) HiLogPrint(LOG_CORE, LOG_ERROR, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
#endif // HAVE_HILOG
@ -153,13 +153,13 @@ static inline std::string StringFormat(const char* fmt, ...)
#ifdef HAVE_HILOG
#define HILOG_PRINT_DEBUG(type, fmt, ...) \
HILOG_DEBUG(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
HILOG_BASE_DEBUG(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
#define HILOG_PRINT_INFO(type, fmt, ...) \
HILOG_INFO(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
HILOG_BASE_INFO(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
#define HILOG_PRINT_WARN(type, fmt, ...) \
HILOG_WARN(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
HILOG_BASE_WARN(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
#define HILOG_PRINT_ERROR(type, fmt, ...) \
HILOG_ERROR(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
HILOG_BASE_ERROR(type, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str())
#else
#define HILOG_PRINT_DEBUG(type, fmt, ...) \
HiLogPrint(type, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__)
@ -186,7 +186,7 @@ static inline std::string StringFormat(const char* fmt, ...)
if (ptr == nullptr) { \
std::string str = std::string("CHECK_NOTNULL(") + logging::StringFormat(fmt, ##__VA_ARGS__) + \
") in " + __func__ + ":" + std::to_string(__LINE__) + "FAILED"; \
HILOG_WARN(LOG_CORE, "%{public}s", str.c_str()); \
HILOG_BASE_WARN(LOG_CORE, "%{public}s", str.c_str()); \
return retval; \
} \
} while (0)
@ -197,7 +197,7 @@ static inline std::string StringFormat(const char* fmt, ...)
if (!(expr)) { \
std::string str = std::string("CHECK_TRUE(") + logging::StringFormat(fmt, ##__VA_ARGS__) + \
") in " + __func__ + ":" + std::to_string(__LINE__) + "FAILED"; \
HILOG_WARN(LOG_CORE, "%{public}s", str.c_str()); \
HILOG_BASE_WARN(LOG_CORE, "%{public}s", str.c_str()); \
return retval; \
} \
} while (0)
@ -213,7 +213,7 @@ static inline std::string StringFormat(const char* fmt, ...)
#define RETURN_IF(expr, retval, fmt, ...) \
do { \
if ((expr)) { \
HILOG_WARN(LOG_CORE, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str()); \
HILOG_BASE_WARN(LOG_CORE, "%{public}s", logging::StringFormat(fmt, ##__VA_ARGS__).c_str()); \
return retval; \
} \
} while (0)

View File

@ -39,7 +39,7 @@ ohos_unittest("hiprofiler_base_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
]
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
}

View File

@ -64,7 +64,7 @@ ohos_executable("hiprofiler_cmd") {
]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -65,7 +65,7 @@ ohos_unittest("hiprofiler_cmd_ut") {
"googletest:gtest",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -61,7 +61,7 @@ ohos_source_set("plugins_sources") {
if (current_toolchain != host_toolchain) {
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]
@ -86,7 +86,7 @@ ohos_executable("hiprofiler_plugins") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -54,7 +54,7 @@ ohos_unittest("hiprofiler_plugins_ut") {
"googletest:gtest",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -33,7 +33,7 @@ ohos_fuzztest("PluginCreateSessionCmdFuzzTest") {
"../../..:plugins_sources",
]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
if (is_asan) {

View File

@ -33,7 +33,7 @@ ohos_fuzztest("PluginDestroySessionCmdFuzzTest") {
"../../..:plugins_sources",
]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
if (is_asan) {

View File

@ -33,7 +33,7 @@ ohos_fuzztest("PluginStartSessionCmdFuzzTest") {
"../../..:plugins_sources",
]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
if (is_asan) {

View File

@ -33,7 +33,7 @@ ohos_fuzztest("PluginStopSessionCmdFuzzTest") {
"../../..:plugins_sources",
]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
if (is_asan) {

View File

@ -41,7 +41,7 @@ ohos_source_set("arkts_source") {
defines += [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]
@ -59,7 +59,7 @@ ohos_shared_library("arktsplugin") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
]
}

View File

@ -44,7 +44,7 @@ ohos_unittest("arktsplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -37,7 +37,7 @@ public:
sleep(SLEEP_TIME); // Wait for the application to start successfully.
const std::string processName = "cn.openharmony.rebound_project";
COMMON::IsProcessExist(processName, pid_);
HILOG_INFO(LOG_CORE, "ArkTSPluginTest pid: %d", pid_);
HILOG_BASE_INFO(LOG_CORE, "ArkTSPluginTest pid: %d", pid_);
}
~ArkTSPluginTest() {}
static void SetUpTestCase() {}

View File

@ -35,7 +35,7 @@ ohos_shared_library("bytraceplugin") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}

View File

@ -36,7 +36,7 @@ ohos_source_set("cpudataplugin_source") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -51,7 +51,7 @@ ohos_shared_library("cpudataplugin") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
]
}
install_enable = true
@ -73,7 +73,7 @@ ohos_executable("cpudataplugintest") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}

View File

@ -46,7 +46,7 @@ ohos_unittest("cpudataplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -32,7 +32,7 @@ ohos_fuzztest("CpuStartPluginFuzzTest") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
include_dirs = [

View File

@ -37,7 +37,7 @@ ohos_source_set("diskiodataplugin_source") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -52,7 +52,7 @@ ohos_shared_library("diskiodataplugin") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
]
}
install_enable = true
@ -75,7 +75,7 @@ ohos_executable("diskiodataplugintest") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}

View File

@ -43,7 +43,7 @@ ohos_unittest("diskiodataplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -32,7 +32,7 @@ ohos_fuzztest("DiskioStartPluginFuzzTest") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
include_dirs = [

View File

@ -63,7 +63,7 @@ ohos_shared_library("libffrt_profiler") {
defines = []
if (current_toolchain != host_toolchain) {
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
install_images = [

View File

@ -17,6 +17,7 @@
#include "ffrt_profiler_common.h"
#include "ffrt_profiler.h"
#include "logging.h"
namespace {
std::atomic<uint64_t> g_flushCount = 0;

View File

@ -56,7 +56,7 @@ ohos_source_set("ffrt_profiler_service") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -183,7 +183,7 @@ void FfrtProfilerManager::StopFfrtProfiler()
for (const auto& item : ffrtCtx_) {
if (item->eventPoller != nullptr) {
HILOG_ERROR(LOG_CORE, "eventPoller unset!");
HILOG_BASE_ERROR(LOG_CORE, "eventPoller unset!");
if (item->eventNotifier != nullptr) {
item->eventPoller->RemoveFileDescriptor(item->eventNotifier->GetFd());
}

View File

@ -39,7 +39,7 @@ ohos_executable("ffrt_profiler_test_exe") {
if (current_toolchain != host_toolchain) {
defines += [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
install_enable = false
@ -90,7 +90,7 @@ ohos_unittest("ffrt_profiler_ut") {
external_deps = [
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"init:libbegetutil",
"protobuf:protobuf_lite",
]

View File

@ -50,7 +50,7 @@ ohos_source_set("ftrace_plugin_source") {
defines += [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_client",
"init:libbegetutil",
"protobuf:protobuf_lite",
@ -67,7 +67,7 @@ ohos_shared_library("ftrace_plugin") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_client",
"init:libbegetutil",
]

View File

@ -59,7 +59,7 @@ ohos_unittest("ftrace_plugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_client",
"protobuf:protobuf_lite",
]

View File

@ -34,7 +34,7 @@ ohos_source_set("ftrace_event_formatters") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf",
]
}

View File

@ -31,7 +31,7 @@ ohos_source_set("ftrace_event_parsers") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}

View File

@ -37,7 +37,7 @@ ohos_source_set("gpudataplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -50,7 +50,7 @@ ohos_shared_library("gpudataplugin") {
deps = [ ":gpudataplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
@ -70,7 +70,7 @@ ohos_executable("gpudataplugintest") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}

View File

@ -43,7 +43,7 @@ ohos_unittest("gpudataplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -35,7 +35,7 @@ ohos_source_set("hidumpplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -50,7 +50,7 @@ ohos_shared_library("hidumpplugin") {
deps = [ ":hidumpplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -42,7 +42,7 @@ ohos_unittest("hidumpplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -32,7 +32,7 @@ ohos_fuzztest("HidumpStartPluginFuzzTest") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -40,7 +40,7 @@ ohos_source_set("hiebpfplugin_source") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]
@ -59,7 +59,7 @@ ohos_shared_library("hiebpfplugin") {
"HAVE_HILOG",
"LITE_PROTO",
]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -37,7 +37,7 @@ ohos_source_set("hilogplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -50,7 +50,7 @@ ohos_shared_library("hilogplugin") {
deps = [ ":hilogplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -42,7 +42,7 @@ ohos_unittest("hilogplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -32,7 +32,7 @@ ohos_fuzztest("HilogStartPluginFuzzTest") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
include_dirs = [

View File

@ -46,7 +46,7 @@ ohos_source_set("hiperfplugin_source") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]
@ -63,7 +63,7 @@ ohos_shared_library("hiperfplugin") {
"HAVE_HILOG",
"LITE_PROTO",
]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -42,7 +42,7 @@ ohos_unittest("hiperfplugin_ut") {
external_deps = [
"c_utils:utils",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -49,7 +49,7 @@ ohos_fuzztest("HiperfStartPluginFuzzTest") {
defines = [ "LITE_PROTO" ]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -37,7 +37,7 @@ ohos_source_set("hisyseventplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -50,7 +50,7 @@ ohos_shared_library("hisyseventplugin") {
deps = [ ":hisyseventplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -42,7 +42,7 @@ ohos_unittest("hisyseventplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -42,7 +42,7 @@ ohos_source_set("memdataplugin_source") {
"c_utils:utils",
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
"hidumper:lib_dump_usage",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_utility",
"protobuf:protobuf_lite",
]
@ -59,7 +59,7 @@ ohos_shared_library("memdataplugin") {
external_deps = [
"c_utils:utils",
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
"hilog:libhilog",
"hilog:libhilog_base",
]
}
install_enable = true
@ -77,7 +77,7 @@ ohos_executable("memorytest") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
]
}
install_enable = false

View File

@ -49,7 +49,7 @@ ohos_unittest("memdataplugin_ut") {
"c_utils:utils",
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_utility",
"protobuf:protobuf_lite",
]
@ -81,7 +81,7 @@ ohos_unittest("smaps_stats_ut") {
"c_utils:utils",
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_utility",
"protobuf:protobuf_lite",
]

View File

@ -35,7 +35,7 @@ ohos_fuzztest("MemoryStartPluginFuzzTest") {
external_deps = [
"bounds_checking_function:libsec_shared",
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_utility",
"protobuf:protobuf_lite",
]

View File

@ -143,7 +143,7 @@ ohos_executable("native_daemon") {
if (current_toolchain != host_toolchain) {
defines += [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
use_exceptions = true
install_enable = true
@ -176,7 +176,7 @@ ohos_executable("native_daemon_client") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
install_enable = false
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
@ -211,7 +211,7 @@ ohos_shared_library("libnative_daemon_client") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
innerapi_tags = [ "platformsdk" ]

View File

@ -32,7 +32,7 @@
__LINE__, __FUNCTION__, ##__VA_ARGS__
#ifndef CONFIG_NO_HILOG
#include "hilog/log.h"
#include "hilog_base/log_base.h"
static constexpr unsigned int BASE_HIPERF_DOMAIN_ID = 0xD000000;
static constexpr unsigned int HITRACE_TAG = 0xd03301;

View File

@ -98,7 +98,7 @@ ohos_unittest("native_memory_profiler_sa_ut") {
if (current_toolchain != host_toolchain) {
defines += [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
deps = [

View File

@ -56,7 +56,7 @@ ohos_fuzztest("NativeDaemonSaFuzzTest") {
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"init:libbegetutil",
"ipc:ipc_core",
"openssl:libcrypto_shared",

View File

@ -73,7 +73,7 @@ void DebugLogger::HiLog(std::string &buffer) const
if (lastLF != std::string::npos) {
buffer.erase(lastLF, 1);
}
HILOG_DEBUG(LOG_CORE, "%{public}s", buffer.c_str());
HILOG_BASE_DEBUG(LOG_CORE, "%{public}s", buffer.c_str());
}
#endif
#endif

View File

@ -37,7 +37,6 @@
#include "dfx_symbols.h"
#include "dwarf_encoding.h"
#include "utilities.h"
#include "logging.h"
using namespace OHOS::HiviewDFX;
using namespace std::chrono;

View File

@ -134,7 +134,7 @@ ohos_unittest("native_daemon_ut") {
defines = [ "ENABLE_HAP_EXTRACTOR" ]
if (current_toolchain != host_toolchain) {
defines += [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
}

View File

@ -21,7 +21,6 @@
using namespace testing::ext;
using namespace std;
using namespace OHOS::HiviewDFX;
namespace OHOS {
namespace Developtools {
namespace NativeDaemon {

View File

@ -18,7 +18,6 @@
using namespace testing::ext;
using namespace std;
using namespace OHOS::HiviewDFX;
namespace OHOS {
namespace Developtools {

View File

@ -17,7 +17,7 @@
#define HIPERF_DEBUG_TEST
#include <gtest/gtest.h>
#include <hilog/log.h>
#include <hilog_base/log_base.h>
#include "debug_logger.h"
#include "utilities.h"

View File

@ -16,7 +16,7 @@
#define HASHLIST_TEST_H
#include <gtest/gtest.h>
#include <hilog/log.h>
#include <hilog_base/log_base.h>
#include "hashlistpp.h"

View File

@ -16,7 +16,7 @@
#define HIPERF_FILE_FORMAT_TEST_H
#include <gtest/gtest.h>
#include <hilog/log.h>
#include <hilog_base/log_base.h>
#include "perf_file_format.h"
#include "perf_event_record.h"

View File

@ -17,7 +17,7 @@
#define HIPERF_REGISTER_TEST
#include <gtest/gtest.h>
#include <hilog/log.h>
#include <hilog_base/log_base.h>
#include "debug_logger.h"
#include "register.h"

View File

@ -16,6 +16,6 @@
#ifndef HIPERF_UTILITIES_TEST_H
#define HIPERF_UTILITIES_TEST_H
#include <gtest/gtest.h>
#include <hilog/log.h>
#include <hilog_base/log_base.h>
#endif

View File

@ -19,7 +19,6 @@
using namespace testing::ext;
using namespace std;
using namespace OHOS::HiviewDFX;
namespace OHOS {
namespace Developtools {
namespace NativeDaemon {

View File

@ -21,7 +21,6 @@
using namespace testing::ext;
using namespace std;
using namespace OHOS::HiviewDFX;
namespace OHOS {
namespace Developtools {
namespace NativeDaemon {

View File

@ -76,7 +76,7 @@ ohos_source_set("native_hook_source") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
part_name = "${OHOS_PROFILER_PART_NAME}"
@ -93,7 +93,7 @@ ohos_shared_library("native_hook") {
deps = [ ":native_hook_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
version_script = "libnative_hook.map"
install_enable = true
@ -110,7 +110,7 @@ ohos_executable("nativetest_c") {
if (use_musl && !is_asan) {
defines += [ "HOOK_ENABLE" ]
}
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
cflags = [
"-Wno-error=inline-asm",
@ -129,7 +129,7 @@ ohos_executable("nativetest_cpp") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
cflags = [
@ -149,7 +149,7 @@ ohos_shared_library("nativetest_so") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
cflags = [
@ -168,7 +168,7 @@ ohos_executable("malloctest_cpp") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
cflags = [
@ -188,7 +188,7 @@ ohos_executable("perf_test_data") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
cflags = [ "-Wno-error=inline-asm" ]
@ -204,7 +204,7 @@ ohos_executable("statisticstest_cpp") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
cflags = [

View File

@ -29,6 +29,7 @@
#include "common.h"
#include "hook_common.h"
#include "hook_socket_client.h"
#include "logging.h"
#include "musl_preinit_common.h"
#include "parameter.h"
#include "stack_writer.h"
@ -1190,7 +1191,7 @@ int hook_prctl(int(*fn)(int, ...),
rawdata.addr = reinterpret_cast<void*>(arg3);
size_t tagLen = strlen(reinterpret_cast<char*>(arg5)) + 1;
if (memcpy_s(rawdata.name, sizeof(rawdata.name), reinterpret_cast<char*>(arg5), tagLen) != EOK) {
HILOG_ERROR(LOG_CORE, "memcpy_s tag failed");
HILOG_BASE_ERROR(LOG_CORE, "memcpy_s tag failed");
}
rawdata.name[sizeof(rawdata.name) - 1] = '\0';
std::weak_ptr<HookSocketClient> weakClient = g_hookClient;

View File

@ -184,7 +184,7 @@ void HookSocketClient::DisableHook()
{
bool expected = false;
if (g_disableHook.compare_exchange_strong(expected, true, std::memory_order_release, std::memory_order_relaxed)) {
HILOG_INFO(LOG_CORE, "%s", __func__);
HILOG_BASE_INFO(LOG_CORE, "%s", __func__);
if (disableHookCallback_) {
disableHookCallback_();
}

View File

@ -77,7 +77,7 @@ ohos_unittest("nativehook_ut") {
"bounds_checking_function:libsec_shared",
"faultloggerd:libunwinder",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"init:libbegetutil",
"protobuf:protobuf_lite",
]

View File

@ -38,7 +38,7 @@ ohos_source_set("networkplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -50,7 +50,7 @@ ohos_shared_library("networkplugin") {
deps = [ ":networkplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -44,7 +44,7 @@ ohos_unittest("networkplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -33,7 +33,7 @@ ohos_fuzztest("NetworkStartPluginFuzzTest") {
]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
include_dirs = [

View File

@ -64,7 +64,7 @@ ohos_shared_library("libnetwork_profiler") {
defines = []
if (current_toolchain != host_toolchain) {
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
install_enable = true

View File

@ -17,6 +17,7 @@
#include "network_profiler_common.h"
#include "network_profiler.h"
#include "logging.h"
namespace {
std::atomic<bool> g_disableHook = false;
@ -113,7 +114,7 @@ void NetworkProfilerSocketClient::DisableHook()
{
bool expected = false;
if (g_disableHook.compare_exchange_strong(expected, true, std::memory_order_release, std::memory_order_relaxed)) {
HILOG_INFO(LOG_CORE, "%s %p", __func__, disableHookCallback_);
HILOG_BASE_INFO(LOG_CORE, "%s %p", __func__, disableHookCallback_);
if (disableHookCallback_ != nullptr) {
disableHookCallback_();
}

View File

@ -55,7 +55,7 @@ ohos_source_set("network_profiler_service") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -184,7 +184,7 @@ void NetworkProfilerManager::StopNetworkProfiler()
for (const auto& item : networkCtx_) {
if (item->eventPoller != nullptr) {
HILOG_ERROR(LOG_CORE, "eventPoller unset!");
HILOG_BASE_ERROR(LOG_CORE, "eventPoller unset!");
if (item->eventNotifier != nullptr) {
item->eventPoller->RemoveFileDescriptor(item->eventNotifier->GetFd());
}

View File

@ -36,7 +36,7 @@ ohos_source_set("processplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -51,7 +51,7 @@ ohos_shared_library("processplugin") {
deps = [ ":processplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -42,7 +42,7 @@ ohos_unittest("processplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
configs = [ ":module_private_config" ]

View File

@ -34,7 +34,7 @@ ohos_shared_library("sampleplugin") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}

View File

@ -33,7 +33,7 @@ ohos_source_set("streamplugin_source") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -47,7 +47,7 @@ ohos_shared_library("streamplugin") {
deps = [ ":streamplugin_source" ]
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps = [ "hilog:libhilog" ]
external_deps = [ "hilog:libhilog_base" ]
}
install_enable = true
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -35,7 +35,7 @@ ohos_shared_library("xpowerplugin") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -67,7 +67,7 @@ ohos_executable("xpowerdecoder") {
external_deps = [
"bounds_checking_function:libsec_shared",
"cJSON:cjson_static",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -56,7 +56,7 @@ ohos_unittest("xpowerplugin_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf",
"protobuf:protobuf_lite",
]

View File

@ -39,7 +39,7 @@ ohos_source_set("ipc") {
if (current_toolchain != host_toolchain) {
defines = [ "HAVE_HILOG" ]
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
public_configs = [ "${OHOS_PROFILER_DIR}/device/base:hiprofiler_test_config" ]
}

View File

@ -46,7 +46,7 @@ ohos_unittest("ipc_ut") {
]
external_deps = [
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -41,7 +41,7 @@ ohos_source_set("hiprofiler_plugin_service") {
if (current_toolchain != host_toolchain) {
external_deps = [
"bounds_checking_function:libsec_shared",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -39,7 +39,7 @@ ohos_unittest("plugin_service_ut") {
"abseil-cpp:absl_sync",
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]
@ -64,7 +64,7 @@ ohos_unittest("plugin_service_module_test") {
external_deps = [
"abseil-cpp:absl_sync",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -59,7 +59,7 @@ ohos_source_set("profiler_service") {
"protobuf:protobuf_lite",
]
if (current_toolchain != host_toolchain) {
external_deps += [ "hilog:libhilog" ]
external_deps += [ "hilog:libhilog_base" ]
}
defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
}
@ -102,7 +102,7 @@ ohos_executable("hiprofilerd") {
"grpc:gpr",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -62,7 +62,7 @@ ohos_unittest("profiler_service_ut") {
"googletest:gtest",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -41,7 +41,7 @@ ohos_fuzztest("ProfilerCreateSessionFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -41,7 +41,7 @@ ohos_fuzztest("ProfilerDestroySessionFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -42,7 +42,7 @@ ohos_fuzztest("ProfilerFetchDataFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -41,7 +41,7 @@ ohos_fuzztest("ProfilerGetCapabilitiesFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -41,7 +41,7 @@ ohos_fuzztest("ProfilerKeepSessionFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -41,7 +41,7 @@ ohos_fuzztest("ProfilerStartSessionFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -41,7 +41,7 @@ ohos_fuzztest("ProfilerStopSessionFuzzTest") {
"bounds_checking_function:libsec_shared",
"grpc:grpc",
"grpc:grpcxx",
"hilog:libhilog",
"hilog:libhilog_base",
"openssl:libcrypto_shared",
"protobuf:protobuf_lite",
]

View File

@ -37,7 +37,7 @@ ohos_source_set("shared_memory_source") {
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -51,7 +51,7 @@ ohos_shared_library("shared_memory") {
defines = [ "HAVE_HILOG" ]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
}
@ -76,7 +76,7 @@ ohos_static_library("shared_memory_lite") {
defines += [ "HAVE_HILOG" ]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
"hilog:libhilog_base",
]
}

View File

@ -22,9 +22,10 @@
#include <cstdint>
#include <functional>
#include <string>
#include "logging.h"
#include "plugin_module_api.h"
#define EXPORT_API __attribute__((visibility("default")))
class EXPORT_API ShareMemoryBlock {
public:
ShareMemoryBlock(const std::string& name, uint32_t size);

View File

@ -47,7 +47,7 @@ ohos_unittest("shared_memory_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
"protobuf:protobuf_lite",
]
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -53,7 +53,7 @@ ohos_unittest("hiebpf_ut") {
external_deps = [
"bounds_checking_function:libsec_shared",
"googletest:gtest",
"hilog:libhilog",
"hilog:libhilog_base",
]
configs = [ ":module_private_config" ]
subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"

View File

@ -59,7 +59,7 @@ ohos_unittest("plugin_module_api_ut") {
"drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
"googletest:gtest",
"hidumper:lib_dump_usage",
"hilog:libhilog",
"hilog:libhilog_base",
"hiview:libucollection_utility",
"protobuf:protobuf_lite",
]