mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
Add checking for empty sync list.
(cherry picked from commit ef60d553c064341ab714a79e8e12d5363b35081e)
This commit is contained in:
parent
a2784eec50
commit
d5f6aa94b1
@ -362,7 +362,8 @@ uint32_t ProfileManager::dumpBlocksToStream(profiler::OStream& _outputStream)
|
||||
if (wasEnabled)
|
||||
::profiler::setEnabled(false);
|
||||
|
||||
|
||||
//TODO remove it
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
// This is to make sure that no new descriptors or new threads will be
|
||||
// added until we finish sending data.
|
||||
guard_lock_t lock1(m_storedSpin);
|
||||
@ -441,7 +442,8 @@ uint32_t ProfileManager::dumpBlocksToStream(profiler::OStream& _outputStream)
|
||||
_outputStream.write(name_size > 1 ? t.name.c_str() : "", name_size);
|
||||
|
||||
_outputStream.write(t.sync.closedList.size());
|
||||
t.sync.closedList.serialize(_outputStream);
|
||||
if (!t.sync.closedList.empty())
|
||||
t.sync.closedList.serialize(_outputStream);
|
||||
|
||||
_outputStream.write(t.blocks.closedList.size());
|
||||
if (!t.blocks.closedList.empty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user