I'm trying to understand the connection between them. Can I say that all JS function calls will go through *MacroAssembler::InvokeFunctionCode*? And what I need to do is to instrument that function? Or maybe I can leverage the Runtime::*kDebugOnFunctionCall*?
Thank you. 在 2019年5月28日星期二 UTC+8下午5:53:58,Ben Noordhuis写道: > > On Tue, May 28, 2019 at 11:20 AM Luo Wu <lwy...@pku.edu.cn <javascript:>> > wrote: > > > > Thanks for your reply. > > > > I checked the code related to IsolateAddressId::kContextAddress. In > src/builtins/x64/builtins-x64.cc, it seems that the function > Generate_JSEntryTrampolineHelper just loads the context but does not > overwrites it. I also found that the context is overwrote in > MacroAssembler::EnterExitFramePrologue. Is it the one I need to instrument? > Or is there any misunderstanding on my part? > > > > If i am right, are all JS function calls (including document.cookie etc) > going through that function, or are they just cross-frame function calls? > > > > Thank you. > > MacroAssembler::EnterExitFramePrologue() is one place but there's also > the microtask queue (used for things like promises), see > SetCurrentContext() in src/builtins/builtins-microtask-queue-gen.cc. > That file generates machine code ahead-of-time. > > NB: You may not need to instrument the AOT code (which is even > trickier than instrumenting runtime generated code) because ultimately > it calls Builtins::Generate_CallFunction() and that function also > loads the context from JSFunction::kContextOffset. > -- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/7f1af472-6018-4fd7-9359-55eaae5013c8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.