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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Probst <mark.probst@gmail.com>2014-08-14 23:26:10 +0400
committerMark Probst <mark.probst@gmail.com>2014-11-26 21:38:35 +0300
commit44e806f6cba7ebd13771d86153682be47412f64b (patch)
tree109b2cccaebf41c584302be7f858b23de14fa37a /tools
parentab83e6316d9acfda22c592458f341018ae92bd22 (diff)
[sgen] Count scanned objects.
Diffstat (limited to 'tools')
-rw-r--r--tools/sgen/sgen-grep-binprot.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c
index 75777315688..9650af69c46 100644
--- a/tools/sgen/sgen-grep-binprot.c
+++ b/tools/sgen/sgen-grep-binprot.c
@@ -23,8 +23,8 @@ read_entry (FILE *in, void **data)
return SGEN_PROTOCOL_EOF;
switch (TYPE (type)) {
case SGEN_PROTOCOL_COLLECTION_FORCE: size = sizeof (SGenProtocolCollectionForce); break;
- case SGEN_PROTOCOL_COLLECTION_BEGIN: size = sizeof (SGenProtocolCollection); break;
- case SGEN_PROTOCOL_COLLECTION_END: size = sizeof (SGenProtocolCollection); break;
+ case SGEN_PROTOCOL_COLLECTION_BEGIN: size = sizeof (SGenProtocolCollectionBegin); break;
+ case SGEN_PROTOCOL_COLLECTION_END: size = sizeof (SGenProtocolCollectionEnd); break;
case SGEN_PROTOCOL_CONCURRENT_START: size = 0; break;
case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH: size = 0; break;
case SGEN_PROTOCOL_WORLD_STOPPING: size = sizeof (SGenProtocolWorldStopping); break;
@@ -117,13 +117,15 @@ print_entry (int type, void *data)
break;
}
case SGEN_PROTOCOL_COLLECTION_BEGIN: {
- SGenProtocolCollection *entry = data;
+ SGenProtocolCollectionBegin *entry = data;
printf ("collection begin %d generation %d\n", entry->index, entry->generation);
break;
}
case SGEN_PROTOCOL_COLLECTION_END: {
- SGenProtocolCollection *entry = data;
- printf ("collection end %d generation %d\n", entry->index, entry->generation);
+ SGenProtocolCollectionEnd *entry = data;
+ long long scanned = entry->num_scanned_objects;
+ long long unique = entry->num_unique_scanned_objects;
+ printf ("collection end %d generation %d scanned %lld unique %lld %0.2f%%\n", entry->index, entry->generation, scanned, unique, unique ? 100.0 * (double) scanned / (double) unique : 0.0);
break;
}
case SGEN_PROTOCOL_CONCURRENT_START: {