[webkit-changes] [WebKit/WebKit] 0125fc: [JSC] Make CachedCall further faster

Yusuke Suzuki noreply at github.com
Mon Nov 13 11:08:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0125fc7994caa87c6daf0e16e279b61c113b2be1
      https://github.com/WebKit/WebKit/commit/0125fc7994caa87c6daf0e16e279b61c113b2be1
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M Source/JavaScriptCore/interpreter/CachedCall.h
    M Source/JavaScriptCore/interpreter/CallFrame.h
    M Source/JavaScriptCore/interpreter/Interpreter.cpp
    M Source/JavaScriptCore/interpreter/Interpreter.h
    M Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
    M Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
    M Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
    M Source/JavaScriptCore/runtime/VM.cpp
    M Source/JavaScriptCore/runtime/VM.h

  Log Message:
  -----------
  [JSC] Make CachedCall further faster
https://bugs.webkit.org/show_bug.cgi?id=264726
rdar://118320685

Reviewed by Michael Saboff.

1. We should not do vm.disallowVMEntryCount for every CachedCall calls, which is really slow.
   We should do it once. This patch moves vm.disallowVMEntryCount check to the same place to VMEntryScope.
2. Extract stack overflow check as _llint_throw_stack_overflow_error_from_vm_entry and jump to this label.
3. Move some of hot VM fields to the consolidated place.
4. Use paired load / store for VM frame initializations.

    cpp-to-js-cached-call       21.1540+-0.0364     ^     15.0915+-0.0090        ^ definitely 1.4017x faster

* Source/JavaScriptCore/interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall):
* Source/JavaScriptCore/interpreter/CallFrame.h:
(JSC::CallFrame::noCaller):
* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::Interpreter::checkVMEntryPermission):
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCallImpl):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::executeEval):
(JSC::Interpreter::executeModuleProgram):
* Source/JavaScriptCore/interpreter/Interpreter.h:
* Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:
(JSC::LLInt::llint_check_vm_entry_permission):
* Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:
* Source/JavaScriptCore/runtime/VM.cpp:
(JSC::VM::VM):
* Source/JavaScriptCore/runtime/VM.h:

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




More information about the webkit-changes mailing list