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-01-22 02:36:15 +0400
committerMark Probst <mark.probst@gmail.com>2014-04-17 01:18:15 +0400
commit35f397edc8526dafa31ad09ac5376504cdc41260 (patch)
tree33559042a3bf6bfaf9a90d5c89f6f9b4de34d99a /tools
parent9f6ab33462d2ea539d3a9b9c9e686b8cc4ab394e (diff)
[sgen] Count cards for binary protocol.
Diffstat (limited to 'tools')
-rw-r--r--tools/sgen/sgen-grep-binprot.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c
index 787e033cadb..5d501b39cc7 100644
--- a/tools/sgen/sgen-grep-binprot.c
+++ b/tools/sgen/sgen-grep-binprot.c
@@ -27,8 +27,10 @@ read_entry (FILE *in, void **data)
case SGEN_PROTOCOL_COLLECTION_END: size = sizeof (SGenProtocolCollection); 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 (SGenProtocolWorldStop); break;
- case SGEN_PROTOCOL_WORLD_RESTARTED: size = sizeof (SGenProtocolWorldRestart); break;
+ case SGEN_PROTOCOL_WORLD_STOPPING: size = sizeof (SGenProtocolWorldStopping); break;
+ case SGEN_PROTOCOL_WORLD_STOPPED: size = sizeof (SGenProtocolWorldStopped); break;
+ case SGEN_PROTOCOL_WORLD_RESTARTING: size = sizeof (SGenProtocolWorldRestarting); break;
+ case SGEN_PROTOCOL_WORLD_RESTARTED: size = sizeof (SGenProtocolWorldRestarted); break;
case SGEN_PROTOCOL_ALLOC: size = sizeof (SGenProtocolAlloc); break;
case SGEN_PROTOCOL_ALLOC_PINNED: size = sizeof (SGenProtocolAlloc); break;
case SGEN_PROTOCOL_ALLOC_DEGRADED: size = sizeof (SGenProtocolAlloc); break;
@@ -99,12 +101,26 @@ print_entry (int type, void *data)
break;
}
case SGEN_PROTOCOL_WORLD_STOPPING: {
- SGenProtocolWorldStop *entry = data;
+ SGenProtocolWorldStopping *entry = data;
printf ("%s world stopping timestamp %lld\n", WORKER_PREFIX (type), entry->timestamp);
break;
}
+ case SGEN_PROTOCOL_WORLD_STOPPED: {
+ SGenProtocolWorldStopped *entry = data;
+ long long total = entry->total_major_cards + entry->total_los_cards;
+ long long marked = entry->marked_major_cards + entry->marked_los_cards;
+ printf ("%s world stopped timestamp %lld total %lld marked %lld %0.2f%%\n", WORKER_PREFIX (type), entry->timestamp, total, marked, 100.0 * (double) marked / (double) total);
+ break;
+ }
+ case SGEN_PROTOCOL_WORLD_RESTARTING: {
+ SGenProtocolWorldRestarting *entry = data;
+ long long total = entry->total_major_cards + entry->total_los_cards;
+ long long marked = entry->marked_major_cards + entry->marked_los_cards;
+ printf ("%s world restarting generation %d timestamp %lld total %lld marked %lld %0.2f%%\n", WORKER_PREFIX (type), entry->generation, entry->timestamp, total, marked, 100.0 * (double) marked / (double) total);
+ break;
+ }
case SGEN_PROTOCOL_WORLD_RESTARTED: {
- SGenProtocolWorldRestart *entry = data;
+ SGenProtocolWorldRestarted *entry = data;
printf ("%s world restarted generation %d timestamp %lld\n", WORKER_PREFIX (type), entry->generation, entry->timestamp);
break;
}
@@ -268,6 +284,8 @@ is_match (gpointer ptr, int type, void *data)
case SGEN_PROTOCOL_CONCURRENT_START:
case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH:
case SGEN_PROTOCOL_WORLD_STOPPING:
+ case SGEN_PROTOCOL_WORLD_STOPPED:
+ case SGEN_PROTOCOL_WORLD_RESTARTING:
case SGEN_PROTOCOL_WORLD_RESTARTED:
case SGEN_PROTOCOL_THREAD_SUSPEND:
case SGEN_PROTOCOL_THREAD_RESTART:
@@ -446,7 +464,7 @@ main (int argc, char *argv[])
if (pause_times) {
switch (type) {
case SGEN_PROTOCOL_WORLD_STOPPING: {
- SGenProtocolWorldStop *entry = data;
+ SGenProtocolWorldStopping *entry = data;
assert (!pause_times_stopped);
pause_times_concurrent = FALSE;
pause_times_ts = entry->timestamp;
@@ -458,7 +476,7 @@ main (int argc, char *argv[])
pause_times_concurrent = TRUE;
break;
case SGEN_PROTOCOL_WORLD_RESTARTED: {
- SGenProtocolWorldRestart *entry = data;
+ SGenProtocolWorldRestarted *entry = data;
assert (pause_times_stopped);
printf ("pause-time %d %d %lld %lld\n",
entry->generation,