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>2013-07-12 00:25:42 +0400
committerMark Probst <mark.probst@gmail.com>2013-07-17 01:41:40 +0400
commitaef4b77ea79aa0a4c06e10bd5842da9df0d10973 (patch)
treee7cb4fdacf5a206eec22d6a8d5f47c92b5e6cfe2 /tools
parentfc1145ae84f6f10c91cc8032d9d853eda605c26b (diff)
Fix race conditions in finalizer/weak link staging.
Diffstat (limited to 'tools')
-rw-r--r--tools/sgen/sgen-grep-binprot.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c
index 3dfda20fa21..2ba9325882e 100644
--- a/tools/sgen/sgen-grep-binprot.c
+++ b/tools/sgen/sgen-grep-binprot.c
@@ -44,6 +44,8 @@ read_entry (FILE *in, void **data)
case SGEN_PROTOCOL_CEMENT: size = sizeof (SGenProtocolCement); break;
case SGEN_PROTOCOL_CEMENT_RESET: size = 0; break;
case SGEN_PROTOCOL_DISLINK_UPDATE: size = sizeof (SGenProtocolDislinkUpdate); break;
+ case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: size = sizeof (SGenProtocolDislinkUpdateStaged); break;
+ case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: size = sizeof (SGenProtocolDislinkProcessStaged); break;
default: assert (0);
}
@@ -185,13 +187,27 @@ print_entry (int type, void *data)
}
case SGEN_PROTOCOL_DISLINK_UPDATE: {
SGenProtocolDislinkUpdate *entry = data;
- printf ("dislink_update link %p obj %p", entry->link, entry->obj);
+ printf ("dislink_update link %p obj %p staged %d", entry->link, entry->obj, entry->staged);
if (entry->obj)
printf (" track %d\n", entry->track);
else
printf ("\n");
break;
}
+ case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: {
+ SGenProtocolDislinkUpdateStaged *entry = data;
+ printf ("dislink_update_staged link %p obj %p index %d", entry->link, entry->obj, entry->index);
+ if (entry->obj)
+ printf (" track %d\n", entry->track);
+ else
+ printf ("\n");
+ break;
+ }
+ case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: {
+ SGenProtocolDislinkProcessStaged *entry = data;
+ printf ("dislink_process_staged link %p obj %p index %d\n", entry->link, entry->obj, entry->index);
+ break;
+ }
default:
assert (0);
}
@@ -280,6 +296,14 @@ is_match (gpointer ptr, int type, void *data)
SGenProtocolDislinkUpdate *entry = data;
return ptr == entry->obj || ptr == entry->link;
}
+ case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: {
+ SGenProtocolDislinkUpdateStaged *entry = data;
+ return ptr == entry->obj || ptr == entry->link;
+ }
+ case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: {
+ SGenProtocolDislinkProcessStaged *entry = data;
+ return ptr == entry->obj || ptr == entry->link;
+ }
default:
assert (0);
}