[Mono-dev] Mono profiler and exceptions

Sanghyeon Seo sanxiyn at gmail.com
Sat Jun 9 22:13:33 EDT 2007


Still working on my Mono profiler for IronPython project. I noticed
that when the method is left by throwing an exception,
mono_profiler_method_leave is not called. That is,

a() { throw new Exception(); }
b() {}
c() { try { a(); } catch {} b(); }

produces: enter c, enter a, enter b, leave b, leave c. In other words,
leave callback for method a is never called, and enter calls and leave
calls don't match.

MONO_PROFILE_EXCEPTIONS is defined in mono/metadata/profiler.h. This
doesn't seem to do anything, since grep turns up nothing.

1. Is this intended?
2. If it is intended, how does one get an accurate call stack? My
naive implementation results in "b is called by a", when in fact it is
called by c.

-- 
Seo Sanghyeon



More information about the Mono-devel-list mailing list