X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fprofiler-private.h;h=1bf80e2c867a41e775e7b2ebb3ba1da5794d2f5f;hb=c1086268ba833338bd33ea268f453ebcc063c7bd;hp=ddbbc1719e6db1feb7018161b64999cfdb2c7adf;hpb=9bb7237fe79d8c9d9b61b2bc2325ece3a4c78aeb;p=mono.git diff --git a/mono/metadata/profiler-private.h b/mono/metadata/profiler-private.h index ddbbc1719e6..1bf80e2c867 100644 --- a/mono/metadata/profiler-private.h +++ b/mono/metadata/profiler-private.h @@ -4,6 +4,7 @@ #include #include "mono/utils/mono-compiler.h" +#include extern MonoProfileFlags mono_profiler_events; @@ -22,47 +23,71 @@ typedef struct { } data [1]; } MonoProfileCoverageInfo; -void mono_profiler_shutdown (void) MONO_INTERNAL; +void mono_profiler_shutdown (void); -void mono_profiler_method_enter (MonoMethod *method) MONO_INTERNAL; -void mono_profiler_method_leave (MonoMethod *method) MONO_INTERNAL; -void mono_profiler_method_jit (MonoMethod *method) MONO_INTERNAL; -void mono_profiler_method_end_jit (MonoMethod *method, MonoJitInfo* jinfo, int result) MONO_INTERNAL; -void mono_profiler_method_free (MonoMethod *method) MONO_INTERNAL; +void mono_profiler_method_enter (MonoMethod *method); +void mono_profiler_method_leave (MonoMethod *method); +void mono_profiler_method_jit (MonoMethod *method); +void mono_profiler_method_end_jit (MonoMethod *method, MonoJitInfo* jinfo, int result); +void mono_profiler_method_free (MonoMethod *method); +void mono_profiler_method_start_invoke (MonoMethod *method); +void mono_profiler_method_end_invoke (MonoMethod *method); -void mono_profiler_code_transition (MonoMethod *method, int result) MONO_INTERNAL; -void mono_profiler_allocation (MonoObject *obj, MonoClass *klass) MONO_INTERNAL; -void mono_profiler_monitor_event (MonoObject *obj, MonoProfilerMonitorEvent event) MONO_INTERNAL; -void mono_profiler_stat_hit (guchar *ip, void *context) MONO_INTERNAL; -void mono_profiler_stat_call_chain (int call_chain_depth, guchar **ips, void *context) MONO_INTERNAL; -#define MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH 16 -int mono_profiler_stat_get_call_chain_depth (void) MONO_INTERNAL; -void mono_profiler_thread_start (gsize tid) MONO_INTERNAL; -void mono_profiler_thread_end (gsize tid) MONO_INTERNAL; +void mono_profiler_code_transition (MonoMethod *method, int result); +void mono_profiler_allocation (MonoObject *obj); +void mono_profiler_monitor_event (MonoObject *obj, MonoProfilerMonitorEvent event); +void mono_profiler_stat_hit (guchar *ip, void *context); +void mono_profiler_stat_call_chain (int call_chain_depth, guchar **ips, void *context); +int mono_profiler_stat_get_call_chain_depth (void); +MonoProfilerCallChainStrategy mono_profiler_stat_get_call_chain_strategy (void); +void mono_profiler_thread_start (gsize tid); +void mono_profiler_thread_end (gsize tid); +void mono_profiler_thread_name (gsize tid, const char *name); -void mono_profiler_exception_thrown (MonoObject *exception) MONO_INTERNAL; -void mono_profiler_exception_method_leave (MonoMethod *method) MONO_INTERNAL; -void mono_profiler_exception_clause_handler (MonoMethod *method, int clause_type, int clause_num) MONO_INTERNAL; +void mono_profiler_exception_thrown (MonoObject *exception); +void mono_profiler_exception_method_leave (MonoMethod *method); +void mono_profiler_exception_clause_handler (MonoMethod *method, int clause_type, int clause_num); -void mono_profiler_assembly_event (MonoAssembly *assembly, int code) MONO_INTERNAL; -void mono_profiler_assembly_loaded (MonoAssembly *assembly, int result) MONO_INTERNAL; +void mono_profiler_assembly_event (MonoAssembly *assembly, int code); +void mono_profiler_assembly_loaded (MonoAssembly *assembly, int result); -void mono_profiler_module_event (MonoImage *image, int code) MONO_INTERNAL; -void mono_profiler_module_loaded (MonoImage *image, int result) MONO_INTERNAL; +void mono_profiler_module_event (MonoImage *image, int code); +void mono_profiler_module_loaded (MonoImage *image, int result); -void mono_profiler_class_event (MonoClass *klass, int code) MONO_INTERNAL; -void mono_profiler_class_loaded (MonoClass *klass, int result) MONO_INTERNAL; +void mono_profiler_class_event (MonoClass *klass, int code); +void mono_profiler_class_loaded (MonoClass *klass, int result); -void mono_profiler_appdomain_event (MonoDomain *domain, int code) MONO_INTERNAL; -void mono_profiler_appdomain_loaded (MonoDomain *domain, int result) MONO_INTERNAL; +void mono_profiler_appdomain_event (MonoDomain *domain, int code); +void mono_profiler_appdomain_loaded (MonoDomain *domain, int result); +void mono_profiler_appdomain_name (MonoDomain *domain, const char *name); -MonoProfileCoverageInfo* mono_profiler_coverage_alloc (MonoMethod *method, int entries) MONO_INTERNAL; -void mono_profiler_coverage_free (MonoMethod *method) MONO_INTERNAL; +void mono_profiler_context_loaded (MonoAppContext *context); +void mono_profiler_context_unloaded (MonoAppContext *context); -void mono_profiler_gc_event (MonoGCEvent e, int generation) MONO_INTERNAL; -void mono_profiler_gc_heap_resize (gint64 new_size) MONO_INTERNAL; +void mono_profiler_iomap (char *report, const char *pathname, const char *new_pathname); -void mono_profiler_runtime_initialized (void) MONO_INTERNAL; +MonoProfileCoverageInfo* mono_profiler_coverage_alloc (MonoMethod *method, int entries); +void mono_profiler_coverage_free (MonoMethod *method); + +void mono_profiler_gc_event (MonoGCEvent e, int generation); +void mono_profiler_gc_heap_resize (gint64 new_size); +void mono_profiler_gc_moves (void **objects, int num); +void mono_profiler_gc_handle (int op, int type, uintptr_t handle, MonoObject *obj); +void mono_profiler_gc_roots (int num, void **objects, int *root_types, uintptr_t *extra_info); + +void mono_profiler_gc_finalize_begin (void); +void mono_profiler_gc_finalize_object_begin (MonoObject *obj); +void mono_profiler_gc_finalize_object_end (MonoObject *obj); +void mono_profiler_gc_finalize_end (void); + +void mono_profiler_code_chunk_new (gpointer chunk, int size); +void mono_profiler_code_chunk_destroy (gpointer chunk); +void mono_profiler_code_buffer_new (gpointer buffer, int size, MonoProfilerCodeBufferType type, gconstpointer data); + +void mono_profiler_runtime_initialized (void); + +int64_t mono_profiler_get_sampling_rate (void); +MonoProfileSamplingMode mono_profiler_get_sampling_mode (void); #endif /* __MONO_PROFILER_PRIVATE_H__ */