Changeset 215853 in webkit
- Timestamp:
- Apr 26, 2017 7:57:09 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r215852 r215853 1 2017-04-26 Keith Miller <keith_miller@apple.com> 2 3 Follow up to r215843 4 https://bugs.webkit.org/show_bug.cgi?id=171361 5 6 Reviewed by Saam Barati. 7 8 This patch fixes some style comments Saam didn't get a chance to 9 request before I landed: https://bugs.webkit.org/show_bug.cgi?id=170134. 10 11 It renames Wasm::CodeBlock::m_wasmEntrypoints to 12 m_wasmIndirectCallEntrypoints, as well as fixes some copyrights and 13 indentation. 14 15 * wasm/WasmBBQPlan.cpp: 16 * wasm/WasmCodeBlock.cpp: 17 (JSC::Wasm::CodeBlock::CodeBlock): 18 * wasm/WasmCodeBlock.h: 19 (JSC::Wasm::CodeBlock::wasmEntrypointLoadLocationFromFunctionIndexSpace): 20 * wasm/WasmOMGPlan.cpp: 21 (JSC::Wasm::OMGPlan::work): 22 * wasm/WasmTierUpCount.h: 23 (JSC::Wasm::TierUpCount::TierUpCount): 24 (JSC::Wasm::TierUpCount::loopDecrement): 25 (JSC::Wasm::TierUpCount::functionEntryDecrement): 26 (JSC::Wasm::TierUpCount::shouldStartTierUp): 27 (JSC::Wasm::TierUpCount::count): 28 1 29 2017-04-26 Saam Barati <sbarati@apple.com> 2 30 -
trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
r215843 r215853 1 1 /* 2 * Copyright (C) 2016 Apple Inc. All rights reserved.2 * Copyright (C) 2016-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without -
trunk/Source/JavaScriptCore/wasm/WasmCodeBlock.cpp
r215843 r215853 53 53 m_jsCallees.resize(m_calleeCount); 54 54 m_optimizedCallees.resize(m_calleeCount); 55 m_wasm EntryPoints.resize(m_calleeCount);55 m_wasmIndirectCallEntryPoints.resize(m_calleeCount); 56 56 57 57 m_plan->initializeCallees([&] (unsigned calleeIndex, Ref<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) { 58 58 m_jsCallees[calleeIndex] = WTFMove(jsEntrypointCallee); 59 59 m_callees[calleeIndex] = WTFMove(wasmEntrypointCallee); 60 m_wasm EntryPoints[calleeIndex] = m_callees[calleeIndex]->entrypoint();60 m_wasmIndirectCallEntryPoints[calleeIndex] = m_callees[calleeIndex]->entrypoint(); 61 61 }); 62 62 -
trunk/Source/JavaScriptCore/wasm/WasmCodeBlock.h
r215843 r215853 99 99 RELEASE_ASSERT(functionIndexSpace >= functionImportCount()); 100 100 unsigned calleeIndex = functionIndexSpace - functionImportCount(); 101 return &m_wasm EntryPoints[calleeIndex];101 return &m_wasmIndirectCallEntryPoints[calleeIndex]; 102 102 } 103 103 … … 121 121 Vector<RefPtr<Callee>> m_optimizedCallees; 122 122 Vector<RefPtr<Callee>> m_jsCallees; 123 Vector<void*> m_wasm EntryPoints;123 Vector<void*> m_wasmIndirectCallEntryPoints; 124 124 Vector<TierUpCount> m_tierUpCounts; 125 125 Vector<Vector<UnlinkedWasmToWasmCall>> m_wasmToWasmCallsites; -
trunk/Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
r215843 r215853 1 1 /* 2 * Copyright (C) 201 6Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 125 125 // It's important to make sure we do this before we make any of the code we just compiled visible. If we didn't, we could end up 126 126 // where we are tiering up some function A to A' and we repatch some function B to call A' instead of A. Another CPU could see 127 // the updates to B but still not have reset it 's cache of A', which would lead to all kinds of badness.127 // the updates to B but still not have reset its cache of A', which would lead to all kinds of badness. 128 128 resetInstructionCacheOnAllThreads(); 129 129 WTF::storeStoreFence(); // This probably isn't necessary but it's good to be paranoid. 130 130 131 m_codeBlock->m_wasm EntryPoints[m_functionIndex] = entrypoint;131 m_codeBlock->m_wasmIndirectCallEntryPoints[m_functionIndex] = entrypoint; 132 132 { 133 133 LockHolder holder(m_codeBlock->m_lock); -
trunk/Source/JavaScriptCore/wasm/WasmTierUpCount.h
r215843 r215853 34 34 namespace JSC { namespace Wasm { 35 35 36 37 38 39 40 41 42 43 44 45 46 47 36 // This class manages the tier up counts for Wasm binaries. The main interesting thing about 37 // wasm tiering up counts is that the least significant bit indicates if the tier up has already 38 // started. Also, wasm code does not atomically update this count. This is because we 39 // don't care too much if the countdown is slightly off. The tier up trigger is atomic, however, 40 // so tier up will be triggered exactly once. 41 class TierUpCount { 42 WTF_MAKE_NONCOPYABLE(TierUpCount); 43 public: 44 TierUpCount() 45 : m_count(Options::webAssemblyOMGTierUpCount() * 2) 46 { 47 } 48 48 49 50 51 52 53 49 TierUpCount(TierUpCount&& other) 50 { 51 ASSERT(other.m_count == Options::webAssemblyOMGTierUpCount() * 2); 52 m_count = other.m_count; 53 } 54 54 55 56 55 static uint32_t loopDecrement() { return Options::webAssemblyLoopDecrement() * 2; } 56 static uint32_t functionEntryDecrement() { return Options::webAssemblyFunctionEntryDecrement() * 2; } 57 57 58 59 60 61 58 bool shouldStartTierUp() 59 { 60 return !(WTF::atomicExchangeOr(&m_count, 1) & 1); 61 } 62 62 63 63 int32_t count() { return bitwise_cast<int32_t>(m_count); } 64 64 65 66 67 65 private: 66 uint32_t m_count; 67 }; 68 68 69 69 } } // namespace JSC::Wasm
Note: See TracChangeset
for help on using the changeset viewer.