5 * Copyright (C) 2015 Xamarin Inc
7 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 #ifndef __MONO_SGENBRIDGEINTERNAL_H__
11 #define __MONO_SGENBRIDGEINTERNAL_H__
17 #include "mono/utils/mono-compiler.h"
19 #include "mono/sgen/sgen-gc.h"
20 #include "mono/metadata/sgen-bridge.h"
22 extern volatile gboolean bridge_processing_in_progress
;
23 extern MonoGCBridgeCallbacks bridge_callbacks
;
25 gboolean
sgen_need_bridge_processing (void);
26 void sgen_bridge_reset_data (void);
27 void sgen_bridge_processing_stw_step (void);
28 void sgen_bridge_processing_finish (int generation
);
29 gboolean
sgen_is_bridge_object (GCObject
*obj
);
30 MonoGCBridgeObjectKind
sgen_bridge_class_kind (MonoClass
*klass
);
31 void sgen_bridge_register_finalized_object (GCObject
*object
);
32 void sgen_bridge_describe_pointer (GCObject
*object
);
34 gboolean
sgen_is_bridge_object (GCObject
*obj
);
35 void sgen_mark_bridge_object (GCObject
*obj
);
37 gboolean
sgen_bridge_handle_gc_param (const char *opt
);
38 gboolean
sgen_bridge_handle_gc_debug (const char *opt
);
39 void sgen_bridge_print_gc_debug_usage (void);
44 gboolean scc_precise_merge
; // Used by Tarjan
45 } SgenBridgeProcessorConfig
;
48 void (*reset_data
) (void);
49 void (*processing_stw_step
) (void);
50 void (*processing_build_callback_data
) (int generation
);
51 void (*processing_after_callback
) (int generation
);
52 MonoGCBridgeObjectKind (*class_kind
) (MonoClass
*klass
);
53 void (*register_finalized_object
) (GCObject
*object
);
54 void (*describe_pointer
) (GCObject
*object
);
56 /* Should be called once, immediately after init */
57 void (*set_config
) (const SgenBridgeProcessorConfig
*);
60 * These are set by processing_build_callback_data().
63 MonoGCBridgeSCC
**api_sccs
;
66 MonoGCBridgeXRef
*api_xrefs
;
67 } SgenBridgeProcessor
;
69 void sgen_old_bridge_init (SgenBridgeProcessor
*collector
);
70 void sgen_new_bridge_init (SgenBridgeProcessor
*collector
);
71 void sgen_tarjan_bridge_init (SgenBridgeProcessor
*collector
);
72 void sgen_set_bridge_implementation (const char *name
);
73 void sgen_bridge_set_dump_prefix (const char *prefix
);
74 void sgen_init_bridge (void);