Re: hi-res profiling

From: Robert Collins <robertc@dont-contact.us>
Date: 02 Oct 2002 18:18:35 +1000

On Wed, 2002-10-02 at 18:00, Andres Kroonmaa wrote:

> btw, is there a way in C to cause any func to exec specified
> code reliably at both func enter and func exit? There are often
> funcs that have many exit points and its pain to place all needed
> prof stops everywhere, but I've found no way around that.

Have a look at the pthread_cancel implementation on your system. It will
do something similar to what you describe.
 
> PS. Profiler is NOT threadsafe. Although its almost safe, no
> thread can ever share probe with any other thread.
> Even though it won't crash probably, it will show beans mostly.

Yah. This is trivially addressable by the use of a pthread_key to point
to a dynamically allocated probe data table. However, that can wait IMO,
as tuning the main thread is the current issue IMO.

Rob

Received on Wed Oct 02 2002 - 02:18:06 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:51 MST