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

Add callstack frame identifier and the required plumbing.

This commit is contained in:
Bartosz Taudul
2019-03-03 16:37:21 +01:00
parent cf8d17c2ec
commit 1feedb17ac
3 changed files with 38 additions and 0 deletions
+12
View File
@@ -8,6 +8,7 @@
#include "tracy_flat_hash_map.hpp"
#include "TracyCharUtil.hpp"
#include "TracyMemory.hpp"
#include "TracyEvent.hpp"
namespace tracy
{
@@ -65,6 +66,17 @@ void VarArray<T>::CalcHash()
m_hash = uint32_t( hash );
}
template<>
void VarArray<CallstackFrameId>::CalcHash()
{
uint64_t hash = 5381;
for( uint8_t i=0; i<m_size; i++ )
{
hash = ( ( hash << 5 ) + hash ) ^ m_ptr[i].data;
}
m_hash = uint32_t( hash );
}
template<typename T>
bool Compare( const VarArray<T>& lhs, const VarArray<T>& rhs )
{