File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class CChromeTracer
4848 void addProcessMetadata (
4949 const std::string& processName )
5050 {
51+ std::lock_guard<std::mutex> lock (m_Mutex);
5152 m_TraceFile
5253 << " {\" ph\" :\" M\" ,\" name\" :\" process_name\" ,\" pid\" :" << m_ProcessId
5354 << " ,\" tid\" :0"
@@ -59,6 +60,7 @@ class CChromeTracer
5960 uint64_t threadId,
6061 uint32_t threadNumber )
6162 {
63+ std::lock_guard<std::mutex> lock (m_Mutex);
6264 m_TraceFile
6365 << " {\" ph\" :\" M\" ,\" name\" :\" thread_name\" ,\" pid\" :" << m_ProcessId
6466 << " ,\" tid\" :" << threadId
@@ -74,6 +76,7 @@ class CChromeTracer
7476 void addStartTimeMetadata (
7577 uint64_t startTime )
7678 {
79+ std::lock_guard<std::mutex> lock (m_Mutex);
7780 m_TraceFile
7881 << " {\" ph\" :\" M\" ,\" name\" :\" clintercept_start_time\" ,\" pid\" :" << m_ProcessId
7982 << " ,\" tid\" :0"
@@ -85,6 +88,7 @@ class CChromeTracer
8588 uint32_t queueNumber,
8689 const std::string& queueName )
8790 {
91+ std::lock_guard<std::mutex> lock (m_Mutex);
8892 m_TraceFile
8993 << " {\" ph\" :\" M\" ,\" name\" :\" thread_name\" ,\" pid\" :" << m_ProcessId
9094 << " ,\" tid\" :" << queueNumber
You can’t perform that action at this time.
0 commit comments