aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-09-15 07:36:58 -0400
committerGitHub <[email protected]>2023-09-15 13:36:58 +0200
commit6163987f858597e92e68a61ed35be35bd4e7a552 (patch)
tree94e78c3865f7f288df041636f9471b5a1511792b /src/zenstore/gc.cpp
parentupdated CHANGELOG.md release versions (diff)
downloadzen-6163987f858597e92e68a61ed35be35bd4e7a552.tar.xz
zen-6163987f858597e92e68a61ed35be35bd4e7a552.zip
add more trace scopes (#362)
* more trace scopes * Make sure ReplayLogEntries uses the correct size for oplog buffer * changelog
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index 79aea2752..a3282dde6 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -399,6 +399,7 @@ GcManager::CollectGarbage(GcContext& GcCtx)
// First gather reference set
{
+ ZEN_TRACE_CPU("Gc::CollectGarbage::GatherReferences");
Stopwatch Timer;
const auto Guard = MakeGuard([&] { ZEN_INFO("gathered references in {}", NiceTimeSpanMs(Timer.GetElapsedTimeMs())); });
for (GcContributor* Contributor : m_GcContribs)
@@ -409,6 +410,8 @@ GcManager::CollectGarbage(GcContext& GcCtx)
// Then trim storage
{
+ ZEN_TRACE_CPU("Gc::CollectGarbage::CollectGarbage");
+
GcStorageSize GCTotalSizeDiff;
Stopwatch Timer;
const auto Guard = MakeGuard([&] {
@@ -989,6 +992,8 @@ GcScheduler::CollectGarbage(const GcClock::TimePoint& CacheExpireTime,
bool Delete,
bool CollectSmallObjects)
{
+ ZEN_TRACE_CPU("GcScheduler::CollectGarbage");
+
GcContext GcCtx(CacheExpireTime, ProjectStoreExpireTime);
GcCtx.SetDeletionMode(Delete);
GcCtx.CollectSmallObjects(CollectSmallObjects);