Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-03-03 18:37:21 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-03-03 20:05:03 +0300
commit1feedb17ac1e27799b711e3d7eb4d1b821eabfd8 (patch)
tree67ea8ad480a75f0aa3e6ad2eadd9f53922d3c112 /server/TracyVarArray.hpp
parentcf8d17c2ec7fa60288b91e29fbf5de84e1504b29 (diff)
Add callstack frame identifier and the required plumbing.
Diffstat (limited to 'server/TracyVarArray.hpp')
-rw-r--r--server/TracyVarArray.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/TracyVarArray.hpp b/server/TracyVarArray.hpp
index 45f6d2c9..72684021 100644
--- a/server/TracyVarArray.hpp
+++ b/server/TracyVarArray.hpp
@@ -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 )
{