casseopea2 / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

profiler appears to only profile main thread for OS X 10.5 #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a multithreaded program on OS X, linking libprofiler.dylib
2. Run with CPUPROFILE set
3. Observe results

What is the expected output? 
I expected to see calls from all threads

What do you see instead?
I saw calls only from the main thread

What version of the product are you using? On what operating system?
perftools 1.3;  OS X 10.5

Please provide any additional information below.
I tried calling ProfilerRegisterThread() from the main thread and secondary 
thread, with no 
apparent improvement.

Original issue reported on code.google.com by randy.sa...@gmail.com on 19 Jul 2009 at 8:48

GoogleCodeExporter commented 9 years ago
Did you try running the unittests that came with the distribution? 
profiler_unittest.sh does try running with multiple threads to make sure we 
profile
threads correctly.  (That said, it's a very permissive test, and may pass even 
when
there's trouble.  That would be good to know.)

You can try running ./profiler_unittest manually and see what profiles are 
produced.
 If the unittest output looks ok but your binary's doesn't, something mysterious must
be going on.

Original comment by csilv...@gmail.com on 20 Jul 2009 at 11:41

GoogleCodeExporter commented 9 years ago
Thanks for your quick and helpful response.  profiler_unittest.sh does pass in 
fact.  

It may be several days before I get back to this but I'll try to search in the 
space between the working unittest 
and my seemingly non-working example to see if I can understand what I'm doing 
wrong or if there's really a 
bug.

Original comment by randy.sa...@gmail.com on 21 Jul 2009 at 3:48

GoogleCodeExporter commented 9 years ago
Great!  Let me know what you find.  Note the problem may be in the unittest 
being too
permissive, and the functionality is failing there as well but the unittest 
isn't
flagging it as a failure.  So keep that in mind as you search!

Original comment by csilv...@gmail.com on 22 Jul 2009 at 8:56

GoogleCodeExporter commented 9 years ago
Ping -- did you ever manage to take a look at this?

Original comment by csilv...@gmail.com on 14 Oct 2009 at 11:24

GoogleCodeExporter commented 9 years ago
One more ping.  If I don't hear back, I'm going to have to close this 
CannotReproduce.

Original comment by csilv...@gmail.com on 10 Mar 2010 at 6:15

GoogleCodeExporter commented 9 years ago
OK, closing.  Feel free to reopen if you have more data.

Original comment by csilv...@gmail.com on 17 Mar 2010 at 11:29