Re: [v8-users] Find out the bytecode associated with given JIT code?

2018-06-18 Thread Jakob Gruber
Take a look at v8's gdbinit file for more convenience macros: https://cs.chromium.org/chromium/src/v8/tools/gdbinit On Tue, Jun 19, 2018 at 12:48 AM, Caitlin Potter wrote: > Print_Code will output information for any Code object (builtins, bytecode > handlers, JIT-ed code, even IC stubs AFAIU)

Re: [v8-users] __jit_debug_register_code was not invoked in debug build

2018-06-18 Thread Mingwei Zhang
Hi Ben, The problem is that I don't get any breakpoint hit notification in gdb. The program just execute and exited normally, regardless of whether i set the breakpoint or not in __jit_debug_register_code. I double checked in instructions that when I am using gm.py with target x64.debug, it

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-06-18 Thread Jakob Kummerow
Sure, just use printf or std::cout << "print\n". I don't know whether adb logcat has any special requirements. On Mon, Jun 18, 2018 at 3:48 PM Abhishek Kanike wrote: > Jakob, > Thanks for quick reply. > That's a good point, should have tried with gdb. Will check with that. > Is there a way to

Re: [v8-users] Find out the bytecode associated with given JIT code?

2018-06-18 Thread Caitlin Potter
Print_Code will output information for any Code object (builtins, bytecode handlers, JIT-ed code, even IC stubs AFAIU) — so it should already do that for you. The main limitation WRT optimized code is, if some part of the fn is inlined, it won’t tell you anything about the code that was

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-06-18 Thread Abhishek Kanike
Jakob, Thanks for quick reply. That's a good point, should have tried with gdb. Will check with that. Is there a way to add logs in v8 source code, it will be lot faster to debug. In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of main chromium *src*) On Mon, Jun 18, 2018

Re: [v8-users] __jit_debug_register_code was not invoked in debug build

2018-06-18 Thread Ben Noordhuis
On Sun, Jun 17, 2018 at 11:15 PM, Mingwei Zhang wrote: > Dear V8 developer, > > I recently tried to use the debugging interface for gdb on JIT code. When I > tried building a debug build of V8 and following the instructions in: > > https://github.com/v8/v8/wiki/GDB-JIT-Interface > > I launched my

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-06-18 Thread Jakob Kummerow
Yes, it is. Have you tried using a debugger? You can set a breakpoint in the BUILTIN(DateNow) function here: https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 and step through the code from there. On Mon, Jun 18, 2018 at 2:39 PM

Re: [v8-users] Find out the bytecode associated with given JIT code?

2018-06-18 Thread Thomson Tan
Thanks. This works perfectly for bytecode handlers. Is there any similar function for optimized JIT code, like print out the function name with some extra information? -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message

Re: [v8-users] kKeep segfault

2018-06-18 Thread Ryan Dahl
Thanks: https://bugs.chromium.org/p/v8/issues/detail?id=7857 -- -- 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

Re: [v8-users] kKeep segfault

2018-06-18 Thread Jakob Gruber
Do you perhaps have a backtrace? Please open a bug at http://crbug.com/v8/new and assign it to me, I'll take a look. On Mon, Jun 18, 2018 at 3:15 PM, Ryan Dahl wrote: > Hi, > > I'm experiencing a segfault when using > SnapshotCreator::FunctionCodeHandling::kKeep. > I'm wondering if this is

[v8-users] kKeep segfault

2018-06-18 Thread Ryan Dahl
Hi, I'm experiencing a segfault when using SnapshotCreator::FunctionCodeHandling::kKeep. I'm wondering if this is intended behavior or a bug? Here is a patch to demo it in test/cctest/test-serialize.cc https://gist.github.com/ry/0429eb4887370ee2a263446a59ec9ed7 thank you, Ryan -- --