[webkit-changes] [WebKit/WebKit] 0291f2: [JSC] Remove some hot CommonSlowPaths

Yusuke Suzuki noreply at github.com
Fri Mar 1 14:08:53 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0291f234c90dc4d75b73075976f14d2a94878d73
      https://github.com/WebKit/WebKit/commit/0291f234c90dc4d75b73075976f14d2a94878d73
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M Source/JavaScriptCore/jit/JIT.cpp
    M Source/JavaScriptCore/jit/JIT.h
    M Source/JavaScriptCore/jit/JITInlines.h
    M Source/JavaScriptCore/jit/JITOpcodes.cpp
    M Source/JavaScriptCore/jit/JITOperations.cpp
    M Source/JavaScriptCore/jit/JITOperations.h
    M Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
    M Source/JavaScriptCore/llint/LLIntSlowPaths.h
    M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
    M Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
    M Source/JavaScriptCore/runtime/CommonSlowPaths.h

  Log Message:
  -----------
  [JSC] Remove some hot CommonSlowPaths
https://bugs.webkit.org/show_bug.cgi?id=270363
rdar://123909602

Reviewed by Alexey Shvayka.

CommonSlowPaths is always slower than normal operations in Baseline JIT since CommonSlowPaths accesses a lot of data like bytecode etc.
This is OK for rare operations, but not OK for hot operations. This patch made following opcodes using operations. They are picked based
on trace data.

    1. op_create_lexical_environment
    2. op_create_direct_arguments
    3. op_create_scoped_arguments
    4. op_create_cloned_arguments

And move CommonSlowPaths for them to LLIntSlowPaths. Since LLInt needs to access to these bytecode etc. to retrieve information (JIT can skip it),
SlowPath performance is the same to operations.

* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* Source/JavaScriptCore/jit/JIT.h:
* Source/JavaScriptCore/jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_lexical_environment):
(JSC::JIT::emit_op_create_direct_arguments):
(JSC::JIT::emit_op_create_scoped_arguments):
(JSC::JIT::emit_op_create_cloned_arguments):
* Source/JavaScriptCore/jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/jit/JITOperations.h:
* Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* Source/JavaScriptCore/llint/LLIntSlowPaths.h:
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:
* Source/JavaScriptCore/runtime/CommonSlowPaths.h:

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



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


More information about the webkit-changes mailing list