profiling question

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Wed Jun 7 23:42:00 GMT 2000


> Is there something magical that has to be done in order to get
> gprof to profile a multi-threaded application correctly?  Is
> there a command flag I'm missing?

I believe magic is required, but I don't think a command line option
helps.

> I know this isn't really the place to ask this question, but 
> I'm very frustrated with this.  Everyplace I look says that gprof
> supports threads, but I sure can't verify that.  

Which place have you been looking at? AFAICT, gprof is not
thread-safe; at least I could not find any kind of locking in the
mcount function, nor do I think it is inherently atomic in its
operation.

Regards,
Martin



More information about the Gcc-help mailing list