From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: davek@ca.mgisoft.com Cc: gcc-help@gcc.gnu.org Subject: Re: profiling question Date: Wed, 07 Jun 2000 23:42:00 -0000 Message-id: <200006080636.IAA01020@loewis.home.cs.tu-berlin.de> References: <393F09E4.9B752E3C@ca.mgisoft.com> X-SW-Source: 2000-06/msg00033.html > 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