0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

Merge branch 'serialized_optimize' of https://github.com/yse/easy_profiler into serialized_optimize

This commit is contained in:
Victor Zarubkin 2016-08-18 23:26:54 +03:00
commit be54030b1a
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ extern "C"{
SerializedBlock* SerializedBlock::create(const Block* block, uint64_t& memory_size)
{
auto name_length = static_cast<uint16_t>(strlen(block->getName()));
auto size = static_cast<uint16_t>(sizeof(BaseBlockData) + sizeof(uint16_t) + name_length + 1);
auto size = static_cast<uint16_t>(sizeof(BaseBlockData) + name_length + 1);
auto data = ::new char[size];
::new (static_cast<void*>(data)) SerializedBlock(block, name_length);
memory_size += size;

View File

@ -378,7 +378,7 @@ extern "C"{
auto& per_parent_statistics = parent_statistics[it.first];
per_parent_statistics.clear();
statistics_threads.emplace_back(::std::move(::std::thread([&per_parent_statistics, &per_frame_statistics](::profiler::BlocksTreeRoot& root)
statistics_threads.emplace_back(::std::thread([&per_parent_statistics, &per_frame_statistics](::profiler::BlocksTreeRoot& root)
{
for (auto& frame : root.tree.children)
{
@ -393,7 +393,7 @@ extern "C"{
}
++root.tree.depth;
}, ::std::ref(root))));
}, ::std::ref(root)));
}
int j = 0, n = static_cast<int>(statistics_threads.size());