Hi Malcolm, Yes, no one wanted to profile multiple VM threads yet.
On Linux, profiling multiple threads may even work already -- try it. There is a function 'IsVmThread' in platform-linux.cc which checks, whether the thread that a signal handler has been called upon is a VM thread or not. On Mac & Windows, things are more complicated, because we use a dedicated profiling thread that periodically stops and samples the VM thread. So to make this work for multiple threads case, one will need to track a list of VM threads in the sampler. On Wed, Sep 22, 2010 at 20:53, malcolm handley <[email protected]> wrote: > I have multiple threads using v8 (correctly guarded by v8::Locker as far as > I can tell) and I'm interested in using v8's profiler. The comment above the > Profiler class in log.cc states that "The Profiler samples pc and sp values > for the main thread.". Is there a technical reason for that or is it just > that no one has wanted to profile other threads yet? It seems to me that > profiling whichever thread holds the global lock could be productive but I'd > love any feedback about fruitful ways to proceed (or reasons not to). > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
