New tests.
[mono.git] / tools / sgen / sgen-grep-binprot.c
index 849433ddc9eb8bcf3dfb101a236d6a3a875e9a99..67a9b3f211e54743ee69cd975c9bc0f11a852b5a 100644 (file)
@@ -3,7 +3,7 @@
 #include <assert.h>
 #include <glib.h>
 
-#include "../mono/metadata/sgen-protocol.h"
+#include <mono/metadata/sgen-protocol.h>
 
 #define SGEN_PROTOCOL_EOF      255
 
@@ -20,6 +20,7 @@ read_entry (FILE *in, void **data)
        case SGEN_PROTOCOL_ALLOC: size = sizeof (SGenProtocolAlloc); break;
        case SGEN_PROTOCOL_COPY: size = sizeof (SGenProtocolCopy); break;
        case SGEN_PROTOCOL_PIN: size = sizeof (SGenProtocolPin); break;
+       case SGEN_PROTOCOL_MARK: size = sizeof (SGenProtocolMark); break;
        case SGEN_PROTOCOL_WBARRIER: size = sizeof (SGenProtocolWBarrier); break;
        case SGEN_PROTOCOL_GLOBAL_REMSET: size = sizeof (SGenProtocolGlobalRemset); break;
        case SGEN_PROTOCOL_PTR_UPDATE: size = sizeof (SGenProtocolPtrUpdate); break;
@@ -63,6 +64,11 @@ print_entry (int type, void *data)
                printf ("pin obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
+       case SGEN_PROTOCOL_MARK: {
+               SGenProtocolMark *entry = data;
+               printf ("mark obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
+               break;
+       }
        case SGEN_PROTOCOL_WBARRIER: {
                SGenProtocolWBarrier *entry = data;
                printf ("wbarrier ptr %p value %p value_vtable %p\n", entry->ptr, entry->value, entry->value_vtable);
@@ -142,6 +148,10 @@ is_match (gpointer ptr, int type, void *data)
                SGenProtocolPin *entry = data;
                return matches_interval (ptr, entry->obj, entry->size);
        }
+       case SGEN_PROTOCOL_MARK: {
+               SGenProtocolMark *entry = data;
+               return matches_interval (ptr, entry->obj, entry->size);
+       }
        case SGEN_PROTOCOL_WBARRIER: {
                SGenProtocolWBarrier *entry = data;
                return ptr == entry->ptr || ptr == entry->value;