mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
Merge branch 'serialized_optimize' of https://github.com/yse/easy_profiler into serialized_optimize
This commit is contained in:
commit
be54030b1a
@ -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;
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user