New test.
[mono.git] / mono / metadata / profiler-private.h
1
2 #ifndef __MONO_PROFILER_PRIVATE_H__
3 #define __MONO_PROFILER_PRIVATE_H__
4
5 #include <mono/metadata/profiler.h>
6
7 extern MonoProfileFlags mono_profiler_events;
8
9 enum {
10         MONO_PROFILE_START_LOAD,
11         MONO_PROFILE_END_LOAD,
12         MONO_PROFILE_START_UNLOAD,
13         MONO_PROFILE_END_UNLOAD
14 };
15
16 typedef struct {
17         int entries;
18         struct {
19                 guchar* cil_code;
20                 int count;
21         } data [1];
22 } MonoProfileCoverageInfo;
23
24 void mono_profiler_shutdown        (void);
25
26 void mono_profiler_method_enter    (MonoMethod *method);
27 void mono_profiler_method_leave    (MonoMethod *method);
28 void mono_profiler_method_jit      (MonoMethod *method);
29 void mono_profiler_method_end_jit  (MonoMethod *method, MonoJitInfo* jinfo, int result);
30
31 void mono_profiler_code_transition (MonoMethod *method, int result);
32 void mono_profiler_allocation      (MonoObject *obj, MonoClass *klass);
33 void mono_profiler_stat_hit        (guchar *ip, void *context);
34 void mono_profiler_thread_start    (gsize tid);
35 void mono_profiler_thread_end      (gsize tid);
36
37 void mono_profiler_assembly_event  (MonoAssembly *assembly, int code);
38 void mono_profiler_assembly_loaded (MonoAssembly *assembly, int result);
39
40 void mono_profiler_module_event  (MonoImage *image, int code);
41 void mono_profiler_module_loaded (MonoImage *image, int result);
42
43 void mono_profiler_class_event  (MonoClass *klass, int code);
44 void mono_profiler_class_loaded (MonoClass *klass, int result);
45
46 void mono_profiler_appdomain_event  (MonoDomain *domain, int code);
47 void mono_profiler_appdomain_loaded (MonoDomain *domain, int result);
48
49 MonoProfileCoverageInfo* mono_profiler_coverage_alloc (MonoMethod *method, int entries);
50 void                     mono_profiler_coverage_free  (MonoMethod *method);
51
52 void mono_profiler_gc_event       (MonoGCEvent e, int generation);
53 void mono_profiler_gc_heap_resize (gint64 new_size);
54
55 #endif /* __MONO_PROFILER_PRIVATE_H__ */
56