Re: [v8-users] How to instrument function creation and invocation in v8

2017-12-07 Thread Camillo Bruni
Hi Tobias, Most probably you would have to manually annotate all CodeStubAssembler builtins with a print statement to get the proper output. There are several macros where you might be able to inject a runtime call or a direct C++ call (see TF_BUILTIN and friends). The same counts for all C++ ru

Re: [v8-users] How to instrument function creation and invocation in v8

2017-12-06 Thread tobias . urban
Hi, I also want to trace javascript function calls inside of chromium (V8). I am using the --trace flag as suggested. However, it does not trace "native" function calls. Example: I have the following simple website: A simple test script function foo(var0){ return(bar(var0.concat(" World!

Re: [v8-users] How to instrument function creation and invocation in v8

2015-12-03 Thread WENZHI CUI
Hi Jacob, I found kTraceEnter and kTraceExit. I think I can insert my code there. Thank you! Thanks, Wenzhi Cui On Thu, Dec 3, 2015 at 10:22 AM, Jakob Kummerow wrote: > It's not an API, it's a flag. Just try it to see what it does, and look at > the source (grep for FLAG_trace) to see how it'

Re: [v8-users] How to instrument function creation and invocation in v8

2015-12-03 Thread Jakob Kummerow
It's not an API, it's a flag. Just try it to see what it does, and look at the source (grep for FLAG_trace) to see how it's implemented. On Thu, Dec 3, 2015 at 5:15 PM, WENZHI CUI wrote: > Hi Jacob, > Thank you very much for your reply. > I haven't got time to look at the trace API closely.

Re: [v8-users] How to instrument function creation and invocation in v8

2015-12-03 Thread WENZHI CUI
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

Re: [v8-users] How to instrument function creation and invocation in v8

2015-12-03 Thread Jakob Kummerow
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 , but I'm not sure if there are code paths that by

[v8-users] How to instrument function creation and invocation in v8

2015-12-02 Thread WENZHI CUI
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