WebKit Bugzilla
Attachment 362584 Details for
Bug 194891
: [JSC] Remove WatchpointSet creation for SymbolTable entries if VM::canUseJIT() returns false
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194891-20190220203215.patch (text/plain), 5.07 KB, created by
Yusuke Suzuki
on 2019-02-20 20:32:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2019-02-20 20:32:15 PST
Size:
5.07 KB
patch
obsolete
>Subversion Revision: 241858 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d47fd8b099adb295d9a983cc5c5dec6e6d43b321..dae4af65a8a15fff364edf8c5daf93ec2517af94 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-02-20 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ [JSC] Remove WatchpointSet creation for SymbolTable entries if VM::canUseJIT() returns false >+ https://bugs.webkit.org/show_bug.cgi?id=194891 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WatchpointSet in SymbolTable is used to fold the value into a constant in JIT tiers. And it is >+ not useful under the non-JIT mode. This patch avoids creation of WatchpointSet in SymbolTable >+ if VM::canUseJIT() returns false. >+ >+ * llint/LowLevelInterpreter32_64.asm: >+ * llint/LowLevelInterpreter64.asm: >+ * runtime/SymbolTable.cpp: >+ (JSC::SymbolTableEntry::addWatchpoint): Deleted. >+ * runtime/SymbolTable.h: >+ (JSC::SymbolTableEntry::isWatchable const): >+ (JSC::SymbolTableEntry::watchpointSet): >+ > 2019-02-20 Mark Lam <mark.lam@apple.com> > > Add code to validate expected GC activity modelled by doesGC() against what the runtime encounters. >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >index ff1ce5869e3691f44499861712dddb7e6dcfb7f3..9bb10d1ddb03f049c31168338b3a438f8692885c 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >@@ -2274,7 +2274,9 @@ llintOpWithMetadata(op_put_to_scope, OpPutToScope, macro (size, get, dispatch, m > get(m_value, t0) > loadConstantOrVariable(size, t0, t1, t2) > loadp OpPutToScope::Metadata::m_watchpointSet[t5], t3 >+ btpz t3, .noVariableWatchpointSet > notifyWrite(t3, .pDynamic) >+ .noVariableWatchpointSet: > loadp OpPutToScope::Metadata::m_operand[t5], t0 > storei t1, TagOffset[t0] > storei t2, PayloadOffset[t0] >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >index 45825401a78b680fae0a8f0962cdc3501599aa1f..7ba94b68c6c2dc38fab1fc8b1d4110991417361e 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >@@ -2310,8 +2310,10 @@ llintOpWithMetadata(op_put_to_scope, OpPutToScope, macro (size, get, dispatch, m > get(m_value, t0) > loadConstantOrVariable(size, t0, t1) > loadp OpPutToScope::Metadata::m_watchpointSet[t5], t2 >- loadp OpPutToScope::Metadata::m_operand[t5], t0 >+ btpz t2, .noVariableWatchpointSet > notifyWrite(t2, .pDynamic) >+ .noVariableWatchpointSet: >+ loadp OpPutToScope::Metadata::m_operand[t5], t0 > storeq t1, [t0] > end > >diff --git a/Source/JavaScriptCore/runtime/SymbolTable.cpp b/Source/JavaScriptCore/runtime/SymbolTable.cpp >index 25a2a73d00ca52a075ad9692a402e497421b8697..c93607e891447d6ace3d80c2e4e373f5685d726b 100644 >--- a/Source/JavaScriptCore/runtime/SymbolTable.cpp >+++ b/Source/JavaScriptCore/runtime/SymbolTable.cpp >@@ -70,11 +70,6 @@ void SymbolTableEntry::prepareToWatch() > entry->m_watchpoints = adoptRef(new WatchpointSet(ClearWatchpoint)); > } > >-void SymbolTableEntry::addWatchpoint(Watchpoint* watchpoint) >-{ >- fatEntry()->m_watchpoints->add(watchpoint); >-} >- > SymbolTableEntry::FatEntry* SymbolTableEntry::inflateSlow() > { > FatEntry* entry = new FatEntry(m_bits); >diff --git a/Source/JavaScriptCore/runtime/SymbolTable.h b/Source/JavaScriptCore/runtime/SymbolTable.h >index 59691b2ec41ec7ae97ad40c984901564cffd4019..8e80d4bb2e85161be315e868d5f81363f95bb6b2 100644 >--- a/Source/JavaScriptCore/runtime/SymbolTable.h >+++ b/Source/JavaScriptCore/runtime/SymbolTable.h >@@ -229,7 +229,7 @@ struct SymbolTableEntry { > > bool isWatchable() const > { >- return (m_bits & KindBitsMask) == ScopeKindBits; >+ return (m_bits & KindBitsMask) == ScopeKindBits && VM::canUseJIT(); > } > > // Asserts if the offset is anything but a scope offset. This structures the assertions >@@ -291,8 +291,6 @@ struct SymbolTableEntry { > > void prepareToWatch(); > >- void addWatchpoint(Watchpoint*); >- > // This watchpoint set is initialized clear, and goes through the following state transitions: > // > // First write to this var, in any scope that has this symbol table: Clear->IsWatched. >@@ -312,10 +310,12 @@ struct SymbolTableEntry { > // initializes that var in just one of them. This means that a compilation could constant-fold to one > // of the scopes that still has an undefined value for this variable. That's fine, because at that > // point any write to any of the instances of that variable would fire the watchpoint. >+ // >+ // Note that watchpointSet() returns nullptr if JIT is disabled. > WatchpointSet* watchpointSet() > { > if (!isFat()) >- return 0; >+ return nullptr; > return fatEntry()->m_watchpoints.get(); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194891
: 362584