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-10-08 00:54:36 +0400
committerMark Probst <mark.probst@gmail.com>2014-11-26 21:38:46 +0300
commit4318dac63c3ae2b2d1ab8ad9989a706420ace9e2 (patch)
tree62bb7070f5bf5c32649d9d246bace2095827d28b /tools
parentedeb6549140ba284eeb3879d557a59e8e26506ce (diff)
[sgen] Separate binary protocol entries for concurrent update and finish.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sgen/gcpausevis.py56
-rw-r--r--tools/sgen/sgen-grep-binprot.c23
2 files changed, 59 insertions, 20 deletions
diff --git a/tools/sgen/gcpausevis.py b/tools/sgen/gcpausevis.py
index 87d3e64d4ed..a309e02093d 100755
--- a/tools/sgen/gcpausevis.py
+++ b/tools/sgen/gcpausevis.py
@@ -39,33 +39,61 @@ if len (files) != 1:
sys.exit (1)
data = []
-minor_pausetimes = []
-major_pausetimes = []
grep_input = open (files [0])
proc = subprocess.Popen ([sgen_grep_path, '--pause-times'], stdin = grep_input, stdout = subprocess.PIPE)
for line in iter (proc.stdout.readline, ''):
- m = re.match ('^pause-time (\d+) (\d+) (\d+) (\d+)', line)
+ m = re.match ('^pause-time (\d+) (\d+) (\d+) (\d+) (\d+)', line)
if m:
+ minor_work = major_work = False
generation = int (m.group (1))
- concurrent = int (m.group (2))
- msecs = int (m.group (3)) / 10.0 / 1000.0
- start = int (m.group (4)) / 10.0 / 1000.0
- if generation == 0:
- generation = "minor"
- minor_pausetimes.append (msecs)
- else:
- generation = "major"
- major_pausetimes.append (msecs)
- if concurrent == 1:
+ concurrent = int (m.group (2)) != 0
+ finish = int (m.group (3)) != 0
+ msecs = int (m.group (4)) / 10.0 / 1000.0
+ start = int (m.group (5)) / 10.0 / 1000.0
+
+ if concurrent:
kind = "CONC"
else:
kind = "SYNC"
- rec = (generation, start, start + msecs, kind)
+
+ if generation == 0:
+ minor_work = True
+ if concurrent:
+ major_work = True
+ gctype = "nursery+update"
+ else:
+ gctype = "nursery"
+ else:
+ major_work = True
+ if concurrent:
+ if finish:
+ minor_work = True
+ gctype = "nursery+finish"
+ else:
+ gctype = "start"
+ else:
+ gctype = "full"
+
+ rec = (minor_work, major_work, start, start + msecs, kind, gctype)
print rec
data.append (rec)
if show_histogram:
+ minor_pausetimes = []
+ major_pausetimes = []
+
+ for rec in data:
+ (minor_work, major_work, start_ts, finish_ts, kind, gctype) = rec
+ pause = finish_ts - start_ts
+ if minor_work and major_work and show_minor and show_major:
+ major_pausetimes.append (pause)
+ else:
+ if minor_work:
+ minor_pausetimes.append (pause)
+ if major_work:
+ major_pausetimes.append (pause)
+
pausetimes = []
if show_minor:
pausetimes += minor_pausetimes
diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c
index 6ae484b7cf4..984f3a23993 100644
--- a/tools/sgen/sgen-grep-binprot.c
+++ b/tools/sgen/sgen-grep-binprot.c
@@ -26,7 +26,8 @@ read_entry (FILE *in, void **data)
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_CONCURRENT_UPDATE: size = 0; break;
+ case SGEN_PROTOCOL_CONCURRENT_FINISH: size = 0; 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;
@@ -83,7 +84,8 @@ is_always_match (int type)
case SGEN_PROTOCOL_COLLECTION_BEGIN:
case SGEN_PROTOCOL_COLLECTION_END:
case SGEN_PROTOCOL_CONCURRENT_START:
- case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH:
+ case SGEN_PROTOCOL_CONCURRENT_UPDATE:
+ case SGEN_PROTOCOL_CONCURRENT_FINISH:
case SGEN_PROTOCOL_WORLD_STOPPING:
case SGEN_PROTOCOL_WORLD_STOPPED:
case SGEN_PROTOCOL_WORLD_RESTARTING:
@@ -131,8 +133,12 @@ print_entry (int type, void *data)
printf ("concurrent start\n");
break;
}
- case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH: {
- printf ("concurrent update or finish\n");
+ case SGEN_PROTOCOL_CONCURRENT_UPDATE: {
+ printf ("concurrent update\n");
+ break;
+ }
+ case SGEN_PROTOCOL_CONCURRENT_FINISH: {
+ printf ("concurrent finish\n");
break;
}
case SGEN_PROTOCOL_WORLD_STOPPING: {
@@ -494,6 +500,7 @@ main (int argc, char *argv[])
gboolean pause_times = FALSE;
gboolean pause_times_stopped = FALSE;
gboolean pause_times_concurrent = FALSE;
+ gboolean pause_times_finish = FALSE;
long long pause_times_ts = 0;
for (i = 0; i < num_args; ++i) {
@@ -523,20 +530,24 @@ main (int argc, char *argv[])
SGenProtocolWorldStopping *entry = data;
assert (!pause_times_stopped);
pause_times_concurrent = FALSE;
+ pause_times_finish = FALSE;
pause_times_ts = entry->timestamp;
pause_times_stopped = TRUE;
break;
}
+ case SGEN_PROTOCOL_CONCURRENT_FINISH:
+ pause_times_finish = TRUE;
case SGEN_PROTOCOL_CONCURRENT_START:
- case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH:
+ case SGEN_PROTOCOL_CONCURRENT_UPDATE:
pause_times_concurrent = TRUE;
break;
case SGEN_PROTOCOL_WORLD_RESTARTED: {
SGenProtocolWorldRestarted *entry = data;
assert (pause_times_stopped);
- printf ("pause-time %d %d %lld %lld\n",
+ printf ("pause-time %d %d %d %lld %lld\n",
entry->generation,
pause_times_concurrent,
+ pause_times_finish,
entry->timestamp - pause_times_ts,
pause_times_ts);
pause_times_stopped = FALSE;