2 #ifndef __MONO_PROFILER_PRIVATE_H__
3 #define __MONO_PROFILER_PRIVATE_H__
5 #include <mono/metadata/profiler.h>
6 #include "mono/utils/mono-compiler.h"
9 extern MonoProfileFlags mono_profiler_events
;
12 MONO_PROFILE_START_LOAD
,
13 MONO_PROFILE_END_LOAD
,
14 MONO_PROFILE_START_UNLOAD
,
15 MONO_PROFILE_END_UNLOAD
24 } MonoProfileCoverageInfo
;
26 void mono_profiler_shutdown (void);
28 void mono_profiler_method_enter (MonoMethod
*method
);
29 void mono_profiler_method_leave (MonoMethod
*method
);
30 void mono_profiler_method_jit (MonoMethod
*method
);
31 void mono_profiler_method_end_jit (MonoMethod
*method
, MonoJitInfo
* jinfo
, int result
);
32 void mono_profiler_method_free (MonoMethod
*method
);
33 void mono_profiler_method_start_invoke (MonoMethod
*method
);
34 void mono_profiler_method_end_invoke (MonoMethod
*method
);
36 void mono_profiler_code_transition (MonoMethod
*method
, int result
);
37 void mono_profiler_allocation (MonoObject
*obj
);
38 void mono_profiler_monitor_event (MonoObject
*obj
, MonoProfilerMonitorEvent event
);
39 void mono_profiler_stat_hit (guchar
*ip
, void *context
);
40 void mono_profiler_stat_call_chain (int call_chain_depth
, guchar
**ips
, void *context
);
41 int mono_profiler_stat_get_call_chain_depth (void);
42 MonoProfilerCallChainStrategy
mono_profiler_stat_get_call_chain_strategy (void);
43 void mono_profiler_thread_start (gsize tid
);
44 void mono_profiler_thread_end (gsize tid
);
45 void mono_profiler_thread_name (gsize tid
, const char *name
);
47 void mono_profiler_exception_thrown (MonoObject
*exception
);
48 void mono_profiler_exception_method_leave (MonoMethod
*method
);
49 void mono_profiler_exception_clause_handler (MonoMethod
*method
, int clause_type
, int clause_num
);
51 void mono_profiler_assembly_event (MonoAssembly
*assembly
, int code
);
52 void mono_profiler_assembly_loaded (MonoAssembly
*assembly
, int result
);
54 void mono_profiler_module_event (MonoImage
*image
, int code
);
55 void mono_profiler_module_loaded (MonoImage
*image
, int result
);
57 void mono_profiler_class_event (MonoClass
*klass
, int code
);
58 void mono_profiler_class_loaded (MonoClass
*klass
, int result
);
60 void mono_profiler_appdomain_event (MonoDomain
*domain
, int code
);
61 void mono_profiler_appdomain_loaded (MonoDomain
*domain
, int result
);
62 void mono_profiler_appdomain_name (MonoDomain
*domain
, const char *name
);
64 void mono_profiler_context_loaded (MonoAppContext
*context
);
65 void mono_profiler_context_unloaded (MonoAppContext
*context
);
67 void mono_profiler_iomap (char *report
, const char *pathname
, const char *new_pathname
);
69 MonoProfileCoverageInfo
* mono_profiler_coverage_alloc (MonoMethod
*method
, int entries
);
70 void mono_profiler_coverage_free (MonoMethod
*method
);
72 void mono_profiler_gc_event (MonoGCEvent e
, int generation
);
73 void mono_profiler_gc_heap_resize (gint64 new_size
);
74 void mono_profiler_gc_moves (void **objects
, int num
);
75 void mono_profiler_gc_handle (int op
, int type
, uintptr_t handle
, MonoObject
*obj
);
76 void mono_profiler_gc_roots (int num
, void **objects
, int *root_types
, uintptr_t *extra_info
);
78 void mono_profiler_gc_finalize_begin (void);
79 void mono_profiler_gc_finalize_object_begin (MonoObject
*obj
);
80 void mono_profiler_gc_finalize_object_end (MonoObject
*obj
);
81 void mono_profiler_gc_finalize_end (void);
83 void mono_profiler_code_chunk_new (gpointer chunk
, int size
);
84 void mono_profiler_code_chunk_destroy (gpointer chunk
);
85 void mono_profiler_code_buffer_new (gpointer buffer
, int size
, MonoProfilerCodeBufferType type
, gconstpointer data
);
87 void mono_profiler_runtime_initialized (void);
89 int64_t mono_profiler_get_sampling_rate (void);
90 MonoProfileSamplingMode
mono_profiler_get_sampling_mode (void);
92 #endif /* __MONO_PROFILER_PRIVATE_H__ */