jit_tls->orig_ex_ctx_set = TRUE;
MONO_PROFILER_RAISE (exception_clause, (method, i, ei->flags, ex_obj));
jit_tls->orig_ex_ctx_set = FALSE;
- mini_set_abort_threshold (ctx);
- call_filter (ctx, ei->handler_start);
}
if (ei->flags == MONO_EXCEPTION_CLAUSE_FINALLY) {
if (mono_trace_is_enabled () && mono_trace_eval (method))
#ifndef DISABLE_PERFCOUNTERS
mono_perfcounters->exceptions_finallys++;
#endif
+ }
+ if (ei->flags == MONO_EXCEPTION_CLAUSE_FAULT || ei->flags == MONO_EXCEPTION_CLAUSE_FINALLY) {
mono_set_lmf (lmf);
if (ji->from_llvm) {
/*
}
}
- jit_tls->orig_ex_ctx_set = TRUE;
- MONO_PROFILER_RAISE (method_exception_leave, (method, ex_obj));
- jit_tls->orig_ex_ctx_set = FALSE;
+ if (MONO_PROFILER_ENABLED (method_exception_leave) &&
+ mono_profiler_get_call_instrumentation_flags (method) & MONO_PROFILER_CALL_INSTRUMENTATION_EXCEPTION_LEAVE) {
+ jit_tls->orig_ex_ctx_set = TRUE;
+ MONO_PROFILER_RAISE (method_exception_leave, (method, ex_obj));
+ jit_tls->orig_ex_ctx_set = FALSE;
+ }
*ctx = new_ctx;
}