2 * sgen-protocol.h: Binary protocol of internal activity, to aid
5 * Copyright 2001-2003 Ximian, Inc
6 * Copyright 2003-2010 Novell, Inc.
7 * Copyright (C) 2012 Xamarin Inc
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License 2.0 as published by the Free Software Foundation;
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License 2.0 along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifdef SGEN_BINARY_PROTOCOL
28 SGEN_PROTOCOL_COLLECTION_FORCE,
29 SGEN_PROTOCOL_COLLECTION_BEGIN,
30 SGEN_PROTOCOL_COLLECTION_END,
35 SGEN_PROTOCOL_SCAN_BEGIN,
36 SGEN_PROTOCOL_SCAN_VTYPE_BEGIN,
37 SGEN_PROTOCOL_WBARRIER,
38 SGEN_PROTOCOL_GLOBAL_REMSET,
39 SGEN_PROTOCOL_PTR_UPDATE,
40 SGEN_PROTOCOL_CLEANUP,
42 SGEN_PROTOCOL_THREAD_SUSPEND,
43 SGEN_PROTOCOL_THREAD_RESTART,
44 SGEN_PROTOCOL_THREAD_REGISTER,
45 SGEN_PROTOCOL_THREAD_UNREGISTER,
46 SGEN_PROTOCOL_MISSING_REMSET,
47 SGEN_PROTOCOL_ALLOC_PINNED,
48 SGEN_PROTOCOL_ALLOC_DEGRADED,
49 SGEN_PROTOCOL_CARD_SCAN,
51 SGEN_PROTOCOL_CEMENT_RESET,
52 SGEN_PROTOCOL_DISLINK_UPDATE
57 } SGenProtocolCollectionForce;
60 int index, generation;
61 } SGenProtocolCollection;
92 } SGenProtocolScanBegin;
97 } SGenProtocolScanVTypeBegin;
102 gpointer value_vtable;
103 } SGenProtocolWBarrier;
108 gpointer value_vtable;
109 } SGenProtocolGlobalRemset;
117 } SGenProtocolPtrUpdate;
123 } SGenProtocolCleanup;
131 gpointer thread, stopped_ip;
132 } SGenProtocolThreadSuspend;
136 } SGenProtocolThreadRestart;
140 } SGenProtocolThreadRegister;
144 } SGenProtocolThreadUnregister;
151 gpointer value_vtable;
153 } SGenProtocolMissingRemset;
158 } SGenProtocolCardScan;
164 } SGenProtocolCement;
170 } SGenProtocolDislinkUpdate;
172 /* missing: finalizers, dislinks, roots, non-store wbarriers */
174 void binary_protocol_init (const char *filename) MONO_INTERNAL;
175 gboolean binary_protocol_is_enabled (void) MONO_INTERNAL;
177 void binary_protocol_flush_buffers (gboolean force) MONO_INTERNAL;
179 void binary_protocol_collection_force (int generation) MONO_INTERNAL;
180 void binary_protocol_collection_begin (int index, int generation) MONO_INTERNAL;
181 void binary_protocol_collection_end (int index, int generation) MONO_INTERNAL;
182 void binary_protocol_alloc (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
183 void binary_protocol_alloc_pinned (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
184 void binary_protocol_alloc_degraded (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
185 void binary_protocol_copy (gpointer from, gpointer to, gpointer vtable, int size) MONO_INTERNAL;
186 void binary_protocol_pin (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
187 void binary_protocol_mark (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
188 void binary_protocol_scan_begin (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
189 void binary_protocol_scan_vtype_begin (gpointer start, int size) MONO_INTERNAL;
190 void binary_protocol_wbarrier (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
191 void binary_protocol_global_remset (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
192 void binary_protocol_ptr_update (gpointer ptr, gpointer old_value, gpointer new_value, gpointer vtable, int size) MONO_INTERNAL;
193 void binary_protocol_cleanup (gpointer ptr, gpointer vtable, int size) MONO_INTERNAL;
194 void binary_protocol_empty (gpointer start, int size) MONO_INTERNAL;
195 void binary_protocol_thread_suspend (gpointer thread, gpointer stopped_ip) MONO_INTERNAL;
196 void binary_protocol_thread_restart (gpointer thread) MONO_INTERNAL;
197 void binary_protocol_thread_register (gpointer thread) MONO_INTERNAL;
198 void binary_protocol_thread_unregister (gpointer thread) MONO_INTERNAL;
199 void binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offset,
200 gpointer value, gpointer value_vtable, int value_pinned) MONO_INTERNAL;
201 void binary_protocol_card_scan (gpointer start, int size) MONO_INTERNAL;
202 void binary_protocol_cement (gpointer ptr, gpointer vtable, int size) MONO_INTERNAL;
203 void binary_protocol_cement_reset (void) MONO_INTERNAL;
204 void binary_protocol_dislink_update (gpointer link, gpointer obj, int track) MONO_INTERNAL;
208 #define binary_protocol_is_enabled() FALSE
210 #define binary_protocol_flush_buffers(force)
211 #define binary_protocol_collection_force(generation)
212 #define binary_protocol_collection_begin(index, generation)
213 #define binary_protocol_collection_end(index, generation)
214 #define binary_protocol_alloc(obj, vtable, size)
215 #define binary_protocol_alloc_pinned(obj, vtable, size)
216 #define binary_protocol_alloc_degraded(obj, vtable, size)
217 #define binary_protocol_copy(from, to, vtable, size)
218 #define binary_protocol_pin(obj, vtable, size)
219 #define binary_protocol_mark(obj, vtable, size)
220 #define binary_protocol_scan_begin(obj, vtable, size)
221 #define binary_protocol_scan_vtype_begin(obj, size)
222 #define binary_protocol_wbarrier(ptr, value, value_vtable)
223 #define binary_protocol_global_remset(ptr, value, value_vtable)
224 #define binary_protocol_ptr_update(ptr, old_value, new_value, vtable, size)
225 #define binary_protocol_cleanup(ptr, vtable, size)
226 #define binary_protocol_empty(start, size)
227 #define binary_protocol_thread_suspend(thread, ip)
228 #define binary_protocol_thread_restart(thread)
229 #define binary_protocol_thread_register(thread)
230 #define binary_protocol_thread_unregister(thread)
231 #define binary_protocol_missing_remset(obj, obj_vtable, offset, value, value_vtable, value_pinned)
232 #define binary_protocol_card_scan(start, size)
233 #define binary_protocol_cement(ptr, vtable, size)
234 #define binary_protocol_cement_reset()
235 #define binary_protocol_dislink_update(link,obj,track)