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 mono_bridge_processing_in_progress
;
23 extern MonoGCBridgeCallbacks mono_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 // Disables reporting SCCs with no bridge objects on tarjan. Used when comparing outputs
46 // of two bridge processors, in order to keep consistency.
47 gboolean disable_non_bridge_scc
;
48 } SgenBridgeProcessorConfig
;
51 void (*reset_data
) (void);
52 void (*processing_stw_step
) (void);
53 void (*processing_build_callback_data
) (int generation
);
54 void (*processing_after_callback
) (int generation
);
55 MonoGCBridgeObjectKind (*class_kind
) (MonoClass
*klass
);
56 void (*register_finalized_object
) (GCObject
*object
);
57 void (*describe_pointer
) (GCObject
*object
);
59 /* Should be called once, immediately after init */
60 void (*set_config
) (const SgenBridgeProcessorConfig
*);
63 * These are set by processing_build_callback_data().
66 MonoGCBridgeSCC
**api_sccs
;
69 MonoGCBridgeXRef
*api_xrefs
;
70 } SgenBridgeProcessor
;
72 void sgen_old_bridge_init (SgenBridgeProcessor
*collector
);
73 void sgen_new_bridge_init (SgenBridgeProcessor
*collector
);
74 void sgen_tarjan_bridge_init (SgenBridgeProcessor
*collector
);
75 void sgen_set_bridge_implementation (const char *name
);
76 void sgen_bridge_set_dump_prefix (const char *prefix
);
77 void sgen_init_bridge (void);