Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ebc19a3dc75e891b5916de93914ec5771ab91fbc
      
https://github.com/WebKit/WebKit/commit/ebc19a3dc75e891b5916de93914ec5771ab91fbc
  Author: Keith Miller <[email protected]>
  Date:   2026-03-05 (Thu, 05 Mar 2026)

  Changed paths:
    M Source/JavaScriptCore/assembler/LinkBuffer.h
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
    M Source/JavaScriptCore/jit/JIT.cpp
    M Source/JavaScriptCore/jit/JITDisassembler.cpp
    M Source/JavaScriptCore/jit/JITDisassembler.h
    M Source/JavaScriptCore/lol/LOLJIT.cpp
    M Source/JavaScriptCore/runtime/Options.cpp

  Log Message:
  -----------
  [JSC] Bytecode profiler should include JIT comments
https://bugs.webkit.org/show_bug.cgi?id=309270
rdar://171815352

Reviewed by Yijia Huang and Dan Hecht.

Right now we just get the raw disassembly but it's nicer to see the JIT
comments so the assembly is easier to read. I also annotated the
profiling emitted assembly so it's easier to decern and ignore when
reading.

Additionally, add m_codeStart/End to reportToProfiler so that Baseline
logs immediates to the profile as well.

After this change, profile disassembly looks like:

```
      0                       0/0/0/0                      [  30] construct     
     dst:loc6, callee:loc6, argc:2, argv:16, valueProfile:2
      0                       0/0/0/0                                 <496> 
0x118658630:    mov x17, #0x4120; Execution trace start
      0                       0/0/0/0                                 <500> 
0x118658634:    movk        x17, #0x209, lsl #0x10
      0                       0/0/0/0                                 <504> 
0x118658638:    movk        x17, #0x1, lsl #0x20 -> 0x102094120
      0                       0/0/0/0                                 <508> 
0x11865863c:    ldr x16, [x17, xzr]
      0                       0/0/0/0                                 <512> 
0x118658640:    add x16, x16, #0x1
      0                       0/0/0/0                                 <516> 
0x118658644:    stur        x16, [x17]
      0                       0/0/0/0                                 <520> 
0x118658648:    sub sp, fp, #0x70; First non-trace instruction
      0                       0/0/0/0                                 <524> 
0x11865864c:    orr w16, wzr, #0x2
      0                       0/0/0/0                                 <528> 
0x118658650:    stur        w16, [sp, #0x10]
      0                       0/0/0/0                                 <532> 
0x118658654:    orr w16, wzr, #0x1e
      0                       0/0/0/0                                 <536> 
0x118658658:    stur        w16, [fp, #0x24]
      0                       0/0/0/0                                 <540> 
0x11865865c:    ldur        x0, [fp, #-0x38]
      0                       0/0/0/0                                 <544> 
0x118658660:    stur        x0, [sp, #0x8]
      0                       0/0/0/0                                 <548> 
0x118658664:    add x2, x25, #0x68
      0                       0/0/0/0                                 <552> 
0x118658668:    ldur        x5, [x2, #0x20]
      0                       0/0/0/0                                 <556> 
0x11865866c:    ldur        x16, [x2, #0x28]
      0                       0/0/0/0                                 <560> 
0x118658670:    cmp x16, x0
      0                       0/0/0/0                                 <564> 
0x118658674:    b.eq        0x11865868c -> <588>
      0                       0/0/0/0                                 <568> 
0x118658678:    tbnz        w16, #0, 0x11865868c -> <588>
      0                       0/0/0/0                                 <572> 
0x11865867c:    mov x5, #0x100
      0                       0/0/0/0                                 <576> 
0x118658680:    movk        x5, #0x1866, lsl #0x10
      0                       0/0/0/0                                 <580> 
0x118658684:    movk        x5, #0x1, lsl #0x20
      0                       0/0/0/0                                 <584> 
0x118658688:    movk        x5, #0xd86e, lsl #0x30 -> 0xd86e000118660100 JIT PC
      0                       0/0/0/0                                 <588> 
0x11865868c:    ldur        x16, [x2, #0x18]
      0                       0/0/0/0                                 <592> 
0x118658690:    stur        x16, [sp]
      0                       0/0/0/0                                 <596> 
0x118658694:    mov lr, #0x593 -> 0x593 JSEntryPtrTag ?
      0                       0/0/0/0                                 <600> 
0x118658698:    blrab       x5, lr
      0                       0/0/0/0                                 <604> 
0x11865869c:    sub sp, fp, #0x80
      0                       0/0/0/0                                 <608> 
0x1186586a0:    stur        x0, [x25, #-0x30]
      0                       0/0/0/0                                 <612> 
0x1186586a4:    stur        x0, [fp, #-0x38]
```

No new tests, no user observable change.

Canonical link: https://commits.webkit.org/308738@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to