!475 fix: 死锁现象修复后,提交测试

Merge pull request !475 from jiangwei_30063790/master
This commit is contained in:
openharmony_ci 2024-06-27 04:15:54 +00:00 committed by Gitee
commit 3fc00be626
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1429,7 +1429,6 @@ TraceErrorCode OpenTrace(const std::string &args)
TraceRetInfo DumpTrace()
{
std::lock_guard<std::mutex> lock(g_traceMutex);
HILOG_DEBUG(LOG_CORE, "DumpTrace start.");
TraceRetInfo ret;
if (g_traceMode != SERVICE_MODE) {
@ -1443,7 +1442,7 @@ TraceRetInfo DumpTrace()
ret.errorCode = TRACE_IS_OCCUPIED;
return ret;
}
std::lock_guard<std::mutex> lock(g_traceMutex);
ret.errorCode = DumpTraceInner(ret.outputFiles);
HILOG_DEBUG(LOG_CORE, "DumpTrace done.");
return ret;