Here's a slide deck which covers [some] V8 basics. I hope this helps: https://docs.google.com/presentation/d/1QLdBDd80myrQP6saHwEmeZgBJ0_yiHJxWnwAhgGlTmw/edit?usp=sharing
On Fri, Dec 6, 2024 at 1:58 PM Marja Hölttä <ma...@chromium.org> wrote: > I'd suggest inspecting what the various compiler tiers do by running d8 > with the following command line flags: > > --print-bytecode > --print-maglev-code (you might also want to pass --no-debug-code to make > it less cluttered) > --print-maglev-graph > > And then you can use code search ( cs.chromium.org ) with the things you > see (e.g., bytecode names) to find out what is happening under the hood. > Oldschool printf debugging works really well in V8, we have Print() > functions for a bunch of things (especially V8 objects). > > You can also insert a breakpoint in the generated machine code in gdb and > inspect what it does. There the V8 gdb macros ( v8/tools/gdbinit ) are > helpful, esp. the "job" macro enables you to print out V8 objects. > > You can also look at what V8 mjsunit tests do. There you can find a bunch > of helpers (%PrepareFunctionForOptimization , %DebugPrint, %SystemBreak > etc) which are also very useful. > > Good luck! > > > > > > -- Google Germany GmbH Erika-Mann-Straße 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian. Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/CAED6dUD47Hf0MPBVT_uffjAs0kk%2BQbwLpBQz09M2E2M2aL7G1A%40mail.gmail.com.