{
gboolean instrument, capture;
+ /*
+ * Do not instrument an inlined method - it becomes
+ * part of the current method.
+ */
+ if (cfg->current_method != cfg->method)
+ return;
+
if (entry) {
instrument = cfg->prof_flags & MONO_PROFILER_CALL_INSTRUMENTATION_PROLOGUE;
capture = cfg->prof_flags & MONO_PROFILER_CALL_INSTRUMENTATION_PROLOGUE_CONTEXT;
if (!instrument)
return;
- g_assert (cfg->current_method == cfg->method);
-
MonoInst *iargs [2];
EMIT_NEW_METHODCONST (cfg, iargs [0], cfg->method);