On Tue, Aug 30, 2016 at 5:47 AM,  <pvadr...@gmail.com> wrote:
> Hi,
>     I am working on a Chromium project, for which I need to mark JavaScript
> functions The main goal is to be able to determine what JS functions are
> being run in real time (i.e. what source code is being run in real time).
>
> I am wondering if there is a way in which I can "mark" functions during
> compile time and emit the same marks out during run-time, that time might
> solve this problem. But, I am completely new to the V8 code base and I have
> no idea where to begin. Also, this might not be the best way to do this or
> this might already have been solved.
>
> Can anyone please guide me on how to proceed with this. I would be grateful
> for any pointers from you.
>
> Thanks,
> Phani

You may be able to leverage the JitCodeEvent and
ReturnAddressLocationResolver APIs to trace JS function entry and
exit.  The caveat is that the hooks are installed when the isolate is
created and it's always on - you pay for it even when you aren't using
it, though the overhead is small.

Another existing solution is the debugger in StepFrame mode.  It slows
down programs by about 2x, though.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to