2010-02-13 Jb Evain <jbevain@novell.com>
[mono-project.git] / mono / metadata / profiler-private.h
blob64d9822844139598c8af46a2715a87594f22659d
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"
7 #include <glib.h>
9 extern MonoProfileFlags mono_profiler_events;
11 enum {
12 MONO_PROFILE_START_LOAD,
13 MONO_PROFILE_END_LOAD,
14 MONO_PROFILE_START_UNLOAD,
15 MONO_PROFILE_END_UNLOAD
18 typedef struct {
19 int entries;
20 struct {
21 guchar* cil_code;
22 int count;
23 } data [1];
24 } MonoProfileCoverageInfo;
26 void mono_profiler_shutdown (void) MONO_INTERNAL;
28 void mono_profiler_method_enter (MonoMethod *method) MONO_INTERNAL;
29 void mono_profiler_method_leave (MonoMethod *method) MONO_INTERNAL;
30 void mono_profiler_method_jit (MonoMethod *method) MONO_INTERNAL;
31 void mono_profiler_method_end_jit (MonoMethod *method, MonoJitInfo* jinfo, int result) MONO_INTERNAL;
32 void mono_profiler_method_free (MonoMethod *method) MONO_INTERNAL;
33 void mono_profiler_method_start_invoke (MonoMethod *method) MONO_INTERNAL;
34 void mono_profiler_method_end_invoke (MonoMethod *method) MONO_INTERNAL;
36 void mono_profiler_code_transition (MonoMethod *method, int result) MONO_INTERNAL;
37 void mono_profiler_allocation (MonoObject *obj, MonoClass *klass) MONO_INTERNAL;
38 void mono_profiler_string_allocation (MonoDomain *domain, MonoString *str) MONO_INTERNAL;
39 void mono_profiler_monitor_event (MonoObject *obj, MonoProfilerMonitorEvent event) MONO_INTERNAL;
40 void mono_profiler_stat_hit (guchar *ip, void *context) MONO_INTERNAL;
41 void mono_profiler_stat_call_chain (int call_chain_depth, guchar **ips, void *context) MONO_INTERNAL;
42 int mono_profiler_stat_get_call_chain_depth (void) MONO_INTERNAL;
43 MonoProfilerCallChainStrategy mono_profiler_stat_get_call_chain_strategy (void) MONO_INTERNAL;
44 void mono_profiler_thread_start (gsize tid) MONO_INTERNAL;
45 void mono_profiler_thread_end (gsize tid) MONO_INTERNAL;
47 void mono_profiler_exception_thrown (MonoObject *exception) MONO_INTERNAL;
48 void mono_profiler_exception_method_leave (MonoMethod *method) MONO_INTERNAL;
49 void mono_profiler_exception_clause_handler (MonoMethod *method, int clause_type, int clause_num) MONO_INTERNAL;
51 void mono_profiler_assembly_event (MonoAssembly *assembly, int code) MONO_INTERNAL;
52 void mono_profiler_assembly_loaded (MonoAssembly *assembly, int result) MONO_INTERNAL;
54 void mono_profiler_module_event (MonoImage *image, int code) MONO_INTERNAL;
55 void mono_profiler_module_loaded (MonoImage *image, int result) MONO_INTERNAL;
57 void mono_profiler_class_event (MonoClass *klass, int code) MONO_INTERNAL;
58 void mono_profiler_class_loaded (MonoClass *klass, int result) MONO_INTERNAL;
60 void mono_profiler_appdomain_event (MonoDomain *domain, int code) MONO_INTERNAL;
61 void mono_profiler_appdomain_loaded (MonoDomain *domain, int result) MONO_INTERNAL;
63 void mono_profiler_iomap (char *report, const char *pathname, const char *new_pathname) MONO_INTERNAL;
65 MonoProfileCoverageInfo* mono_profiler_coverage_alloc (MonoMethod *method, int entries) MONO_INTERNAL;
66 void mono_profiler_coverage_free (MonoMethod *method) MONO_INTERNAL;
68 void mono_profiler_gc_event (MonoGCEvent e, int generation) MONO_INTERNAL;
69 void mono_profiler_gc_heap_resize (gint64 new_size) MONO_INTERNAL;
71 void mono_profiler_code_chunk_new (gpointer chunk, int size) MONO_INTERNAL;
72 void mono_profiler_code_chunk_destroy (gpointer chunk) MONO_INTERNAL;
73 void mono_profiler_code_buffer_new (gpointer buffer, int size, MonoProfilerCodeBufferType type, void *data) MONO_INTERNAL;
75 void mono_profiler_runtime_initialized (void) MONO_INTERNAL;
77 #endif /* __MONO_PROFILER_PRIVATE_H__ */