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

Apply group filters to the samples statistics in the "find zone" window

reduce memory by storing the thread ids next to the zones intead of
making zone lists per thread.

speed-up by reading the zones in linear order rather than bisecting
the whole list for each sample.
This commit is contained in:
xavier
2021-09-13 21:40:02 +02:00
parent 41130d2a69
commit 63acfe72e7
2 changed files with 105 additions and 66 deletions
+5 -6
View File
@@ -516,6 +516,7 @@ private:
{
uint16_t id;
Vector<short_ptr<ZoneEvent>> zones;
Vector<uint16_t> zonesTids;
int64_t time = 0;
};
@@ -563,12 +564,10 @@ private:
} binCache;
struct {
unordered_flat_map<uint16_t, Vector<short_ptr<ZoneEvent>> > threads;
Vector<SymList> counts;
int64_t timeRange = 0;
bool scheduleUpdate = false;
bool needZonesPerThread = false;
} samplesCache;
bool enabled = false;
} samples;
void Reset()
{
@@ -595,8 +594,6 @@ private:
{
ResetSelection();
groups.clear();
samplesCache.threads.clear();
samplesCache.counts.clear();
processed = 0;
groupId = 0;
selCs = 0;
@@ -613,6 +610,8 @@ private:
selTotal = 0;
selTime = 0;
binCache.numBins = -1;
samples.counts.clear();
samples.scheduleUpdate = true;
}
void ShowZone( int16_t srcloc, const char* name )