static MonoProfileMethodResult jit_end;
static MonoProfileJitResult jit_end2;
static MonoProfileMethodFunc method_free;
+static MonoProfileMethodFunc method_start_invoke;
+static MonoProfileMethodFunc method_end_invoke;
static MonoProfileMethodResult man_unman_transition;
static MonoProfileAllocFunc allocation_cb;
static MonoProfileMonitorFunc monitor_event_cb;
static MonoProfileStatFunc statistical_cb;
static MonoProfileStatCallChainFunc statistical_call_chain_cb;
static int statistical_call_chain_depth;
+static MonoProfilerCallChainStrategy statistical_call_chain_strategy;
static MonoProfileMethodFunc method_enter;
static MonoProfileMethodFunc method_leave;
method_free = callback;
}
+void
+mono_profiler_install_method_invoke (MonoProfileMethodFunc start, MonoProfileMethodFunc end)
+{
+ method_start_invoke = start;
+ method_end_invoke = end;
+}
+
void
mono_profiler_install_thread (MonoProfileThreadFunc start, MonoProfileThreadFunc end)
{
}
void
-mono_profiler_install_statistical_call_chain (MonoProfileStatCallChainFunc callback, int call_chain_depth) {
+mono_profiler_install_statistical_call_chain (MonoProfileStatCallChainFunc callback, int call_chain_depth, MonoProfilerCallChainStrategy call_chain_strategy) {
statistical_call_chain_cb = callback;
statistical_call_chain_depth = call_chain_depth;
if (statistical_call_chain_depth > MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH) {
statistical_call_chain_depth = MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH;
}
+ statistical_call_chain_strategy = call_chain_strategy;
+ if ((statistical_call_chain_strategy >= MONO_PROFILER_CALL_CHAIN_INVALID) || (statistical_call_chain_strategy < MONO_PROFILER_CALL_CHAIN_NONE)) {
+ statistical_call_chain_strategy = MONO_PROFILER_CALL_CHAIN_NONE;
+ }
}
int
}
}
+MonoProfilerCallChainStrategy
+mono_profiler_stat_get_call_chain_strategy (void) {
+ if (statistical_call_chain_cb != NULL) {
+ return statistical_call_chain_strategy;
+ } else {
+ return MONO_PROFILER_CALL_CHAIN_NONE;
+ }
+}
+
void mono_profiler_install_exception (MonoProfileExceptionFunc throw_callback, MonoProfileMethodFunc exc_method_leave, MonoProfileExceptionClauseFunc clause_callback)
{
exception_throw_cb = throw_callback;
method_free (current_profiler, method);
}
+void
+mono_profiler_method_start_invoke (MonoMethod *method)
+{
+ if ((mono_profiler_events & MONO_PROFILE_METHOD_EVENTS) && method_start_invoke)
+ method_start_invoke (current_profiler, method);
+}
+
+void
+mono_profiler_method_end_invoke (MonoMethod *method)
+{
+ if ((mono_profiler_events & MONO_PROFILE_METHOD_EVENTS) && method_end_invoke)
+ method_end_invoke (current_profiler, method);
+}
+
void
mono_profiler_code_transition (MonoMethod *method, int result)
{
char *str;
gint32 see_shutdown_done;
-#ifndef PLATFORM_WIN32
+#ifndef HOST_WIN32
mono_thread_attach(mono_get_root_domain());
#endif
}
#endif
{
- MonoDl *pmodule;
+ MonoDl *pmodule = NULL;
const char* col = strchr (desc, ':');
char* libname;
char* path;