Yes, I'm thinking about switching from SIGPROF to a hi-prio thread too.
Not only this is more reliable, but it provides a much better
resolution. E.g. running V8 benchmarks on Mac gives 9500 samples from
9.968 s (almost every ms!), while on Linux it gives only 1000 samples
from the same 10 seconds---about 10 times worse!

The only problem is that Linux PThreads doesn't have pthread_suspend
implemented (on Mac we work with threads using Mach primitives
directly), so I will need to introduce some workaround.


http://codereview.chromium.org/159406/diff/4/1002
File test/cctest/test-log.cc (right):

http://codereview.chromium.org/159406/diff/4/1002#newcode150
Line 150: static bool was_sigprof_received = true;
On 2009/07/28 08:12:37, Søren Gjesse wrote:
> Maybe move this down to 'struct sigaction old_sigprof_handler;'

This will add another 'ifdef' branch around lines 226-227. I think
having was_sigprof_received always declared is more straightforward.

http://codereview.chromium.org/159406

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to