From 0cf5e18538dc24d4745b2fb2f1091e7b98a7ae19 Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Thu, 1 Nov 2012 14:03:35 +0100 Subject: [sgen] Separate binary protocol entries for collection begin and end. --- tools/sgen/sgen-grep-binprot.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tools/sgen') diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c index 2195f4ff3fb..66d307e2f9d 100644 --- a/tools/sgen/sgen-grep-binprot.c +++ b/tools/sgen/sgen-grep-binprot.c @@ -19,7 +19,8 @@ read_entry (FILE *in, void **data) if (fread (&type, 1, 1, in) != 1) return SGEN_PROTOCOL_EOF; switch (type) { - case SGEN_PROTOCOL_COLLECTION: size = sizeof (SGenProtocolCollection); break; + case SGEN_PROTOCOL_COLLECTION_BEGIN: size = sizeof (SGenProtocolCollection); break; + case SGEN_PROTOCOL_COLLECTION_END: size = sizeof (SGenProtocolCollection); 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; @@ -50,9 +51,14 @@ static void print_entry (int type, void *data) { switch (type) { - case SGEN_PROTOCOL_COLLECTION: { + case SGEN_PROTOCOL_COLLECTION_BEGIN: { SGenProtocolCollection *entry = data; - printf ("collection %d generation %d\n", entry->index, entry->generation); + 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); break; } case SGEN_PROTOCOL_ALLOC: { @@ -152,7 +158,8 @@ static gboolean is_match (gpointer ptr, int type, void *data) { switch (type) { - case SGEN_PROTOCOL_COLLECTION: + case SGEN_PROTOCOL_COLLECTION_BEGIN: + case SGEN_PROTOCOL_COLLECTION_END: case SGEN_PROTOCOL_THREAD_SUSPEND: case SGEN_PROTOCOL_THREAD_RESTART: case SGEN_PROTOCOL_THREAD_REGISTER: -- cgit v1.2.3