mzhaom / gperftools

Fast, multi-threaded malloc() and nifty performance analysis tools
https://code.google.com/p/gperftools/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Calling ProfilerRegisterThread() may not actually register a thread for profiling #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Have a binary call ProfilerRegisterThread() a couple of times such that
in CpuProfiler::RegisterThread(), the timer_sharing_ variables is set to
TIMERS_SHARED.

Now call fork(). After a fork(), its necessary to setup the timers again
as the settings from setitimer() are not inherited across forks. However,
calling ProfilerRegisterThread() will not work - as the value of 
TIMERS_SHARED in timer_sharing_ will prevent the actual call to 
setitimer. This implies that the fork'd process cannot be profiled.

What version of the product are you using? On what operating system?

Version 1.0. Linux 2.6.27.

Original issue reported on code.google.com by mohit.a...@gmail.com on 5 Feb 2009 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by `` on 18 Jan 2012 at 9:30

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 6 Feb 2009 at 3:12

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 6 Feb 2009 at 3:12

GoogleCodeExporter commented 9 years ago
ProfilerRegisterThread is not the right call across a fork -- it really is only 
for
threads.  I believe this is the same issue as issue 105, so I'm merging it with 
that.

Original comment by csilv...@gmail.com on 11 Mar 2009 at 9:04