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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user