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

Store srcloc identifiers using 16 bit.

This reduces various structure sizes by 2 bytes. Memory usage reduction
on various traces:

big               11 GB -> 10.62 GB
chicken         2436 MB ->  2342 MB
drl-light-big   1761 MB ->  1706 MB
q3bsp-mt        6469 MB ->  6277 MB
This commit is contained in:
Bartosz Taudul
2019-08-15 17:42:26 +02:00
parent 416113fdcb
commit 659907c972
6 changed files with 208 additions and 89 deletions
+5 -5
View File
@@ -3571,7 +3571,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
TextFocused( "Time:", TimeToString( t1 - t0 ) );
ImGui::Separator();
uint32_t markloc = 0;
int16_t markloc = 0;
auto it = vbegin;
for(;;)
{
@@ -5056,12 +5056,12 @@ void View::DrawZoneInfoWindow()
{
struct ChildGroup
{
int32_t srcloc;
int16_t srcloc;
uint64_t t;
Vector<uint32_t> v;
};
uint64_t ctime = 0;
flat_hash_map<int32_t, ChildGroup, nohash<int32_t>> cmap;
flat_hash_map<int16_t, ChildGroup, nohash<int16_t>> cmap;
cmap.reserve( 128 );
for( size_t i=0; i<children.size(); i++ )
{
@@ -5466,12 +5466,12 @@ void View::DrawGpuInfoWindow()
{
struct ChildGroup
{
int32_t srcloc;
int16_t srcloc;
uint64_t t;
Vector<uint32_t> v;
};
uint64_t ctime = 0;
flat_hash_map<int32_t, ChildGroup, nohash<int32_t>> cmap;
flat_hash_map<int16_t, ChildGroup, nohash<int16_t>> cmap;
cmap.reserve( 128 );
for( size_t i=0; i<children.size(); i++ )
{