Changeset 277963 in webkit for trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- May 24, 2021, 12:29:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r277759 r277963 985 985 if (m_jitCode && !m_jitCode->isShared()) 986 986 extraMemory += m_jitCode->size(); 987 #if ENABLE(JIT)988 if (m_jitData)989 extraMemory += m_jitData->size(locker);990 #endif991 extraMemory += m_argumentValueProfiles.size() * sizeof(ValueProfile);992 extraMemory += m_functionDecls.size() * sizeof(decltype(*m_functionDecls.data()));993 extraMemory += m_functionExprs.size() * sizeof(decltype(*m_functionExprs.data()));994 995 987 visitor.reportExtraMemoryVisited(extraMemory); 996 988 … … 1029 1021 template bool CodeBlock::shouldVisitStrongly(const ConcurrentJSLocker&, AbstractSlotVisitor&); 1030 1022 template bool CodeBlock::shouldVisitStrongly(const ConcurrentJSLocker&, SlotVisitor&); 1031 1032 #if ENABLE(JIT)1033 size_t CodeBlock::JITData::size(const ConcurrentJSLocker&) const1034 {1035 size_t size = sizeof(JITData);1036 size += m_stubInfos.estimatedAllocationSizeInBytes();1037 size += m_addICs.estimatedAllocationSizeInBytes();1038 size += m_mulICs.estimatedAllocationSizeInBytes();1039 size += m_negICs.estimatedAllocationSizeInBytes();1040 size += m_subICs.estimatedAllocationSizeInBytes();1041 size += m_byValInfos.estimatedAllocationSizeInBytes();1042 size += m_callLinkInfos.estimatedAllocationSizeInBytes();1043 size += m_switchJumpTables.size() * sizeof(decltype(*m_switchJumpTables.data()));1044 size += m_stringSwitchJumpTables.size() * sizeof(decltype(*m_stringSwitchJumpTables.data()));1045 // FIXME: account for m_calleeSaveRegisters but it's not a big deal since it's a fixed size and small.1046 if (m_pcToCodeOriginMap)1047 size += m_pcToCodeOriginMap->memorySize();1048 if (m_jitCodeMap)1049 size += m_jitCodeMap.memorySize();1050 return size;1051 }1052 #endif1053 1023 1054 1024 bool CodeBlock::shouldJettisonDueToWeakReference(VM& vm)
Note:
See TracChangeset
for help on using the changeset viewer.