mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-28 01:04:41 +08:00
Add checking for empty sync list.
This commit is contained in:
parent
61589c1154
commit
ef60d553c0
@ -363,7 +363,8 @@ uint32_t ProfileManager::dumpBlocksToStream(profiler::OStream& _outputStream)
|
|||||||
if (wasEnabled)
|
if (wasEnabled)
|
||||||
::profiler::setEnabled(false);
|
::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
|
// This is to make sure that no new descriptors or new threads will be
|
||||||
// added until we finish sending data.
|
// added until we finish sending data.
|
||||||
guard_lock_t lock1(m_storedSpin);
|
guard_lock_t lock1(m_storedSpin);
|
||||||
@ -442,7 +443,8 @@ uint32_t ProfileManager::dumpBlocksToStream(profiler::OStream& _outputStream)
|
|||||||
_outputStream.write(name_size > 1 ? t.name.c_str() : "", name_size);
|
_outputStream.write(name_size > 1 ? t.name.c_str() : "", name_size);
|
||||||
|
|
||||||
_outputStream.write(t.sync.closedList.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());
|
_outputStream.write(t.blocks.closedList.size());
|
||||||
if (!t.blocks.closedList.empty())
|
if (!t.blocks.closedList.empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user