Hi Jacob, Thank you very much for your reply. I haven't got time to look at the trace API closely. However, I do want to instrument some code before and after each function invocation , is that possible with trace API or I can simply add my own trace functions?
Thanks, Wenzhi Cui On Thu, Dec 3, 2015 at 3:36 AM, Jakob Kummerow <jkumme...@chromium.org> wrote: > For tracing function invocation, there's the --trace flag. > > There's no existing instrumentation to observe function object creation. > You can try hooking into Factory::NewFunction > <https://chromium.googlesource.com/v8/v8/+/master/src/factory.cc#1176>, > but I'm not sure if there are code paths that bypass this. > > > On Wed, Dec 2, 2015 at 11:27 PM, WENZHI CUI <cwz920...@gmail.com> wrote: > >> Hi all, >> Sorry if this post disturbs you. I searched for this problem on google >> but didn't find a perfect fit. >> I want to instrument all function events in v8. In specific, I want to >> instrument some bookkeeping code (for example, print out something) when a >> function object get created and when we call that function. I am wondering >> if that's possible by tweaking the source code of v8 slightly. >> >> Thanks, >> Wenzhi Cui >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to a topic in the > Google Groups "v8-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/v8-users/8JOKJY7o5Uc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.