Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 472f03956a363f00072e5f4aaea86e6f6d5c6b3c
      
https://github.com/WebKit/WebKit/commit/472f03956a363f00072e5f4aaea86e6f6d5c6b3c
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-09-01 (Tue, 01 Sep 2026)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGJITCode.cpp
    M Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
    M Source/JavaScriptCore/dfg/DFGOSREntry.cpp
    M Source/JavaScriptCore/dfg/DFGOSREntry.h
    M Source/JavaScriptCore/dfg/DFGRegisteredStructure.h

  Log Message:
  -----------
  [JSC] Store DFG OSR entry expected values as a byte stream
https://bugs.webkit.org/show_bug.cgi?id=323169

Reviewed by Yusuke Suzuki.

Every DFG OSR entry point keeps a FixedOperands<AbstractValue> with the
expected value of each argument and local, 32 bytes per operand, for as long
as the DFG code lives, although it is only read when the baseline JIT tries to
enter the loop. On JetStream3 that is 972k AbstractValues over the run, 31 MB,
and 90% of them are BytecodeTop.

This patch stores the expected values of an entry as a byte stream
(OSREntryExpectedValues; the format is in the comment above the class) that
run-length encodes BytecodeTop and writes the array modes, structures and
constant of the other values only when they are not the trivial ones, and
decodes it back into a FixedOperands<AbstractValue> in prepareOSREntry. The
same JetStream3 run goes from 31.1 MB to 0.76 MB (0.8 bytes per operand).

* Source/JavaScriptCore/dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::validateReferences):
* Source/JavaScriptCore/dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::noticeOSREntry):
* Source/JavaScriptCore/dfg/DFGOSREntry.cpp:
(JSC::DFG::OSREntryExpectedValues::OSREntryExpectedValues):
(JSC::DFG::OSREntryExpectedValues::decode const):
(JSC::DFG::OSREntryExpectedValues::validateReferences const):
(JSC::DFG::OSREntryData::dumpInContext const):
(JSC::DFG::prepareOSREntry):
* Source/JavaScriptCore/dfg/DFGOSREntry.h:
* Source/JavaScriptCore/dfg/DFGRegisteredStructure.h:

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



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

Reply via email to