2009-03-11 Zoltan Varga <vargaz@gmail.com>
[mono-debugger.git] / mono / metadata / profiler-private.h
blobf85da9bb219df4bb13685cd4ff268e2758a2f53f
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"
8 extern MonoProfileFlags mono_profiler_events;
10 enum {
11 MONO_PROFILE_START_LOAD,
12 MONO_PROFILE_END_LOAD,
13 MONO_PROFILE_START_UNLOAD,
14 MONO_PROFILE_END_UNLOAD
17 typedef struct {
18 int entries;
19 struct {
20 guchar* cil_code;
21 int count;
22 } data [1];
23 } MonoProfileCoverageInfo;
25 void mono_profiler_shutdown (void) MONO_INTERNAL;
27 void mono_profiler_method_enter (MonoMethod *method) MONO_INTERNAL;
28 void mono_profiler_method_leave (MonoMethod *method) MONO_INTERNAL;
29 void mono_profiler_method_jit (MonoMethod *method) MONO_INTERNAL;
30 void mono_profiler_method_end_jit (MonoMethod *method, MonoJitInfo* jinfo, int result) MONO_INTERNAL;
31 void mono_profiler_method_free (MonoMethod *method) MONO_INTERNAL;
33 void mono_profiler_code_transition (MonoMethod *method, int result) MONO_INTERNAL;
34 void mono_profiler_allocation (MonoObject *obj, MonoClass *klass) MONO_INTERNAL;
35 void mono_profiler_stat_hit (guchar *ip, void *context) MONO_INTERNAL;
36 void mono_profiler_stat_call_chain (int call_chain_depth, guchar **ips, void *context) MONO_INTERNAL;
37 #define MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH 16
38 int mono_profiler_stat_get_call_chain_depth (void) MONO_INTERNAL;
39 void mono_profiler_thread_start (gsize tid) MONO_INTERNAL;
40 void mono_profiler_thread_end (gsize tid) MONO_INTERNAL;
42 void mono_profiler_exception_thrown (MonoObject *exception) MONO_INTERNAL;
43 void mono_profiler_exception_method_leave (MonoMethod *method) MONO_INTERNAL;
44 void mono_profiler_exception_clause_handler (MonoMethod *method, int clause_type, int clause_num) MONO_INTERNAL;
46 void mono_profiler_assembly_event (MonoAssembly *assembly, int code) MONO_INTERNAL;
47 void mono_profiler_assembly_loaded (MonoAssembly *assembly, int result) MONO_INTERNAL;
49 void mono_profiler_module_event (MonoImage *image, int code) MONO_INTERNAL;
50 void mono_profiler_module_loaded (MonoImage *image, int result) MONO_INTERNAL;
52 void mono_profiler_class_event (MonoClass *klass, int code) MONO_INTERNAL;
53 void mono_profiler_class_loaded (MonoClass *klass, int result) MONO_INTERNAL;
55 void mono_profiler_appdomain_event (MonoDomain *domain, int code) MONO_INTERNAL;
56 void mono_profiler_appdomain_loaded (MonoDomain *domain, int result) MONO_INTERNAL;
58 MonoProfileCoverageInfo* mono_profiler_coverage_alloc (MonoMethod *method, int entries) MONO_INTERNAL;
59 void mono_profiler_coverage_free (MonoMethod *method) MONO_INTERNAL;
61 void mono_profiler_gc_event (MonoGCEvent e, int generation) MONO_INTERNAL;
62 void mono_profiler_gc_heap_resize (gint64 new_size) MONO_INTERNAL;
64 void mono_profiler_runtime_initialized (void) MONO_INTERNAL;
66 #endif /* __MONO_PROFILER_PRIVATE_H__ */