1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Send native callstack along with allocated callstack.

This commit is contained in:
Bartosz Taudul
2019-03-05 02:00:31 +01:00
parent e13286936c
commit d229c1bc1b
4 changed files with 23 additions and 6 deletions
+3 -2
View File
@@ -182,8 +182,9 @@ static inline void SendLuaCallstack( lua_State* L, uint32_t depth )
auto& tail = token->get_tail_index();
auto item = token->enqueue_begin<tracy::moodycamel::CanAlloc>( magic );
MemWrite( &item->hdr.type, QueueType::CallstackAlloc );
MemWrite( &item->callstack.ptr, (uint64_t)ptr );
MemWrite( &item->callstack.thread, GetThreadHandle() );
MemWrite( &item->callstackAlloc.ptr, (uint64_t)ptr );
MemWrite( &item->callstackAlloc.nativePtr, (uint64_t)Callstack( depth ) );
MemWrite( &item->callstackAlloc.thread, GetThreadHandle() );
tail.store( magic + 1, std::memory_order_release );
}