Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1082 from MartinNowak/numColls
Browse files Browse the repository at this point in the history
add number of collections to GC profile output
  • Loading branch information
schveiguy committed Jan 5, 2015
2 parents 535edc4 + ab3cb0d commit 24c7abf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ __gshared Duration prepTime;
__gshared Duration markTime;
__gshared Duration sweepTime;
__gshared Duration recoverTime;
__gshared size_t numCollections;
__gshared size_t maxPoolMemory;

private
Expand Down Expand Up @@ -1454,6 +1455,7 @@ struct Gcx
{
if (GC.config.profile)
{
printf("\tNumber of collections: %llu\n", numCollections);
printf("\tTotal GC prep time: %lld milliseconds\n",
prepTime.total!("msecs"));
printf("\tTotal mark time: %lld milliseconds\n",
Expand Down Expand Up @@ -2806,6 +2808,7 @@ struct Gcx
{
stop = currTime;
recoverTime += (stop - start);
++numCollections;
}

debug(COLLECT_PRINTF) printf("\trecovered pages = %d\n", recoveredpages);
Expand Down

0 comments on commit 24c7abf

Please sign in to comment.