remove useless compiler value and macro define

Signed-off-by: lushi1202 <lushi@huawei.com>
Change-Id: Ia4fa99dbcb6a1e3278ba0bb709b581f1d8db6adb
This commit is contained in:
lushi1202 2024-03-11 21:00:51 +08:00
parent 95a979c9ca
commit 01c7bedf64
5 changed files with 8 additions and 27 deletions

View File

@ -20,12 +20,6 @@ declare_args() {
# ace debug flag, enable debug features: like dcheck, thread-checker, mem-monitor...
enable_ace_debug = false
# only available when 'enable_ace_debug' set to 'true', show the LOGD infos.
enable_ace_debug_log = true
# only available when 'enable_ace_debug' set to 'true', show the private logs.
enable_ace_private_log = true
# show the instance id in logs.
enable_ace_instance_log = true
@ -166,12 +160,6 @@ if (use_clang_coverage) {
if (enable_ace_debug) {
ace_common_defines += [ "ACE_DEBUG" ]
if (enable_ace_debug_log) {
ace_common_defines += [ "ACE_DEBUG_LOG" ]
}
if (enable_ace_private_log) {
ace_common_defines += [ "ACE_PRIVATE_LOG" ]
}
}
if (enable_ace_instance_log) {

View File

@ -150,15 +150,8 @@ void LogWrapper::PrintLog(LogDomain domain, LogLevel level, AceLogTag tag, const
{
uint32_t hilogDomain = LOG_DOMAINS[static_cast<uint32_t>(domain)] + static_cast<uint32_t>(tag);
const char* domainContent = domain == LogDomain::FRAMEWORK ? DOMAIN_CONTENTS_MAP.at(tag) : APP_DOMAIN_CONTENT;
#ifdef ACE_PRIVATE_LOG
std::string newFmt(fmt);
ReplaceFormatString("{private}", "{public}", newFmt);
HiLogPrintArgs(LOG_TYPES[static_cast<uint32_t>(domain)], LOG_LEVELS[static_cast<uint32_t>(level)],
hilogDomain, domainContent, newFmt.c_str(), args);
#else
HiLogPrintArgs(LOG_TYPES[static_cast<uint32_t>(domain)], LOG_LEVELS[static_cast<uint32_t>(level)],
hilogDomain, domainContent, fmt, args);
#endif
}
#ifdef ACE_INSTANCE_LOG

View File

@ -536,7 +536,7 @@ void ViewStackProcessor::PopContainer()
Pop();
}
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
void ViewStackProcessor::DumpStack()
{
if (componentsStack_.empty()) {

View File

@ -275,7 +275,7 @@ public:
private:
ViewStackProcessor();
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
// Dump view stack comtent
void DumpStack();
#endif

View File

@ -187,7 +187,7 @@ void DistributedUI::OnTreeUpdate()
return;
}
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
auto timeStart = std::chrono::high_resolution_clock::now();
#endif
@ -206,7 +206,7 @@ void DistributedUI::OnTreeUpdate()
updateType = UpdateType::PAGE_UPDATE;
}
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
auto timeEnd = std::chrono::high_resolution_clock::now();
timeStart = timeEnd;
#endif
@ -215,7 +215,7 @@ void DistributedUI::OnTreeUpdate()
onUpdateCb_(updateType, update);
}
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
timeEnd = std::chrono::high_resolution_clock::now();
#endif
}
@ -235,7 +235,7 @@ int32_t DistributedUI::GetCurrentPageId()
void DistributedUI::BypassEvent(const TouchEvent& point, bool isSubPipe)
{
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
auto timeStart = std::chrono::high_resolution_clock::now();
#endif
@ -245,7 +245,7 @@ void DistributedUI::BypassEvent(const TouchEvent& point, bool isSubPipe)
SerializeableObjectArray eventArray;
eventArray.push_back(std::move((std::unique_ptr<NodeObject>&)json));
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
auto timeEnd = std::chrono::high_resolution_clock::now();
timeStart = timeEnd;
#endif
@ -254,7 +254,7 @@ void DistributedUI::BypassEvent(const TouchEvent& point, bool isSubPipe)
onEventCb_(eventArray);
}
#ifdef ACE_DEBUG_LOG
#ifdef ACE_DEBUG
timeEnd = std::chrono::high_resolution_clock::now();
#endif
}