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 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.