Rename HighFidelityTypeProfiling variables for more clarity
https://bugs.webkit.org/show_bug.cgi?id=135899
Patch by Saam Barati <sbarati@apple.com> on 2014-08-20
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
Many names that are used in the type profiling infrastructure
prefix themselves with "HighFidelity" or include the words "high"
and/or "fidelity" in some way. But the words "high" and "fidelity" don't
add anything descriptive to the names surrounding type profiling.
So this patch removes all uses of "HighFidelity" and its variants.
Most renamings change "HighFidelity*" to "TypeProfiler*" or simply
drop the prefix "HighFidelity" all together. Now, almost all names
in relation to type profiling contain in them "TypeProfiler" or
"TypeProfiling" or some combination of the words "type" and "profile".
This patch also changes how we check if type profiling is enabled:
We no longer call vm::isProfilingTypesWithHighFidelity. We now just
check that vm::typeProfiler is not null.
This patch also changes all calls to TypeProfilerLog::processLogEntries
to use ASCIILiteral to form WTFStrings instead of vanilla C string literals.
* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecode/TypeLocation.h:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset):
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo):
(JSC::UnlinkedCodeBlock::highFidelityTypeProfileExpressionInfoForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addHighFidelityTypeProfileExpressionInfo): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::typeProfilingStartOffset):
(JSC::UnlinkedFunctionExecutable::typeProfilingEndOffset):
(JSC::UnlinkedFunctionExecutable::highFidelityTypeProfilingStartOffset): Deleted.
(JSC::UnlinkedFunctionExecutable::highFidelityTypeProfilingEndOffset): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitMove):
(JSC::BytecodeGenerator::emitTypeProfilerExpressionInfo):
(JSC::BytecodeGenerator::emitProfileType):
(JSC::BytecodeGenerator::emitHighFidelityTypeProfilingExpressionInfo): Deleted.
(JSC::BytecodeGenerator::emitProfileTypesWithHighFidelity): Deleted.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isProfilingTypesWithHighFidelity): Deleted.
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::ResolveNode::emitBytecode):
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::PostfixNode::emitResolve):
(JSC::PostfixNode::emitBracket):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitResolve):
(JSC::PrefixNode::emitBracket):
(JSC::PrefixNode::emitDot):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::AssignDotNode::emitBytecode):
(JSC::ReadModifyDotNode::emitBytecode):
(JSC::AssignBracketNode::emitBytecode):
(JSC::ReadModifyBracketNode::emitBytecode):
(JSC::ConstDeclNode::emitCodeSingle):
(JSC::EmptyVarExpression::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::FunctionBodyNode::emitBytecode):
* heap/Heap.cpp:
(JSC::Heap::collect):
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
(Inspector::recompileAllJSFunctionsForTypeProfiling):
(Inspector::InspectorRuntimeAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorRuntimeAgent::enableTypeProfiler):
(Inspector::InspectorRuntimeAgent::disableTypeProfiler):
(Inspector::InspectorRuntimeAgent::setTypeProfilerEnabledState):
(Inspector::InspectorRuntimeAgent::enableHighFidelityTypeProfiling): Deleted.
(Inspector::InspectorRuntimeAgent::disableHighFidelityTypeProfiling): Deleted.
(Inspector::InspectorRuntimeAgent::setHighFidelityTypeProfilingEnabledState): Deleted.
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json:
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompile):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_profile_types_with_high_fidelity): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_profile_types_with_high_fidelity): Deleted.
* jit/JITOperations.cpp:
* jsc.cpp:
(functionDumpTypesForAllVariables):
* llint/LLIntSlowPaths.cpp:
* llint/LowLevelInterpreter.asm:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/Executable.cpp:
(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::initializeGlobalProperties):
* runtime/Executable.h:
(JSC::ScriptExecutable::typeProfilingStartOffset):
(JSC::ScriptExecutable::typeProfilingEndOffset):
(JSC::ScriptExecutable::highFidelityTypeProfilingStartOffset): Deleted.
(JSC::ScriptExecutable::highFidelityTypeProfilingEndOffset): Deleted.
* runtime/HighFidelityLog.cpp: Removed.
* runtime/HighFidelityLog.h: Removed.
* runtime/HighFidelityTypeProfiler.cpp: Removed.
* runtime/HighFidelityTypeProfiler.h: Removed.
* runtime/Options.h:
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::prepareForTypeProfiling):
(JSC::SymbolTable::uniqueIDForVariable):
(JSC::SymbolTable::uniqueIDForRegister):
(JSC::SymbolTable::prepareForHighFidelityTypeProfiling): Deleted.
* runtime/SymbolTable.h:
* runtime/TypeProfiler.cpp: Added.
(JSC::TypeProfiler::logTypesForTypeLocation):
(JSC::TypeProfiler::insertNewLocation):
(JSC::TypeProfiler::getTypesForVariableAtOffsetForInspector):
(JSC::descriptorMatchesTypeLocation):
(JSC::TypeProfiler::findLocation):
* runtime/TypeProfiler.h: Added.
(JSC::QueryKey::QueryKey):
(JSC::QueryKey::isHashTableDeletedValue):
(JSC::QueryKey::operator==):
(JSC::QueryKey::hash):
(JSC::QueryKeyHash::hash):
(JSC::QueryKeyHash::equal):
(JSC::TypeProfiler::functionHasExecutedCache):
(JSC::TypeProfiler::typeLocationCache):
* runtime/TypeProfilerLog.cpp: Added.
(JSC::TypeProfilerLog::initializeLog):
(JSC::TypeProfilerLog::~TypeProfilerLog):
(JSC::TypeProfilerLog::processLogEntries):
* runtime/TypeProfilerLog.h: Added.
(JSC::TypeProfilerLog::LogEntry::structureIDOffset):
(JSC::TypeProfilerLog::LogEntry::valueOffset):
(JSC::TypeProfilerLog::LogEntry::locationOffset):
(JSC::TypeProfilerLog::TypeProfilerLog):
(JSC::TypeProfilerLog::recordTypeInformationForLocation):
(JSC::TypeProfilerLog::logEndPtr):
(JSC::TypeProfilerLog::logStartOffset):
(JSC::TypeProfilerLog::currentLogEntryOffset):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::enableTypeProfiler):
(JSC::VM::disableTypeProfiler):
(JSC::VM::dumpTypeProfilerData):
(JSC::VM::enableHighFidelityTypeProfiling): Deleted.
(JSC::VM::disableHighFidelityTypeProfiling): Deleted.
(JSC::VM::dumpHighFidelityProfilingTypes): Deleted.
* runtime/VM.h:
(JSC::VM::typeProfilerLog):
(JSC::VM::typeProfiler):
(JSC::VM::isProfilingTypesWithHighFidelity): Deleted.
(JSC::VM::highFidelityLog): Deleted.
(JSC::VM::highFidelityTypeProfiler): Deleted.
Source/WebInspectorUI:
Change a reference in a comment to a JavaScriptCore file to its
newly renamed variant.
* UserInterface/Models/ScriptSyntaxTree.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index aadde03..07ff7dc 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -416,8 +416,6 @@
runtime/FunctionHasExecutedCache.cpp
runtime/FunctionPrototype.cpp
runtime/GetterSetter.cpp
- runtime/HighFidelityLog.cpp
- runtime/HighFidelityTypeProfiler.cpp
runtime/Identifier.cpp
runtime/IndexingType.cpp
runtime/InitializeThreading.cpp
@@ -525,6 +523,8 @@
runtime/SymbolTable.cpp
runtime/TestRunnerUtils.cpp
runtime/TypeLocationCache.cpp
+ runtime/TypeProfiler.cpp
+ runtime/TypeProfilerLog.cpp
runtime/TypeSet.cpp
runtime/TypedArrayController.cpp
runtime/TypedArrayType.cpp
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 3a3ccce..73a17f6 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,186 @@
+2014-08-20 Saam Barati <sbarati@apple.com>
+
+ Rename HighFidelityTypeProfiling variables for more clarity
+ https://bugs.webkit.org/show_bug.cgi?id=135899
+
+ Reviewed by Geoffrey Garen.
+
+ Many names that are used in the type profiling infrastructure
+ prefix themselves with "HighFidelity" or include the words "high"
+ and/or "fidelity" in some way. But the words "high" and "fidelity" don't
+ add anything descriptive to the names surrounding type profiling.
+ So this patch removes all uses of "HighFidelity" and its variants.
+
+ Most renamings change "HighFidelity*" to "TypeProfiler*" or simply
+ drop the prefix "HighFidelity" all together. Now, almost all names
+ in relation to type profiling contain in them "TypeProfiler" or
+ "TypeProfiling" or some combination of the words "type" and "profile".
+
+ This patch also changes how we check if type profiling is enabled:
+ We no longer call vm::isProfilingTypesWithHighFidelity. We now just
+ check that vm::typeProfiler is not null.
+
+ This patch also changes all calls to TypeProfilerLog::processLogEntries
+ to use ASCIILiteral to form WTFStrings instead of vanilla C string literals.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/BytecodeList.json:
+ * bytecode/BytecodeUseDef.h:
+ (JSC::computeUsesForBytecodeOffset):
+ (JSC::computeDefsForBytecodeOffset):
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ (JSC::CodeBlock::CodeBlock):
+ * bytecode/TypeLocation.h:
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
+ (JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset):
+ (JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo):
+ (JSC::UnlinkedCodeBlock::highFidelityTypeProfileExpressionInfoForBytecodeOffset): Deleted.
+ (JSC::UnlinkedCodeBlock::addHighFidelityTypeProfileExpressionInfo): Deleted.
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedFunctionExecutable::typeProfilingStartOffset):
+ (JSC::UnlinkedFunctionExecutable::typeProfilingEndOffset):
+ (JSC::UnlinkedFunctionExecutable::highFidelityTypeProfilingStartOffset): Deleted.
+ (JSC::UnlinkedFunctionExecutable::highFidelityTypeProfilingEndOffset): Deleted.
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::generate):
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::emitMove):
+ (JSC::BytecodeGenerator::emitTypeProfilerExpressionInfo):
+ (JSC::BytecodeGenerator::emitProfileType):
+ (JSC::BytecodeGenerator::emitHighFidelityTypeProfilingExpressionInfo): Deleted.
+ (JSC::BytecodeGenerator::emitProfileTypesWithHighFidelity): Deleted.
+ * bytecompiler/BytecodeGenerator.h:
+ (JSC::BytecodeGenerator::isProfilingTypesWithHighFidelity): Deleted.
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::ThisNode::emitBytecode):
+ (JSC::ResolveNode::emitBytecode):
+ (JSC::BracketAccessorNode::emitBytecode):
+ (JSC::DotAccessorNode::emitBytecode):
+ (JSC::FunctionCallValueNode::emitBytecode):
+ (JSC::FunctionCallResolveNode::emitBytecode):
+ (JSC::FunctionCallBracketNode::emitBytecode):
+ (JSC::FunctionCallDotNode::emitBytecode):
+ (JSC::CallFunctionCallDotNode::emitBytecode):
+ (JSC::ApplyFunctionCallDotNode::emitBytecode):
+ (JSC::PostfixNode::emitResolve):
+ (JSC::PostfixNode::emitBracket):
+ (JSC::PostfixNode::emitDot):
+ (JSC::PrefixNode::emitResolve):
+ (JSC::PrefixNode::emitBracket):
+ (JSC::PrefixNode::emitDot):
+ (JSC::ReadModifyResolveNode::emitBytecode):
+ (JSC::AssignResolveNode::emitBytecode):
+ (JSC::AssignDotNode::emitBytecode):
+ (JSC::ReadModifyDotNode::emitBytecode):
+ (JSC::AssignBracketNode::emitBytecode):
+ (JSC::ReadModifyBracketNode::emitBytecode):
+ (JSC::ConstDeclNode::emitCodeSingle):
+ (JSC::EmptyVarExpression::emitBytecode):
+ (JSC::ReturnNode::emitBytecode):
+ (JSC::FunctionBodyNode::emitBytecode):
+ * heap/Heap.cpp:
+ (JSC::Heap::collect):
+ * inspector/agents/InspectorRuntimeAgent.cpp:
+ (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
+ (Inspector::recompileAllJSFunctionsForTypeProfiling):
+ (Inspector::InspectorRuntimeAgent::willDestroyFrontendAndBackend):
+ (Inspector::InspectorRuntimeAgent::enableTypeProfiler):
+ (Inspector::InspectorRuntimeAgent::disableTypeProfiler):
+ (Inspector::InspectorRuntimeAgent::setTypeProfilerEnabledState):
+ (Inspector::InspectorRuntimeAgent::enableHighFidelityTypeProfiling): Deleted.
+ (Inspector::InspectorRuntimeAgent::disableHighFidelityTypeProfiling): Deleted.
+ (Inspector::InspectorRuntimeAgent::setHighFidelityTypeProfilingEnabledState): Deleted.
+ * inspector/agents/InspectorRuntimeAgent.h:
+ * inspector/protocol/Runtime.json:
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompile):
+ * jit/JIT.h:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_profile_type):
+ (JSC::JIT::emit_op_profile_types_with_high_fidelity): Deleted.
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_profile_type):
+ (JSC::JIT::emit_op_profile_types_with_high_fidelity): Deleted.
+ * jit/JITOperations.cpp:
+ * jsc.cpp:
+ (functionDumpTypesForAllVariables):
+ * llint/LLIntSlowPaths.cpp:
+ * llint/LowLevelInterpreter.asm:
+ * runtime/CodeCache.cpp:
+ (JSC::CodeCache::getGlobalCodeBlock):
+ * runtime/CommonSlowPaths.cpp:
+ (JSC::SLOW_PATH_DECL):
+ * runtime/CommonSlowPaths.h:
+ * runtime/Executable.cpp:
+ (JSC::ScriptExecutable::ScriptExecutable):
+ (JSC::ProgramExecutable::ProgramExecutable):
+ (JSC::FunctionExecutable::FunctionExecutable):
+ (JSC::ProgramExecutable::initializeGlobalProperties):
+ * runtime/Executable.h:
+ (JSC::ScriptExecutable::typeProfilingStartOffset):
+ (JSC::ScriptExecutable::typeProfilingEndOffset):
+ (JSC::ScriptExecutable::highFidelityTypeProfilingStartOffset): Deleted.
+ (JSC::ScriptExecutable::highFidelityTypeProfilingEndOffset): Deleted.
+ * runtime/HighFidelityLog.cpp: Removed.
+ * runtime/HighFidelityLog.h: Removed.
+ * runtime/HighFidelityTypeProfiler.cpp: Removed.
+ * runtime/HighFidelityTypeProfiler.h: Removed.
+ * runtime/Options.h:
+ * runtime/SymbolTable.cpp:
+ (JSC::SymbolTable::prepareForTypeProfiling):
+ (JSC::SymbolTable::uniqueIDForVariable):
+ (JSC::SymbolTable::uniqueIDForRegister):
+ (JSC::SymbolTable::prepareForHighFidelityTypeProfiling): Deleted.
+ * runtime/SymbolTable.h:
+ * runtime/TypeProfiler.cpp: Added.
+ (JSC::TypeProfiler::logTypesForTypeLocation):
+ (JSC::TypeProfiler::insertNewLocation):
+ (JSC::TypeProfiler::getTypesForVariableAtOffsetForInspector):
+ (JSC::descriptorMatchesTypeLocation):
+ (JSC::TypeProfiler::findLocation):
+ * runtime/TypeProfiler.h: Added.
+ (JSC::QueryKey::QueryKey):
+ (JSC::QueryKey::isHashTableDeletedValue):
+ (JSC::QueryKey::operator==):
+ (JSC::QueryKey::hash):
+ (JSC::QueryKeyHash::hash):
+ (JSC::QueryKeyHash::equal):
+ (JSC::TypeProfiler::functionHasExecutedCache):
+ (JSC::TypeProfiler::typeLocationCache):
+ * runtime/TypeProfilerLog.cpp: Added.
+ (JSC::TypeProfilerLog::initializeLog):
+ (JSC::TypeProfilerLog::~TypeProfilerLog):
+ (JSC::TypeProfilerLog::processLogEntries):
+ * runtime/TypeProfilerLog.h: Added.
+ (JSC::TypeProfilerLog::LogEntry::structureIDOffset):
+ (JSC::TypeProfilerLog::LogEntry::valueOffset):
+ (JSC::TypeProfilerLog::LogEntry::locationOffset):
+ (JSC::TypeProfilerLog::TypeProfilerLog):
+ (JSC::TypeProfilerLog::recordTypeInformationForLocation):
+ (JSC::TypeProfilerLog::logEndPtr):
+ (JSC::TypeProfilerLog::logStartOffset):
+ (JSC::TypeProfilerLog::currentLogEntryOffset):
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ (JSC::VM::enableTypeProfiler):
+ (JSC::VM::disableTypeProfiler):
+ (JSC::VM::dumpTypeProfilerData):
+ (JSC::VM::enableHighFidelityTypeProfiling): Deleted.
+ (JSC::VM::disableHighFidelityTypeProfiling): Deleted.
+ (JSC::VM::dumpHighFidelityProfilingTypes): Deleted.
+ * runtime/VM.h:
+ (JSC::VM::typeProfilerLog):
+ (JSC::VM::typeProfiler):
+ (JSC::VM::isProfilingTypesWithHighFidelity): Deleted.
+ (JSC::VM::highFidelityLog): Deleted.
+ (JSC::VM::highFidelityTypeProfiler): Deleted.
+
2014-08-20 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r172799.
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
index a8834e2..593e799 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
@@ -689,8 +689,6 @@
<ClCompile Include="..\runtime\FunctionHasExecutedCache.cpp" />
<ClCompile Include="..\runtime\FunctionPrototype.cpp" />
<ClCompile Include="..\runtime\GetterSetter.cpp" />
- <ClCompile Include="..\runtime\HighFidelityLog.cpp" />
- <ClCompile Include="..\runtime\HighFidelityTypeProfiler.cpp" />
<ClCompile Include="..\runtime\Identifier.cpp" />
<ClCompile Include="..\runtime\IndexingType.cpp" />
<ClCompile Include="..\runtime\InitializeThreading.cpp" />
@@ -799,6 +797,8 @@
<ClCompile Include="..\runtime\TypedArrayController.cpp" />
<ClCompile Include="..\runtime\TypedArrayType.cpp" />
<ClCompile Include="..\runtime\TypeLocationCache.cpp" />
+ <ClCompile Include="..\runtime\TypeProfiler.cpp" />
+ <ClCompile Include="..\runtime\TypeProfilerLog.cpp" />
<ClCompile Include="..\runtime\TypeSet.cpp" />
<ClCompile Include="..\runtime\VM.cpp" />
<ClCompile Include="..\runtime\VMEntryScope.cpp" />
@@ -1425,8 +1425,6 @@
<ClInclude Include="..\runtime\GenericTypedArrayView.h" />
<ClInclude Include="..\runtime\GenericTypedArrayViewInlines.h" />
<ClInclude Include="..\runtime\GetterSetter.h" />
- <ClInclude Include="..\runtime\HighFidelityLog.h" />
- <ClInclude Include="..\runtime\HighFidelityTypeProfiler.h" />
<ClInclude Include="..\runtime\Identifier.h" />
<ClInclude Include="..\runtime\IndexingHeader.h" />
<ClInclude Include="..\runtime\IndexingHeaderInlines.h" />
@@ -1584,6 +1582,8 @@
<ClInclude Include="..\runtime\TypedArrayInlines.h" />
<ClInclude Include="..\runtime\TypedArrayType.h" />
<ClInclude Include="..\runtime\TypeLocationCache.h" />
+ <ClInclude Include="..\runtime\TypeProfiler.h" />
+ <ClInclude Include="..\runtime\TypeProfilerLog.h" />
<ClInclude Include="..\runtime\TypeSet.h" />
<ClInclude Include="..\runtime\TypedArrays.h" />
<ClInclude Include="..\runtime\Uint16Array.h" />
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
index 669ade0..64e540f 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
+++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
@@ -612,12 +612,6 @@
<ClCompile Include="..\runtime\GetterSetter.cpp">
<Filter>runtime</Filter>
</ClCompile>
- <ClCompile Include="..\runtime\HighFidelityLog.cpp">
- <Filter>runtime</Filter>
- </ClCompile>
- <ClCompile Include="..\runtime\HighFidelityTypeProfiler.cpp">
- <Filter>runtime</Filter>
- </ClCompile>
<ClCompile Include="..\runtime\Identifier.cpp">
<Filter>runtime</Filter>
</ClCompile>
@@ -855,6 +849,12 @@
<ClCompile Include="..\runtime\TypeLocationCache.cpp">
<Filter>runtime</Filter>
</ClCompile>
+ <ClCompile Include="..\runtime\TypeProfiler.cpp">
+ <Filter>runtime</Filter>
+ </ClCompile>
+ <ClCompile Include="..\runtime\TypeProfilerLog.cpp">
+ <Filter>runtime</Filter>
+ </ClCompile>
<ClCompile Include="..\runtime\TypeSet.cpp">
<Filter>runtime</Filter>
</ClCompile>
@@ -2558,12 +2558,6 @@
<ClInclude Include="..\runtime\GetterSetter.h">
<Filter>runtime</Filter>
</ClInclude>
- <ClInclude Include="..\runtime\HighFidelityLog.h">
- <Filter>runtime</Filter>
- </ClInclude>
- <ClInclude Include="..\runtime\HighFidelityTypeProfiler.h">
- <Filter>runtime</Filter>
- </ClInclude>
<ClInclude Include="..\runtime\Identifier.h">
<Filter>runtime</Filter>
</ClInclude>
@@ -2834,6 +2828,12 @@
<ClInclude Include="..\runtime\TypeLocationCache.h">
<Filter>runtime</Filter>
</ClInclude>
+ <ClInclude Include="..\runtime\TypeProfiler.h">
+ <Filter>runtime</Filter>
+ </ClInclude>
+ <ClInclude Include="..\runtime\TypeProfilerLog.h">
+ <Filter>runtime</Filter>
+ </ClInclude>
<ClInclude Include="..\runtime\TypeSet.h">
<Filter>runtime</Filter>
</ClInclude>
diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 68f72d2..aabf1ae 100644
--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -228,10 +228,8 @@
0F2D4DE819832DAC007D4B19 /* ToThisStatus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2D4DE519832DAC007D4B19 /* ToThisStatus.cpp */; };
0F2D4DE919832DAC007D4B19 /* ToThisStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2D4DE619832DAC007D4B19 /* ToThisStatus.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F2D4DEA19832DAC007D4B19 /* TypeLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2D4DE719832DAC007D4B19 /* TypeLocation.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0F2D4DEB19832DC4007D4B19 /* HighFidelityLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2D4DDF19832D91007D4B19 /* HighFidelityLog.cpp */; };
- 0F2D4DEC19832DC4007D4B19 /* HighFidelityLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2D4DE019832D91007D4B19 /* HighFidelityLog.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0F2D4DED19832DC4007D4B19 /* HighFidelityTypeProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2D4DE119832D91007D4B19 /* HighFidelityTypeProfiler.cpp */; };
- 0F2D4DEE19832DC4007D4B19 /* HighFidelityTypeProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2D4DE219832D91007D4B19 /* HighFidelityTypeProfiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F2D4DEB19832DC4007D4B19 /* TypeProfilerLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2D4DDF19832D91007D4B19 /* TypeProfilerLog.cpp */; };
+ 0F2D4DEC19832DC4007D4B19 /* TypeProfilerLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2D4DE019832D91007D4B19 /* TypeProfilerLog.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F2D4DEF19832DD3007D4B19 /* TypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2D4DE319832D91007D4B19 /* TypeSet.cpp */; };
0F2D4DF019832DD6007D4B19 /* TypeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2D4DE419832D91007D4B19 /* TypeSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F2E892C16D028AD009E4FD2 /* UnusedPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = 65987F2F16828A7E003C2F8D /* UnusedPointer.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -867,6 +865,8 @@
52B310FD1974AE870080857C /* FunctionHasExecutedCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52B310FC1974AE870080857C /* FunctionHasExecutedCache.cpp */; };
52B310FF1975B4240080857C /* TypeLocationCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52B310FE1975B4240080857C /* TypeLocationCache.cpp */; };
52B311011975B4670080857C /* TypeLocationCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B311001975B4670080857C /* TypeLocationCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 52C952B719A289850069B386 /* TypeProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 52C952B619A289850069B386 /* TypeProfiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 52C952B919A28A1C0069B386 /* TypeProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52C952B819A28A1C0069B386 /* TypeProfiler.cpp */; };
5510502618EB827500001F3E /* JSCallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440F88F0A508B100005F061 /* JSCallbackFunction.h */; };
552EA70C1908704800A66F2F /* JSDataViewPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66BF17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp */; };
5540757218DA58AD00EFF7F2 /* ArgList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF605120E203EF800B9A64D /* ArgList.h */; };
@@ -2131,10 +2131,8 @@
0F2BDC5015228FFA00CD8910 /* DFGVariableEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGVariableEvent.cpp; path = dfg/DFGVariableEvent.cpp; sourceTree = "<group>"; };
0F2D4DDB19832D34007D4B19 /* DebuggerScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebuggerScope.cpp; sourceTree = "<group>"; };
0F2D4DDC19832D34007D4B19 /* DebuggerScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerScope.h; sourceTree = "<group>"; };
- 0F2D4DDF19832D91007D4B19 /* HighFidelityLog.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HighFidelityLog.cpp; sourceTree = "<group>"; };
- 0F2D4DE019832D91007D4B19 /* HighFidelityLog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HighFidelityLog.h; sourceTree = "<group>"; };
- 0F2D4DE119832D91007D4B19 /* HighFidelityTypeProfiler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HighFidelityTypeProfiler.cpp; sourceTree = "<group>"; };
- 0F2D4DE219832D91007D4B19 /* HighFidelityTypeProfiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HighFidelityTypeProfiler.h; sourceTree = "<group>"; };
+ 0F2D4DDF19832D91007D4B19 /* TypeProfilerLog.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TypeProfilerLog.cpp; sourceTree = "<group>"; };
+ 0F2D4DE019832D91007D4B19 /* TypeProfilerLog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeProfilerLog.h; sourceTree = "<group>"; };
0F2D4DE319832D91007D4B19 /* TypeSet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TypeSet.cpp; sourceTree = "<group>"; };
0F2D4DE419832D91007D4B19 /* TypeSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeSet.h; sourceTree = "<group>"; };
0F2D4DE519832DAC007D4B19 /* ToThisStatus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToThisStatus.cpp; sourceTree = "<group>"; };
@@ -2740,6 +2738,8 @@
52B310FC1974AE870080857C /* FunctionHasExecutedCache.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionHasExecutedCache.cpp; sourceTree = "<group>"; };
52B310FE1975B4240080857C /* TypeLocationCache.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TypeLocationCache.cpp; sourceTree = "<group>"; };
52B311001975B4670080857C /* TypeLocationCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeLocationCache.h; sourceTree = "<group>"; };
+ 52C952B619A289850069B386 /* TypeProfiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeProfiler.h; sourceTree = "<group>"; };
+ 52C952B819A28A1C0069B386 /* TypeProfiler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TypeProfiler.cpp; sourceTree = "<group>"; };
5540758418F4A37500602A5D /* CompileRuntimeToLLVMIR.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CompileRuntimeToLLVMIR.xcconfig; sourceTree = "<group>"; };
55407AC818DA58AD00EFF7F2 /* libCompileRuntimeToLLVMIR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCompileRuntimeToLLVMIR.a; sourceTree = BUILT_PRODUCTS_DIR; };
5D53726D0E1C546B0021E549 /* Tracing.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Tracing.d; sourceTree = "<group>"; };
@@ -4399,6 +4399,7 @@
BCD203480E17135E002C7E82 /* DatePrototype.h */,
A70447EB17A0BD7000F5898E /* DumpContext.cpp */,
A70447EC17A0BD7000F5898E /* DumpContext.h */,
+ 2AD2EDFA19799E38004D6478 /* EnumerationMode.h */,
BC337BEA0E1B00CB0076918A /* Error.cpp */,
BC3046060E1F497F003232CF /* Error.h */,
BC02E9040E1839DB000F9297 /* ErrorConstructor.cpp */,
@@ -4421,18 +4422,14 @@
BC2680C10E16D4E900A06E92 /* FunctionConstructor.h */,
0FB4B52116B6278D003F696B /* FunctionExecutableDump.cpp */,
0FB4B52216B6278D003F696B /* FunctionExecutableDump.h */,
- 52B310FA1974AE610080857C /* FunctionHasExecutedCache.h */,
52B310FC1974AE870080857C /* FunctionHasExecutedCache.cpp */,
+ 52B310FA1974AE610080857C /* FunctionHasExecutedCache.h */,
F692A85C0255597D01FF60F7 /* FunctionPrototype.cpp */,
F692A85D0255597D01FF60F7 /* FunctionPrototype.h */,
0F2B66B217B6B5AB00A7AE3F /* GenericTypedArrayView.h */,
0F2B66B317B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h */,
BC02E9B80E184545000F9297 /* GetterSetter.cpp */,
BC337BDE0E1AF0B80076918A /* GetterSetter.h */,
- 0F2D4DDF19832D91007D4B19 /* HighFidelityLog.cpp */,
- 0F2D4DE019832D91007D4B19 /* HighFidelityLog.h */,
- 0F2D4DE119832D91007D4B19 /* HighFidelityTypeProfiler.cpp */,
- 0F2D4DE219832D91007D4B19 /* HighFidelityTypeProfiler.h */,
933A349D038AE80F008635CE /* Identifier.cpp */,
933A349A038AE7C6008635CE /* Identifier.h */,
8606DDE918DA44AB00A383D0 /* IdentifierInlines.h */,
@@ -4442,9 +4439,9 @@
0FB7F38F15ED8E3800F167B2 /* IndexingType.h */,
E178636C0D9BEEC300D74E75 /* InitializeThreading.cpp */,
E178633F0D9BEC0000D74E75 /* InitializeThreading.h */,
+ A7A8AF2B17ADB5F3005AB174 /* Int8Array.h */,
A7A8AF2C17ADB5F3005AB174 /* Int16Array.h */,
A7A8AF2D17ADB5F3005AB174 /* Int32Array.h */,
- A7A8AF2B17ADB5F3005AB174 /* Int8Array.h */,
A78853F717972629001440E4 /* IntendedStructureChain.cpp */,
A78853F817972629001440E4 /* IntendedStructureChain.h */,
BC9BB95B0E19680600DF8855 /* InternalFunction.cpp */,
@@ -4503,9 +4500,9 @@
A59455911824744700CC3843 /* JSGlobalObjectDebuggable.h */,
BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */,
BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */,
+ 0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */,
0F2B66CA17B6B5AB00A7AE3F /* JSInt16Array.h */,
0F2B66CB17B6B5AB00A7AE3F /* JSInt32Array.h */,
- 0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */,
65EA4C99092AF9E20093D800 /* JSLock.cpp */,
65EA4C9A092AF9E20093D800 /* JSLock.h */,
A700873F17CBE8EB00C3E643 /* JSMap.cpp */,
@@ -4532,6 +4529,8 @@
7C184E1D17BEE22E007CB63A /* JSPromisePrototype.h */,
7C008CDC1871258D00955C24 /* JSPromiseReaction.cpp */,
7C008CDD1871258D00955C24 /* JSPromiseReaction.h */,
+ 2A05ABD31961DF2400341750 /* JSPropertyNameEnumerator.cpp */,
+ 2A05ABD41961DF2400341750 /* JSPropertyNameEnumerator.h */,
862553CE16136AA5009F17D0 /* JSProxy.cpp */,
862553CF16136AA5009F17D0 /* JSProxy.h */,
14874AE115EBDE4A002E3587 /* JSScope.cpp */,
@@ -4557,10 +4556,10 @@
0F2B66D017B6B5AB00A7AE3F /* JSTypedArrays.cpp */,
0F2B66D117B6B5AB00A7AE3F /* JSTypedArrays.h */,
6507D2970E871E4A00D7D896 /* JSTypeInfo.h */,
- 0F2B66D417B6B5AB00A7AE3F /* JSUint16Array.h */,
- 0F2B66D517B6B5AB00A7AE3F /* JSUint32Array.h */,
0F2B66D217B6B5AB00A7AE3F /* JSUint8Array.h */,
0F2B66D317B6B5AB00A7AE3F /* JSUint8ClampedArray.h */,
+ 0F2B66D417B6B5AB00A7AE3F /* JSUint16Array.h */,
+ 0F2B66D517B6B5AB00A7AE3F /* JSUint32Array.h */,
BC22A39A0E16E14800AF21C8 /* JSVariableObject.cpp */,
14F252560D08DD8D004ECFFF /* JSVariableObject.h */,
A7CA3AE117DA41AE006538AF /* JSWeakMap.cpp */,
@@ -4702,15 +4701,19 @@
0F2B66DB17B6B5AB00A7AE3F /* TypedArrays.h */,
0F2B66DC17B6B5AB00A7AE3F /* TypedArrayType.cpp */,
0F2B66DD17B6B5AB00A7AE3F /* TypedArrayType.h */,
- 52B311001975B4670080857C /* TypeLocationCache.h */,
52B310FE1975B4240080857C /* TypeLocationCache.cpp */,
+ 52B311001975B4670080857C /* TypeLocationCache.h */,
+ 52C952B819A28A1C0069B386 /* TypeProfiler.cpp */,
+ 52C952B619A289850069B386 /* TypeProfiler.h */,
+ 0F2D4DDF19832D91007D4B19 /* TypeProfilerLog.cpp */,
+ 0F2D4DE019832D91007D4B19 /* TypeProfilerLog.h */,
0F2D4DE319832D91007D4B19 /* TypeSet.cpp */,
0F2D4DE419832D91007D4B19 /* TypeSet.h */,
+ A7A8AF3017ADB5F3005AB174 /* Uint8Array.h */,
+ A7A8AF3117ADB5F3005AB174 /* Uint8ClampedArray.h */,
A7A8AF3217ADB5F3005AB174 /* Uint16Array.h */,
866739D113BFDE710023D87C /* Uint16WithFraction.h */,
A7A8AF3317ADB5F3005AB174 /* Uint32Array.h */,
- A7A8AF3017ADB5F3005AB174 /* Uint8Array.h */,
- A7A8AF3117ADB5F3005AB174 /* Uint8ClampedArray.h */,
E18E3A570DF9278C00D90B34 /* VM.cpp */,
E18E3A560DF9278C00D90B34 /* VM.h */,
FE5932A5183C5A2600A1ECCC /* VMEntryScope.cpp */,
@@ -4728,9 +4731,6 @@
1420BE7A10AA6DDB00F455D2 /* WeakRandom.h */,
A7DCB77912E3D90500911940 /* WriteBarrier.h */,
C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */,
- 2A05ABD31961DF2400341750 /* JSPropertyNameEnumerator.cpp */,
- 2A05ABD41961DF2400341750 /* JSPropertyNameEnumerator.h */,
- 2AD2EDFA19799E38004D6478 /* EnumerationMode.h */,
);
path = runtime;
sourceTree = "<group>";
@@ -6075,7 +6075,7 @@
C283190016FE4B7D00157BFD /* HandleBlock.h in Headers */,
C283190216FE533E00157BFD /* HandleBlockInlines.h in Headers */,
0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */,
- 0F2D4DEC19832DC4007D4B19 /* HighFidelityLog.h in Headers */,
+ 0F2D4DEC19832DC4007D4B19 /* TypeProfilerLog.h in Headers */,
142E3136134FF0A600AFADB5 /* HandleSet.h in Headers */,
142E3138134FF0A600AFADB5 /* HandleStack.h in Headers */,
1478297B1379E8A800A7C2A3 /* HandleTypes.h in Headers */,
@@ -6116,7 +6116,6 @@
A53243981856A489002ED692 /* InspectorJS.json in Headers */,
A532438818568335002ED692 /* InspectorJSBackendDispatchers.h in Headers */,
A532438A18568335002ED692 /* InspectorJSFrontendDispatchers.h in Headers */,
- 0F2D4DEE19832DC4007D4B19 /* HighFidelityTypeProfiler.h in Headers */,
8606DDEA18DA44AB00A383D0 /* IdentifierInlines.h in Headers */,
A532438C18568335002ED692 /* InspectorJSTypeBuilders.h in Headers */,
A50E4B6218809DD50068A46D /* InspectorRuntimeAgent.h in Headers */,
@@ -6391,6 +6390,7 @@
52B311011975B4670080857C /* TypeLocationCache.h in Headers */,
0FF729BE166AD360000F5BA3 /* ProfilerExecutionCounter.h in Headers */,
0F190CAD189D82F6000AE5F0 /* ProfilerJettisonReason.h in Headers */,
+ 52C952B719A289850069B386 /* TypeProfiler.h in Headers */,
0FF729BF166AD360000F5BA3 /* ProfilerOrigin.h in Headers */,
0FF729C0166AD360000F5BA3 /* ProfilerOriginStack.h in Headers */,
0FB1058C1675483300F8AB6E /* ProfilerOSRExit.h in Headers */,
@@ -7104,9 +7104,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 52B310FF1975B4240080857C /* TypeLocationCache.cpp in Sources */,
9EA5C7A2190F088700508EBE /* InitializeLLVMMac.cpp in Sources */,
9EA5C7A1190F084200508EBE /* BundlePath.mm in Sources */,
+ 52B310FF1975B4240080857C /* TypeLocationCache.cpp in Sources */,
9E729408190F021E001A91B5 /* InitializeLLVMPOSIX.cpp in Sources */,
9E729407190F01A5001A91B5 /* InitializeThreading.cpp in Sources */,
0FFA549716B8835000B3A982 /* A64DOpcode.cpp in Sources */,
@@ -7185,7 +7185,6 @@
0F485321187750560083B687 /* DFGArithMode.cpp in Sources */,
0F2D4DDD19832D34007D4B19 /* DebuggerScope.cpp in Sources */,
0F63948415E48118006A597C /* DFGArrayMode.cpp in Sources */,
- 0F2D4DED19832DC4007D4B19 /* HighFidelityTypeProfiler.cpp in Sources */,
A7D9A29417A0BC7400EE2618 /* DFGAtTailAbstractState.cpp in Sources */,
0F666EC61835672B00D017F1 /* DFGAvailability.cpp in Sources */,
0F714CA416EA92F000F3EBEB /* DFGBackwardsPropagationPhase.cpp in Sources */,
@@ -7308,7 +7307,7 @@
A7B48F490EE8936F00DCBDB6 /* ExecutableAllocator.cpp in Sources */,
86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */,
0F56A1D515001CF4002992B1 /* ExecutionCounter.cpp in Sources */,
- 0F2D4DEB19832DC4007D4B19 /* HighFidelityLog.cpp in Sources */,
+ 0F2D4DEB19832DC4007D4B19 /* TypeProfilerLog.cpp in Sources */,
0F0332C018ADFAE1005F979A /* ExitingJITType.cpp in Sources */,
0FB105851675480F00F8AB6E /* ExitKind.cpp in Sources */,
0FEA0A1C1708B00700BB722C /* FTLAbstractHeap.cpp in Sources */,
@@ -7642,6 +7641,7 @@
A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */,
0F2B670717B6B5AB00A7AE3F /* TypedArrayController.cpp in Sources */,
0F2B670A17B6B5AB00A7AE3F /* TypedArrayType.cpp in Sources */,
+ 52C952B919A28A1C0069B386 /* TypeProfiler.cpp in Sources */,
0FF4274A158EBE91004CB9FF /* udis86.c in Sources */,
0FF42740158EBE8B004CB9FF /* udis86_decode.c in Sources */,
0FF42743158EBE91004CB9FF /* udis86_input.c in Sources */,
diff --git a/Source/JavaScriptCore/bytecode/BytecodeList.json b/Source/JavaScriptCore/bytecode/BytecodeList.json
index 3ae19bf..642c4bb 100644
--- a/Source/JavaScriptCore/bytecode/BytecodeList.json
+++ b/Source/JavaScriptCore/bytecode/BytecodeList.json
@@ -120,7 +120,7 @@
{ "name" : "op_profile_will_call", "length" : 2 },
{ "name" : "op_profile_did_call", "length" : 2 },
{ "name" : "op_end", "length" : 2 },
- { "name" : "op_profile_types_with_high_fidelity", "length" : 6 },
+ { "name" : "op_profile_type", "length" : 6 },
{ "name" : "op_get_enumerable_length", "length" : 3 },
{ "name" : "op_has_indexed_property", "length" : 5 },
{ "name" : "op_has_structure_property", "length" : 5 },
diff --git a/Source/JavaScriptCore/bytecode/BytecodeUseDef.h b/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
index 671137e..345f710 100644
--- a/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
+++ b/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
@@ -65,7 +65,7 @@
case op_tear_off_activation:
case op_profile_will_call:
case op_profile_did_call:
- case op_profile_types_with_high_fidelity:
+ case op_profile_type:
case op_throw:
case op_push_with_scope:
case op_end:
@@ -287,7 +287,7 @@
case op_put_by_val_direct:
case op_put_by_index:
case op_tear_off_arguments:
- case op_profile_types_with_high_fidelity:
+ case op_profile_type:
case op_touch_entry:
#define LLINT_HELPER_OPCODES(opcode, length) case opcode:
FOR_EACH_LLINT_OPCODE_EXTENSION(LLINT_HELPER_OPCODES);
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
index 5b95c24..fbb020a 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -40,7 +40,6 @@
#include "DFGWorklist.h"
#include "Debugger.h"
#include "FunctionExecutableDump.h"
-#include "HighFidelityTypeProfiler.h"
#include "Interpreter.h"
#include "JIT.h"
#include "JITStubs.h"
@@ -49,7 +48,6 @@
#include "JSFunction.h"
#include "JSNameScope.h"
#include "LLIntEntrypoint.h"
-#include "TypeLocationCache.h"
#include "LowLevelInterpreter.h"
#include "JSCInlines.h"
#include "PolymorphicGetByIdList.h"
@@ -60,6 +58,8 @@
#include "RepatchBuffer.h"
#include "SlotVisitorInlines.h"
#include "StackVisitor.h"
+#include "TypeLocationCache.h"
+#include "TypeProfiler.h"
#include "UnlinkedInstructionStream.h"
#include <wtf/BagToHashMap.h>
#include <wtf/CommaPrinter.h>
@@ -839,11 +839,11 @@
++it;
break;
}
- case op_profile_types_with_high_fidelity: {
+ case op_profile_type: {
int r0 = (++it)->u.operand;
++it;
++it;
- printLocationAndOp(out, exec, location, it, "op_profile_types_with_high_fidelity");
+ printLocationAndOp(out, exec, location, it, "op_profile_type");
out.printf("%s", registerName(r0).data());
break;
}
@@ -1714,9 +1714,9 @@
bool didCloneSymbolTable = false;
if (SymbolTable* symbolTable = unlinkedCodeBlock->symbolTable()) {
- if (m_vm->isProfilingTypesWithHighFidelity()) {
+ if (m_vm->typeProfiler()) {
ConcurrentJITLocker locker(symbolTable->m_lock);
- symbolTable->prepareForHighFidelityTypeProfiling(locker);
+ symbolTable->prepareForTypeProfiling(locker);
}
if (codeType() == FunctionCode && symbolTable->captureCount()) {
@@ -1729,8 +1729,8 @@
ASSERT(m_source);
setNumParameters(unlinkedCodeBlock->numParameters());
- if (vm()->isProfilingTypesWithHighFidelity())
- vm()->highFidelityTypeProfiler()->functionHasExecutedCache()->removeUnexecutedRange(m_ownerExecutable->sourceID(), m_ownerExecutable->highFidelityTypeProfilingStartOffset(), m_ownerExecutable->highFidelityTypeProfilingEndOffset());
+ if (vm()->typeProfiler())
+ vm()->typeProfiler()->functionHasExecutedCache()->removeUnexecutedRange(m_ownerExecutable->sourceID(), m_ownerExecutable->typeProfilingStartOffset(), m_ownerExecutable->typeProfilingEndOffset());
setConstantRegisters(unlinkedCodeBlock->constantRegisters());
if (unlinkedCodeBlock->usesGlobalObject())
@@ -1738,8 +1738,8 @@
m_functionDecls.resizeToFit(unlinkedCodeBlock->numberOfFunctionDecls());
for (size_t count = unlinkedCodeBlock->numberOfFunctionDecls(), i = 0; i < count; ++i) {
UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionDecl(i);
- if (vm()->isProfilingTypesWithHighFidelity())
- vm()->highFidelityTypeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->highFidelityTypeProfilingStartOffset(), unlinkedExecutable->highFidelityTypeProfilingEndOffset());
+ if (vm()->typeProfiler())
+ vm()->typeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
unsigned lineCount = unlinkedExecutable->lineCount();
unsigned firstLine = ownerExecutable->lineNo() + unlinkedExecutable->firstLineOffset();
bool startColumnIsOnOwnerStartLine = !unlinkedExecutable->firstLineOffset();
@@ -1756,8 +1756,8 @@
m_functionExprs.resizeToFit(unlinkedCodeBlock->numberOfFunctionExprs());
for (size_t count = unlinkedCodeBlock->numberOfFunctionExprs(), i = 0; i < count; ++i) {
UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionExpr(i);
- if (vm()->isProfilingTypesWithHighFidelity())
- vm()->highFidelityTypeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->highFidelityTypeProfilingStartOffset(), unlinkedExecutable->highFidelityTypeProfilingEndOffset());
+ if (vm()->typeProfiler())
+ vm()->typeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
unsigned lineCount = unlinkedExecutable->lineCount();
unsigned firstLine = ownerExecutable->lineNo() + unlinkedExecutable->firstLineOffset();
bool startColumnIsOnOwnerStartLine = !unlinkedExecutable->firstLineOffset();
@@ -1992,23 +1992,23 @@
break;
}
- case op_profile_types_with_high_fidelity: {
- // The format of this instruction is: op_profile_types_with_high_fidelity regToProfile, TypeLocation*, flag, identifier?, resolveType?
+ case op_profile_type: {
+ // The format of this instruction is: op_profile_type regToProfile, TypeLocation*, flag, identifier?, resolveType?
size_t instructionOffset = i + opLength - 1;
unsigned divotStart, divotEnd;
GlobalVariableID globalVariableID;
RefPtr<TypeSet> globalTypeSet;
- bool shouldAnalyze = m_unlinkedCode->highFidelityTypeProfileExpressionInfoForBytecodeOffset(instructionOffset, divotStart, divotEnd);
+ bool shouldAnalyze = m_unlinkedCode->typeProfilerExpressionInfoForBytecodeOffset(instructionOffset, divotStart, divotEnd);
VirtualRegister profileRegister(pc[1].u.operand);
- ProfileTypesWithHighFidelityBytecodeFlag flag = static_cast<ProfileTypesWithHighFidelityBytecodeFlag>(pc[3].u.operand);
+ ProfileTypeBytecodeFlag flag = static_cast<ProfileTypeBytecodeFlag>(pc[3].u.operand);
SymbolTable* symbolTable = nullptr;
switch (flag) {
- case ProfileTypesBytecodePutToScope:
- case ProfileTypesBytecodeGetFromScope: {
+ case ProfileTypeBytecodePutToScope:
+ case ProfileTypeBytecodeGetFromScope: {
const Identifier& ident = identifier(pc[4].u.operand);
ResolveType type = static_cast<ResolveType>(pc[5].u.operand);
- ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, (flag == ProfileTypesBytecodeGetFromScope ? Get : Put), type);
+ ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, (flag == ProfileTypeBytecodeGetFromScope ? Get : Put), type);
// FIXME: handle other values for op.type here, and also consider what to do when we can't statically determine the globalID
// https://bugs.webkit.org/show_bug.cgi?id=135184
@@ -2020,29 +2020,29 @@
if (symbolTable) {
ConcurrentJITLocker locker(symbolTable->m_lock);
// If our parent scope was created while profiling was disabled, it will not have prepared for profiling yet.
- symbolTable->prepareForHighFidelityTypeProfiling(locker);
+ symbolTable->prepareForTypeProfiling(locker);
globalVariableID = symbolTable->uniqueIDForVariable(locker, ident.impl(), *vm());
globalTypeSet = symbolTable->globalTypeSetForVariable(locker, ident.impl(), *vm());
} else
- globalVariableID = HighFidelityNoGlobalIDExists;
+ globalVariableID = TypeProfilerNoGlobalIDExists;
break;
}
- case ProfileTypesBytecodeHasGlobalID: {
+ case ProfileTypeBytecodeHasGlobalID: {
symbolTable = m_symbolTable.get();
ConcurrentJITLocker locker(symbolTable->m_lock);
globalVariableID = symbolTable->uniqueIDForRegister(locker, profileRegister.offset(), *vm());
globalTypeSet = symbolTable->globalTypeSetForRegister(locker, profileRegister.offset(), *vm());
break;
}
- case ProfileTypesBytecodeDoesNotHaveGlobalID:
- case ProfileTypesBytecodeFunctionArgument: {
- globalVariableID = HighFidelityNoGlobalIDExists;
+ case ProfileTypeBytecodeDoesNotHaveGlobalID:
+ case ProfileTypeBytecodeFunctionArgument: {
+ globalVariableID = TypeProfilerNoGlobalIDExists;
break;
}
- case ProfileTypesBytecodeFunctionReturnStatement: {
+ case ProfileTypeBytecodeFunctionReturnStatement: {
globalTypeSet = returnStatementTypeSet();
- globalVariableID = HighFidelityReturnStatement;
+ globalVariableID = TypeProfilerReturnStatement;
if (!shouldAnalyze) {
// Because some return statements are added implicitly (to return undefined at the end of a function), and these nodes don't emit expression ranges, give them some range.
// Currently, this divot is on the open brace of the function.
@@ -2053,16 +2053,16 @@
}
}
- std::pair<TypeLocation*, bool> locationPair = vm()->highFidelityTypeProfiler()->typeLocationCache()->getTypeLocation(globalVariableID,
+ std::pair<TypeLocation*, bool> locationPair = vm()->typeProfiler()->typeLocationCache()->getTypeLocation(globalVariableID,
m_ownerExecutable->sourceID(), divotStart, divotEnd, globalTypeSet, vm());
TypeLocation* location = locationPair.first;
bool isNewLocation = locationPair.second;
- if (ProfileTypesBytecodeFunctionReturnStatement)
+ if (ProfileTypeBytecodeFunctionReturnStatement)
location->m_divotForFunctionOffsetIfReturnStatement = m_sourceOffset;
if (shouldAnalyze && isNewLocation)
- vm()->highFidelityTypeProfiler()->insertNewLocation(location);
+ vm()->typeProfiler()->insertNewLocation(location);
instructions[i + 2].u.location = location;
break;
diff --git a/Source/JavaScriptCore/bytecode/TypeLocation.h b/Source/JavaScriptCore/bytecode/TypeLocation.h
index 32eeeee..ec07656 100644
--- a/Source/JavaScriptCore/bytecode/TypeLocation.h
+++ b/Source/JavaScriptCore/bytecode/TypeLocation.h
@@ -30,10 +30,10 @@
namespace JSC {
-enum HighFidelityGlobalIDFlags {
- HighFidelityNeedsUniqueIDGeneration = -1,
- HighFidelityNoGlobalIDExists = -2,
- HighFidelityReturnStatement = -3
+enum TypeProfilerGlobalIDFlags {
+ TypeProfilerNeedsUniqueIDGeneration = -1,
+ TypeProfilerNoGlobalIDExists = -2,
+ TypeProfilerReturnStatement = -3
};
typedef intptr_t GlobalVariableID;
diff --git a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
index 5e76737..6c293cc 100644
--- a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
@@ -99,8 +99,8 @@
, m_unlinkedBodyEndColumn(m_lineCount ? node->endColumn() : node->endColumn() - node->startColumn())
, m_startOffset(node->source().startOffset() - source.startOffset())
, m_sourceLength(node->source().length())
- , m_highFidelityTypeProfilingStartOffset(node->functionNameStart())
- , m_highFidelityTypeProfilingEndOffset(node->startStartOffset() + node->source().length() - 1)
+ , m_typeProfilingStartOffset(node->functionNameStart())
+ , m_typeProfilingEndOffset(node->startStartOffset() + node->source().length() - 1)
, m_features(node->features())
, m_functionMode(node->functionMode())
{
@@ -402,11 +402,11 @@
m_expressionInfo.append(info);
}
-bool UnlinkedCodeBlock::highFidelityTypeProfileExpressionInfoForBytecodeOffset(unsigned bytecodeOffset, unsigned& startDivot, unsigned& endDivot)
+bool UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset(unsigned bytecodeOffset, unsigned& startDivot, unsigned& endDivot)
{
static const bool verbose = false;
- auto iter = m_highFidelityTypeProfileInfoMap.find(bytecodeOffset);
- if (iter == m_highFidelityTypeProfileInfoMap.end()) {
+ auto iter = m_typeProfilerInfoMap.find(bytecodeOffset);
+ if (iter == m_typeProfilerInfoMap.end()) {
if (verbose)
dataLogF("Don't have assignment info for offset:%u\n", bytecodeOffset);
startDivot = UINT_MAX;
@@ -414,18 +414,18 @@
return false;
}
- HighFidelityTypeProfileExpressionRange& range = iter->value;
+ TypeProfilerExpressionRange& range = iter->value;
startDivot = range.m_startDivot;
endDivot = range.m_endDivot;
return true;
}
-void UnlinkedCodeBlock::addHighFidelityTypeProfileExpressionInfo(unsigned instructionOffset, unsigned startDivot, unsigned endDivot)
+void UnlinkedCodeBlock::addTypeProfilerExpressionInfo(unsigned instructionOffset, unsigned startDivot, unsigned endDivot)
{
- HighFidelityTypeProfileExpressionRange range;
+ TypeProfilerExpressionRange range;
range.m_startDivot = startDivot;
range.m_endDivot = endDivot;
- m_highFidelityTypeProfileInfoMap.set(instructionOffset, range);
+ m_typeProfilerInfoMap.set(instructionOffset, range);
}
void UnlinkedProgramCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor)
diff --git a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
index 0177470..22e5080 100644
--- a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
+++ b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
@@ -125,8 +125,8 @@
unsigned unlinkedBodyEndColumn() const { return m_unlinkedBodyEndColumn; }
unsigned startOffset() const { return m_startOffset; }
unsigned sourceLength() { return m_sourceLength; }
- unsigned highFidelityTypeProfilingStartOffset() const { return m_highFidelityTypeProfilingStartOffset; }
- unsigned highFidelityTypeProfilingEndOffset() const { return m_highFidelityTypeProfilingEndOffset; }
+ unsigned typeProfilingStartOffset() const { return m_typeProfilingStartOffset; }
+ unsigned typeProfilingEndOffset() const { return m_typeProfilingEndOffset; }
String paramString() const;
@@ -187,8 +187,8 @@
unsigned m_unlinkedBodyEndColumn;
unsigned m_startOffset;
unsigned m_sourceLength;
- unsigned m_highFidelityTypeProfilingStartOffset;
- unsigned m_highFidelityTypeProfilingEndOffset;
+ unsigned m_typeProfilingStartOffset;
+ unsigned m_typeProfilingEndOffset;
CodeFeatures m_features;
@@ -276,7 +276,7 @@
void addExpressionInfo(unsigned instructionOffset, int divot,
int startOffset, int endOffset, unsigned line, unsigned column);
- void addHighFidelityTypeProfileExpressionInfo(unsigned instructionOffset, unsigned startDivot, unsigned endDivot);
+ void addTypeProfilerExpressionInfo(unsigned instructionOffset, unsigned startDivot, unsigned endDivot);
bool hasExpressionInfo() { return m_expressionInfo.size(); }
@@ -470,7 +470,7 @@
void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot,
int& startOffset, int& endOffset, unsigned& line, unsigned& column);
- bool highFidelityTypeProfileExpressionInfoForBytecodeOffset(unsigned bytecodeOffset, unsigned& startDivot, unsigned& endDivot);
+ bool typeProfilerExpressionInfoForBytecodeOffset(unsigned bytecodeOffset, unsigned& startDivot, unsigned& endDivot);
void recordParse(CodeFeatures features, bool hasCapturedVariables, unsigned firstLine, unsigned lineCount, unsigned endColumn)
{
@@ -583,11 +583,11 @@
private:
OwnPtr<RareData> m_rareData;
Vector<ExpressionRangeInfo> m_expressionInfo;
- struct HighFidelityTypeProfileExpressionRange {
+ struct TypeProfilerExpressionRange {
unsigned m_startDivot;
unsigned m_endDivot;
};
- HashMap<unsigned, HighFidelityTypeProfileExpressionRange> m_highFidelityTypeProfileInfoMap;
+ HashMap<unsigned, TypeProfilerExpressionRange> m_typeProfilerInfoMap;
protected:
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index d65a2f2..2fd5b3a 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -115,7 +115,7 @@
m_codeBlock->shrinkToFit();
- if (m_codeBlock->symbolTable() && !m_codeBlock->vm()->isProfilingTypesWithHighFidelity())
+ if (m_codeBlock->symbolTable() && !m_codeBlock->vm()->typeProfiler())
m_codeBlock->setSymbolTable(m_codeBlock->symbolTable()->cloneCapturedNames(*m_codeBlock->vm()));
if (m_expressionTooDeep)
@@ -339,7 +339,7 @@
m_symbolTable->setCaptureEnd(virtualRegisterForLocal(codeBlock->m_numVars).offset());
- bool canLazilyCreateFunctions = !functionBody->needsActivationForMoreThanVariables() && !m_shouldEmitDebugHooks && !isProfilingTypesWithHighFidelity();
+ bool canLazilyCreateFunctions = !functionBody->needsActivationForMoreThanVariables() && !m_shouldEmitDebugHooks && !m_vm->typeProfiler();
m_firstLazyFunction = codeBlock->m_numVars;
for (size_t i = 0; i < functionStack.size(); ++i) {
FunctionBodyNode* function = functionStack[i];
@@ -1006,8 +1006,8 @@
if (captureMode == IsCaptured)
instructions().append(watchableVariable(dst->index()));
- if (!dst->isTemporary() && isProfilingTypesWithHighFidelity())
- emitProfileTypesWithHighFidelity(dst, ProfileTypesBytecodeHasGlobalID, nullptr);
+ if (!dst->isTemporary() && vm()->typeProfiler())
+ emitProfileType(dst, ProfileTypeBytecodeHasGlobalID, nullptr);
return dst;
}
@@ -1118,21 +1118,21 @@
return dst;
}
-void BytecodeGenerator::emitHighFidelityTypeProfilingExpressionInfo(const JSTextPosition& startDivot, const JSTextPosition& endDivot)
+void BytecodeGenerator::emitTypeProfilerExpressionInfo(const JSTextPosition& startDivot, const JSTextPosition& endDivot)
{
unsigned start = startDivot.offset; // Ranges are inclusive of their endpoints, AND 0 indexed.
unsigned end = endDivot.offset - 1; // End Ranges already go one past the inclusive range, so subtract 1.
unsigned instructionOffset = instructions().size() - 1;
- m_codeBlock->addHighFidelityTypeProfileExpressionInfo(instructionOffset, start, end);
+ m_codeBlock->addTypeProfilerExpressionInfo(instructionOffset, start, end);
}
-void BytecodeGenerator::emitProfileTypesWithHighFidelity(RegisterID* registerToProfile, ProfileTypesWithHighFidelityBytecodeFlag flag, const Identifier* identifier)
+void BytecodeGenerator::emitProfileType(RegisterID* registerToProfile, ProfileTypeBytecodeFlag flag, const Identifier* identifier)
{
- if (flag == ProfileTypesBytecodeGetFromScope || flag == ProfileTypesBytecodePutToScope)
+ if (flag == ProfileTypeBytecodeGetFromScope || flag == ProfileTypeBytecodePutToScope)
RELEASE_ASSERT(identifier);
- // The format of this instruction is: op_profile_types_with_high_fidelity regToProfile, TypeLocation*, flag, identifier?, resolveType?
- emitOpcode(op_profile_types_with_high_fidelity);
+ // The format of this instruction is: op_profile_type regToProfile, TypeLocation*, flag, identifier?, resolveType?
+ emitOpcode(op_profile_type);
instructions().append(registerToProfile->index());
instructions().append(0);
instructions().append(flag);
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index 3eba8ae..79abbf2 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -220,13 +220,13 @@
TryData* tryData;
};
- enum ProfileTypesWithHighFidelityBytecodeFlag {
- ProfileTypesBytecodePutToScope,
- ProfileTypesBytecodeGetFromScope,
- ProfileTypesBytecodeHasGlobalID,
- ProfileTypesBytecodeDoesNotHaveGlobalID,
- ProfileTypesBytecodeFunctionArgument,
- ProfileTypesBytecodeFunctionReturnStatement
+ enum ProfileTypeBytecodeFlag {
+ ProfileTypeBytecodePutToScope,
+ ProfileTypeBytecodeGetFromScope,
+ ProfileTypeBytecodeHasGlobalID,
+ ProfileTypeBytecodeDoesNotHaveGlobalID,
+ ProfileTypeBytecodeFunctionArgument,
+ ProfileTypeBytecodeFunctionReturnStatement
};
class BytecodeGenerator {
@@ -407,8 +407,8 @@
return emitNode(n);
}
- void emitHighFidelityTypeProfilingExpressionInfo(const JSTextPosition& startDivot, const JSTextPosition& endDivot);
- void emitProfileTypesWithHighFidelity(RegisterID* registerToProfile, ProfileTypesWithHighFidelityBytecodeFlag, const Identifier*);
+ void emitTypeProfilerExpressionInfo(const JSTextPosition& startDivot, const JSTextPosition& endDivot);
+ void emitProfileType(RegisterID* registerToProfile, ProfileTypeBytecodeFlag, const Identifier*);
RegisterID* emitLoad(RegisterID* dst, bool);
RegisterID* emitLoad(RegisterID* dst, double);
@@ -755,8 +755,6 @@
VM* m_vm;
- bool isProfilingTypesWithHighFidelity() { return vm()->isProfilingTypesWithHighFidelity(); }
-
OpcodeID m_lastOpcodeID;
#ifndef NDEBUG
size_t m_lastOpcodePosition;
diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index 573dbec..01d1286 100644
--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -139,10 +139,10 @@
return 0;
RegisterID* result = generator.moveToDestinationIfNeeded(dst, generator.thisRegister());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(generator.thisRegister(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(generator.thisRegister(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
static const unsigned thisLength = 4;
- generator.emitHighFidelityTypeProfilingExpressionInfo(position(), JSTextPosition(-1, position().offset + thisLength, -1));
+ generator.emitTypeProfilerExpressionInfo(position(), JSTextPosition(-1, position().offset + thisLength, -1));
}
return result;
}
@@ -159,9 +159,9 @@
if (Local local = generator.local(m_ident)) {
if (dst == generator.ignoredResult())
return 0;
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(local.get(), ProfileTypesBytecodeHasGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(m_position, JSTextPosition(-1, m_position.offset + m_ident.length(), -1));
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(local.get(), ProfileTypeBytecodeHasGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(m_position, JSTextPosition(-1, m_position.offset + m_ident.length(), -1));
}
return generator.moveToDestinationIfNeeded(dst, local.get());
}
@@ -171,9 +171,9 @@
RefPtr<RegisterID> scope = generator.emitResolveScope(generator.tempDestination(dst), m_ident);
RegisterID* finalDest = generator.finalDestination(dst);
RegisterID* result = generator.emitGetFromScope(finalDest, scope.get(), m_ident, ThrowIfNotFound);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(finalDest, ProfileTypesBytecodeGetFromScope, &m_ident);
- generator.emitHighFidelityTypeProfilingExpressionInfo(m_position, JSTextPosition(-1, m_position.offset + m_ident.length(), -1));
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(finalDest, ProfileTypeBytecodeGetFromScope, &m_ident);
+ generator.emitTypeProfilerExpressionInfo(m_position, JSTextPosition(-1, m_position.offset + m_ident.length(), -1));
}
return result;
}
@@ -393,9 +393,9 @@
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
RegisterID* finalDest = generator.finalDestination(dst);
RegisterID* ret = generator.emitGetByVal(finalDest, base.get(), property);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(finalDest, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(finalDest, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -419,9 +419,9 @@
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
RegisterID* finalDest = generator.finalDestination(dst);
RegisterID* ret = generator.emitGetById(finalDest, base, m_ident);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(finalDest, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(finalDest, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -503,9 +503,9 @@
CallArguments callArguments(generator, m_args);
generator.emitLoad(callArguments.thisRegister(), jsUndefined());
RegisterID* ret = generator.emitCall(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -524,9 +524,9 @@
// This passes NoExpectedFunction because we expect that if the function is in a
// local variable, then it's not one of our built-in constructors.
RegisterID* ret = generator.emitCall(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -540,9 +540,9 @@
generator.emitResolveScope(callArguments.thisRegister(), m_ident);
generator.emitGetFromScope(func.get(), callArguments.thisRegister(), m_ident, ThrowIfNotFound);
RegisterID* ret = generator.emitCall(returnValue.get(), func.get(), expectedFunction, callArguments, divot(), divotStart(), divotEnd());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -559,9 +559,9 @@
CallArguments callArguments(generator, m_args);
generator.emitMove(callArguments.thisRegister(), base.get());
RegisterID* ret = generator.emitCall(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -577,9 +577,9 @@
generator.emitExpressionInfo(subexpressionDivot(), subexpressionStart(), subexpressionEnd());
generator.emitGetById(function.get(), callArguments.thisRegister(), m_ident);
RegisterID* ret = generator.emitCall(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -651,9 +651,9 @@
}
generator.emitLabel(end.get());
}
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return returnValue.get();
}
@@ -765,9 +765,9 @@
generator.emitCall(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
generator.emitLabel(end.get());
}
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnValue.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnValue.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return returnValue.get();
}
@@ -802,7 +802,7 @@
if (local.isReadOnly()) {
generator.emitReadOnlyExceptionIfNeeded();
localReg = generator.emitMove(generator.tempDestination(dst), localReg);
- } else if (local.isCaptured() || generator.isProfilingTypesWithHighFidelity()) {
+ } else if (local.isCaptured() || generator.vm()->typeProfiler()) {
RefPtr<RegisterID> tempDst = generator.finalDestination(dst);
ASSERT(dst != localReg);
RefPtr<RegisterID> tempDstSrc = generator.newTemporary();
@@ -810,8 +810,8 @@
generator.emitMove(tempDstSrc.get(), localReg);
emitIncOrDec(generator, tempDstSrc.get(), m_operator);
generator.emitMove(localReg, tempDstSrc.get());
- if (generator.isProfilingTypesWithHighFidelity())
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler())
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
return tempDst.get();
}
return emitPostIncOrDec(generator, generator.finalDestination(dst), localReg, m_operator);
@@ -822,9 +822,9 @@
RefPtr<RegisterID> value = generator.emitGetFromScope(generator.newTemporary(), scope.get(), ident, ThrowIfNotFound);
RefPtr<RegisterID> oldValue = emitPostIncOrDec(generator, generator.finalDestination(dst), value.get(), m_operator);
generator.emitPutToScope(scope.get(), ident, value.get(), ThrowIfNotFound);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(value.get(), ProfileTypesBytecodePutToScope, &ident);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(value.get(), ProfileTypeBytecodePutToScope, &ident);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return oldValue.get();
@@ -848,9 +848,9 @@
RegisterID* oldValue = emitPostIncOrDec(generator, generator.tempDestination(dst), value.get(), m_operator);
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
generator.emitPutByVal(base.get(), property.get(), value.get());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(value.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(value.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, oldValue);
}
@@ -872,9 +872,9 @@
RegisterID* oldValue = emitPostIncOrDec(generator, generator.tempDestination(dst), value.get(), m_operator);
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
generator.emitPutById(base.get(), ident, value.get());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(value.get(), ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(value.get(), ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, oldValue);
}
@@ -992,13 +992,13 @@
if (local.isReadOnly()) {
generator.emitReadOnlyExceptionIfNeeded();
localReg = generator.emitMove(generator.tempDestination(dst), localReg);
- } else if (local.isCaptured() || generator.isProfilingTypesWithHighFidelity()) {
+ } else if (local.isCaptured() || generator.vm()->typeProfiler()) {
RefPtr<RegisterID> tempDst = generator.tempDestination(dst);
generator.emitMove(tempDst.get(), localReg);
emitIncOrDec(generator, tempDst.get(), m_operator);
generator.emitMove(localReg, tempDst.get());
- if (generator.isProfilingTypesWithHighFidelity())
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler())
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
return generator.moveToDestinationIfNeeded(dst, tempDst.get());
}
emitIncOrDec(generator, localReg, m_operator);
@@ -1010,9 +1010,9 @@
RefPtr<RegisterID> value = generator.emitGetFromScope(generator.newTemporary(), scope.get(), ident, ThrowIfNotFound);
emitIncOrDec(generator, value.get(), m_operator);
generator.emitPutToScope(scope.get(), ident, value.get(), ThrowIfNotFound);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(value.get(), ProfileTypesBytecodePutToScope, &ident);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(value.get(), ProfileTypeBytecodePutToScope, &ident);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, value.get());
}
@@ -1033,9 +1033,9 @@
emitIncOrDec(generator, value, m_operator);
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
generator.emitPutByVal(base.get(), property.get(), value);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(value, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(value, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, propDst.get());
}
@@ -1055,9 +1055,9 @@
emitIncOrDec(generator, value, m_operator);
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
generator.emitPutById(base.get(), ident, value);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(value, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(value, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, propDst.get());
}
@@ -1506,15 +1506,15 @@
}
if (local.isCaptured()
- || generator.isProfilingTypesWithHighFidelity()
+ || generator.vm()->typeProfiler()
|| generator.leftHandSideNeedsCopy(m_rightHasAssignments, m_right->isPure(generator))) {
RefPtr<RegisterID> result = generator.newTemporary();
generator.emitMove(result.get(), local.get());
emitReadModifyAssignment(generator, result.get(), result.get(), m_right, m_operator, OperandTypes(ResultType::unknownType(), m_right->resultDescriptor()));
generator.emitMove(local.get(), result.get());
generator.invalidateForInContextForLocal(local.get());
- if (generator.isProfilingTypesWithHighFidelity())
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler())
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
return generator.moveToDestinationIfNeeded(dst, result.get());
}
@@ -1528,9 +1528,9 @@
RefPtr<RegisterID> value = generator.emitGetFromScope(generator.newTemporary(), scope.get(), m_ident, ThrowIfNotFound);
RefPtr<RegisterID> result = emitReadModifyAssignment(generator, generator.finalDestination(dst, value.get()), value.get(), m_right, m_operator, OperandTypes(ResultType::unknownType(), m_right->resultDescriptor()), this);
RegisterID* returnResult = generator.emitPutToScope(scope.get(), m_ident, result.get(), ThrowIfNotFound);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(result.get(), ProfileTypesBytecodePutToScope, &m_ident);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(result.get(), ProfileTypeBytecodePutToScope, &m_ident);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return returnResult;
}
@@ -1544,13 +1544,13 @@
generator.emitReadOnlyExceptionIfNeeded();
return generator.emitNode(dst, m_right);
}
- if (local.isCaptured() || generator.isProfilingTypesWithHighFidelity()) {
+ if (local.isCaptured() || generator.vm()->typeProfiler()) {
RefPtr<RegisterID> tempDst = generator.tempDestination(dst);
generator.emitNode(tempDst.get(), m_right);
generator.emitMove(local.get(), tempDst.get());
generator.invalidateForInContextForLocal(local.get());
- if (generator.isProfilingTypesWithHighFidelity())
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler())
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
return generator.moveToDestinationIfNeeded(dst, tempDst.get());
}
RegisterID* result = generator.emitNode(local.get(), m_right);
@@ -1566,9 +1566,9 @@
RefPtr<RegisterID> result = generator.emitNode(dst, m_right);
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
RegisterID* returnResult = generator.emitPutToScope(scope.get(), m_ident, result.get(), generator.isStrictMode() ? ThrowIfNotFound : DoNotThrowIfNotFound);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(result.get(), ProfileTypesBytecodePutToScope, &m_ident);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(result.get(), ProfileTypeBytecodePutToScope, &m_ident);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return returnResult;
}
@@ -1583,9 +1583,9 @@
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
RegisterID* forwardResult = (dst == generator.ignoredResult()) ? result : generator.moveToDestinationIfNeeded(generator.tempDestination(result), result);
generator.emitPutById(base.get(), m_ident, forwardResult);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(forwardResult, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(forwardResult, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, forwardResult);
}
@@ -1602,9 +1602,9 @@
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
RegisterID* ret = generator.emitPutById(base.get(), m_ident, updatedValue);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(updatedValue, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(updatedValue, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return ret;
}
@@ -1628,9 +1628,9 @@
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
RegisterID* forwardResult = (dst == generator.ignoredResult()) ? result : generator.moveToDestinationIfNeeded(generator.tempDestination(result), result);
generator.emitPutByVal(base.get(), property.get(), forwardResult);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(forwardResult, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(forwardResult, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return generator.moveToDestinationIfNeeded(dst, forwardResult);
}
@@ -1648,9 +1648,9 @@
generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
generator.emitPutByVal(base.get(), property.get(), updatedValue);
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(updatedValue, ProfileTypesBytecodeDoesNotHaveGlobalID, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(updatedValue, ProfileTypeBytecodeDoesNotHaveGlobalID, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
return updatedValue;
@@ -1676,7 +1676,7 @@
return local.get();
// FIXME: Maybe call emitExpressionInfo here.
- if (local.isCaptured() || generator.isProfilingTypesWithHighFidelity()) {
+ if (local.isCaptured() || generator.vm()->typeProfiler()) {
RefPtr<RegisterID> tempDst = generator.newTemporary();
generator.emitNode(tempDst.get(), m_init);
return generator.emitMove(local.get(), tempDst.get());
@@ -1786,18 +1786,18 @@
RegisterID* EmptyVarExpression::emitBytecode(BytecodeGenerator& generator, RegisterID*)
{
- if (!generator.isProfilingTypesWithHighFidelity())
+ if (!generator.vm()->typeProfiler())
return nullptr;
if (Local local = generator.local(m_ident))
- generator.emitProfileTypesWithHighFidelity(local.get(), ProfileTypesBytecodeHasGlobalID, nullptr);
+ generator.emitProfileType(local.get(), ProfileTypeBytecodeHasGlobalID, nullptr);
else {
RefPtr<RegisterID> scope = generator.emitResolveScope(generator.newTemporary(), m_ident);
RefPtr<RegisterID> value = generator.emitGetFromScope(generator.newTemporary(), scope.get(), m_ident, DoNotThrowIfNotFound);
- generator.emitProfileTypesWithHighFidelity(value.get(), ProfileTypesBytecodeGetFromScope, &m_ident);
+ generator.emitProfileType(value.get(), ProfileTypeBytecodeGetFromScope, &m_ident);
}
- generator.emitHighFidelityTypeProfilingExpressionInfo(position(), JSTextPosition(-1, position().offset + m_ident.length(), -1));
+ generator.emitTypeProfilerExpressionInfo(position(), JSTextPosition(-1, position().offset + m_ident.length(), -1));
// It's safe to return null here because this node will always be a child node of VarStatementNode which ignores our return value.
return nullptr;
@@ -2276,9 +2276,9 @@
dst = 0;
RefPtr<RegisterID> returnRegister = m_value ? generator.emitNode(dst, m_value) : generator.emitLoad(dst, jsUndefined());
- if (generator.isProfilingTypesWithHighFidelity()) {
- generator.emitProfileTypesWithHighFidelity(returnRegister.get(), ProfileTypesBytecodeFunctionReturnStatement, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(divotStart(), divotEnd());
+ if (generator.vm()->typeProfiler()) {
+ generator.emitProfileType(returnRegister.get(), ProfileTypeBytecodeFunctionReturnStatement, nullptr);
+ generator.emitTypeProfilerExpressionInfo(divotStart(), divotEnd());
}
if (generator.scopeDepth()) {
returnRegister = generator.emitMove(generator.newTemporary(), returnRegister.get());
@@ -2607,15 +2607,15 @@
void FunctionBodyNode::emitBytecode(BytecodeGenerator& generator, RegisterID*)
{
- if (generator.isProfilingTypesWithHighFidelity()) {
+ if (generator.vm()->typeProfiler()) {
for (size_t i = 0; i < m_parameters->size(); i++) {
// FIXME: Handle Destructuring assignments into arguments.
if (!m_parameters->at(i)->isBindingNode())
continue;
BindingNode* parameter = static_cast<BindingNode*>(m_parameters->at(i));
RegisterID reg(CallFrame::argumentOffset(i));
- generator.emitProfileTypesWithHighFidelity(®, ProfileTypesBytecodeFunctionArgument, nullptr);
- generator.emitHighFidelityTypeProfilingExpressionInfo(parameter->divotStart(), parameter->divotEnd());
+ generator.emitProfileType(®, ProfileTypeBytecodeFunctionArgument, nullptr);
+ generator.emitTypeProfilerExpressionInfo(parameter->divotStart(), parameter->divotEnd());
}
}
@@ -2635,8 +2635,8 @@
// If there is no return we must automatically insert one.
if (!returnNode) {
RegisterID* r0 = generator.isConstructor() ? generator.thisRegister() : generator.emitLoad(0, jsUndefined());
- if (generator.isProfilingTypesWithHighFidelity())
- generator.emitProfileTypesWithHighFidelity(r0, ProfileTypesBytecodeFunctionReturnStatement, nullptr); // Do not emit expression info for this profile because it's not in the user's source code.
+ if (generator.vm()->typeProfiler())
+ generator.emitProfileType(r0, ProfileTypeBytecodeFunctionReturnStatement, nullptr); // Do not emit expression info for this profile because it's not in the user's source code.
ASSERT(startOffset() >= lineStartOffset());
generator.emitDebugHook(WillLeaveCallFrame, lastLine(), startOffset(), lineStartOffset());
generator.emitReturn(r0);
diff --git a/Source/JavaScriptCore/heap/Heap.cpp b/Source/JavaScriptCore/heap/Heap.cpp
index 62fab26..b35f39f 100644
--- a/Source/JavaScriptCore/heap/Heap.cpp
+++ b/Source/JavaScriptCore/heap/Heap.cpp
@@ -35,7 +35,6 @@
#include "HeapIterationScope.h"
#include "HeapRootVisitor.h"
#include "HeapStatistics.h"
-#include "HighFidelityLog.h"
#include "IncrementalSweeper.h"
#include "Interpreter.h"
#include "JSGlobalObject.h"
@@ -45,6 +44,7 @@
#include "JSVirtualMachineInternal.h"
#include "RecursiveAllocationScope.h"
#include "Tracing.h"
+#include "TypeProfilerLog.h"
#include "UnlinkedCodeBlock.h"
#include "VM.h"
#include "WeakSetInlines.h"
@@ -979,9 +979,9 @@
SamplingRegion samplingRegion("Garbage Collection");
- if (vm()->isProfilingTypesWithHighFidelity()) {
+ if (vm()->typeProfiler()) {
DeferGCForAWhile awhile(*this);
- vm()->highFidelityLog()->processHighFidelityLog("GC");
+ vm()->typeProfilerLog()->processLogEntries(ASCIILiteral("GC"));
}
RELEASE_ASSERT(!m_deferralDepth);
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
index 200750b..97d449b 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
@@ -36,8 +36,6 @@
#include "Completion.h"
#include "HeapIterationScope.h"
-#include "HighFidelityLog.h"
-#include "HighFidelityTypeProfiler.h"
#include "InjectedScript.h"
#include "InjectedScriptManager.h"
#include "InspectorValues.h"
@@ -45,6 +43,8 @@
#include "ParserError.h"
#include "ScriptDebugServer.h"
#include "SourceCode.h"
+#include "TypeProfiler.h"
+#include "TypeProfilerLog.h"
#include "VMEntryScope.h"
#include <wtf/PassRefPtr.h>
#include <wtf/CurrentTime.h>
@@ -202,13 +202,13 @@
static const bool verbose = false;
VM& vm = globalVM();
typeDescriptions = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::TypeDescription>::create();
- if (!vm.isProfilingTypesWithHighFidelity()) {
+ if (!vm.typeProfiler()) {
*errorString = ASCIILiteral("The VM does not currently have Type Information.");
return;
}
double start = currentTimeMS();
- vm.highFidelityLog()->processHighFidelityLog("User Query");
+ vm.typeProfilerLog()->processLogEntries(ASCIILiteral("User Query"));
for (size_t i = 0; i < locations->length(); i++) {
RefPtr<Inspector::InspectorValue> value = locations->get(i);
@@ -227,7 +227,7 @@
RefPtr<Inspector::TypeBuilder::Runtime::TypeDescription> typeDescription = Inspector::TypeBuilder::Runtime::TypeDescription::create();
bool okay;
- vm.highFidelityTypeProfiler()->getTypesForVariableAtOffsetForInspector(static_cast<TypeProfilerSearchDescriptor>(descriptor), divot, sourceIDAsString.toIntPtrStrict(&okay), typeDescription);
+ vm.typeProfiler()->getTypesForVariableAtOffsetForInspector(static_cast<TypeProfilerSearchDescriptor>(descriptor), divot, sourceIDAsString.toIntPtrStrict(&okay), typeDescription);
typeDescriptions->addItem(typeDescription);
}
@@ -253,7 +253,7 @@
{
vm.waitForCompilationsToComplete();
- bool needsToRecompile = (shouldEnableTypeProfiling ? vm.enableHighFidelityTypeProfiling() : vm.disableHighFidelityTypeProfiling());
+ bool needsToRecompile = (shouldEnableTypeProfiling ? vm.enableTypeProfiler() : vm.disableTypeProfiler());
if (needsToRecompile) {
TypeRecompiler recompiler;
HeapIterationScope iterationScope(vm.heap);
@@ -264,20 +264,20 @@
void InspectorRuntimeAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason reason)
{
if (reason != InspectorDisconnectReason::InspectedTargetDestroyed && m_isTypeProfilingEnabled)
- setHighFidelityTypeProfilingEnabledState(false);
+ setTypeProfilerEnabledState(false);
}
-void InspectorRuntimeAgent::enableHighFidelityTypeProfiling(ErrorString*)
+void InspectorRuntimeAgent::enableTypeProfiler(ErrorString*)
{
- setHighFidelityTypeProfilingEnabledState(true);
+ setTypeProfilerEnabledState(true);
}
-void InspectorRuntimeAgent::disableHighFidelityTypeProfiling(ErrorString*)
+void InspectorRuntimeAgent::disableTypeProfiler(ErrorString*)
{
- setHighFidelityTypeProfilingEnabledState(false);
+ setTypeProfilerEnabledState(false);
}
-void InspectorRuntimeAgent::setHighFidelityTypeProfilingEnabledState(bool shouldEnableTypeProfiling)
+void InspectorRuntimeAgent::setTypeProfilerEnabledState(bool shouldEnableTypeProfiling)
{
if (m_isTypeProfilingEnabled == shouldEnableTypeProfiling)
return;
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
index 4aafca6..4f49748 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
@@ -69,8 +69,8 @@
virtual void releaseObjectGroup(ErrorString*, const String& objectGroup) override final;
virtual void run(ErrorString*) override;
virtual void getRuntimeTypesForVariablesAtOffsets(ErrorString*, const RefPtr<Inspector::InspectorArray>& locations, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::TypeDescription>>&) override;
- virtual void enableHighFidelityTypeProfiling(ErrorString*) override;
- virtual void disableHighFidelityTypeProfiling(ErrorString*) override;
+ virtual void enableTypeProfiler(ErrorString*) override;
+ virtual void disableTypeProfiler(ErrorString*) override;
void setScriptDebugServer(ScriptDebugServer* scriptDebugServer) { m_scriptDebugServer = scriptDebugServer; }
@@ -88,7 +88,7 @@
virtual void unmuteConsole() = 0;
private:
- void setHighFidelityTypeProfilingEnabledState(bool);
+ void setTypeProfilerEnabledState(bool);
InjectedScriptManager* m_injectedScriptManager;
ScriptDebugServer* m_scriptDebugServer;
diff --git a/Source/JavaScriptCore/inspector/protocol/Runtime.json b/Source/JavaScriptCore/inspector/protocol/Runtime.json
index 89c9249..9380d0c 100644
--- a/Source/JavaScriptCore/inspector/protocol/Runtime.json
+++ b/Source/JavaScriptCore/inspector/protocol/Runtime.json
@@ -241,12 +241,12 @@
"description": "Returns detailed informtation on given function."
},
{
- "name": "enableHighFidelityTypeProfiling",
- "description": "Enables high fidelity type profiling on the VM."
+ "name": "enableTypeProfiler",
+ "description": "Enables type profiling on the VM."
},
{
- "name": "disableHighFidelityTypeProfiling",
- "description": "Disables high fidelity type profiling on the VM."
+ "name": "disableTypeProfiler",
+ "description": "Disables type profiling on the VM."
}
],
"events": [
diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp
index c3d6abd..6e61a19 100644
--- a/Source/JavaScriptCore/jit/JIT.cpp
+++ b/Source/JavaScriptCore/jit/JIT.cpp
@@ -38,7 +38,6 @@
#include "ArityCheckFailReturnThunks.h"
#include "CodeBlock.h"
#include "DFGCapabilities.h"
-#include "HighFidelityLog.h"
#include "Interpreter.h"
#include "JITInlines.h"
#include "JITOperations.h"
@@ -53,6 +52,7 @@
#include "SamplingTool.h"
#include "SlowPathCall.h"
#include "StackAlignment.h"
+#include "TypeProfilerLog.h"
#include <wtf/CryptographicallyRandomNumber.h>
using namespace std;
@@ -268,7 +268,7 @@
DEFINE_OP(op_inc)
DEFINE_OP(op_profile_did_call)
DEFINE_OP(op_profile_will_call)
- DEFINE_OP(op_profile_types_with_high_fidelity)
+ DEFINE_OP(op_profile_type)
DEFINE_OP(op_push_name_scope)
DEFINE_OP(op_push_with_scope)
case op_put_by_id_out_of_line:
@@ -501,9 +501,9 @@
break;
}
- // This ensures that we have the most up to date type information when performing typecheck optimizations for op_profile_types_with_high_fidelity.
- if (m_vm->isProfilingTypesWithHighFidelity())
- m_vm->highFidelityLog()->processHighFidelityLog(ASCIILiteral("Preparing for JIT compilation."));
+ // This ensures that we have the most up to date type information when performing typecheck optimizations for op_profile_type.
+ if (m_vm->typeProfiler())
+ m_vm->typeProfilerLog()->processLogEntries(ASCIILiteral("Preparing for JIT compilation."));
if (Options::showDisassembly() || m_vm->m_perBytecodeProfiler)
m_disassembler = adoptPtr(new JITDisassembler(m_codeBlock));
diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h
index b3e528d..627a7e1 100644
--- a/Source/JavaScriptCore/jit/JIT.h
+++ b/Source/JavaScriptCore/jit/JIT.h
@@ -527,7 +527,7 @@
void emit_op_inc(Instruction*);
void emit_op_profile_did_call(Instruction*);
void emit_op_profile_will_call(Instruction*);
- void emit_op_profile_types_with_high_fidelity(Instruction*);
+ void emit_op_profile_type(Instruction*);
void emit_op_push_name_scope(Instruction*);
void emit_op_push_with_scope(Instruction*);
void emit_op_put_by_id(Instruction*);
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp
index ecff98f..a446aa0 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp
@@ -32,7 +32,6 @@
#include "CopiedSpaceInlines.h"
#include "Debugger.h"
#include "Heap.h"
-#include "HighFidelityLog.h"
#include "JITInlines.h"
#include "JSArray.h"
#include "JSCell.h"
@@ -43,6 +42,7 @@
#include "RepatchBuffer.h"
#include "SlowPathCall.h"
#include "TypeLocation.h"
+#include "TypeProfilerLog.h"
#include "VirtualRegister.h"
namespace JSC {
@@ -1339,7 +1339,7 @@
slowPathCall.call();
}
-void JIT::emit_op_profile_types_with_high_fidelity(Instruction* currentInstruction)
+void JIT::emit_op_profile_type(Instruction* currentInstruction)
{
TypeLocation* cachedTypeLocation = currentInstruction[2].u.location;
int valueToProfile = currentInstruction[1].u.operand;
@@ -1369,31 +1369,31 @@
}
// Load the type profiling log into T2.
- HighFidelityLog* cachedHighFidelityLog = m_vm->highFidelityLog();
- move(TrustedImmPtr(cachedHighFidelityLog), regT2);
+ TypeProfilerLog* cachedTypeProfilerLog = m_vm->typeProfilerLog();
+ move(TrustedImmPtr(cachedTypeProfilerLog), regT2);
// Load the next log entry into T1.
- loadPtr(Address(regT2, HighFidelityLog::currentLogEntryOffset()), regT1);
+ loadPtr(Address(regT2, TypeProfilerLog::currentLogEntryOffset()), regT1);
// Store the JSValue onto the log entry.
- store64(regT0, Address(regT1, HighFidelityLog::LogEntry::valueOffset()));
+ store64(regT0, Address(regT1, TypeProfilerLog::LogEntry::valueOffset()));
// Store the structureID of the cell if T0 is a cell, otherwise, store 0 on the log entry.
Jump notCell = emitJumpIfNotJSCell(regT0);
load32(Address(regT0, JSCell::structureIDOffset()), regT0);
- store32(regT0, Address(regT1, HighFidelityLog::LogEntry::structureIDOffset()));
+ store32(regT0, Address(regT1, TypeProfilerLog::LogEntry::structureIDOffset()));
Jump skipIsCell = jump();
notCell.link(this);
- store32(TrustedImm32(0), Address(regT1, HighFidelityLog::LogEntry::structureIDOffset()));
+ store32(TrustedImm32(0), Address(regT1, TypeProfilerLog::LogEntry::structureIDOffset()));
skipIsCell.link(this);
// Store the typeLocation on the log entry.
move(TrustedImmPtr(cachedTypeLocation), regT0);
- store64(regT0, Address(regT1, HighFidelityLog::LogEntry::locationOffset()));
+ store64(regT0, Address(regT1, TypeProfilerLog::LogEntry::locationOffset()));
// Increment the current log entry.
- addPtr(TrustedImm32(sizeof(HighFidelityLog::LogEntry)), regT1);
- store64(regT1, Address(regT2, HighFidelityLog::currentLogEntryOffset()));
- Jump skipClearLog = branchPtr(NotEqual, regT1, TrustedImmPtr(cachedHighFidelityLog->logEndPtr()));
+ addPtr(TrustedImm32(sizeof(TypeProfilerLog::LogEntry)), regT1);
+ store64(regT1, Address(regT2, TypeProfilerLog::currentLogEntryOffset()));
+ Jump skipClearLog = branchPtr(NotEqual, regT1, TrustedImmPtr(cachedTypeProfilerLog->logEndPtr()));
// Clear the log if we're at the end of the log.
callOperation(operationProcessTypeProfilerLog);
skipClearLog.link(this);
diff --git a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
index 4eaad06..c5aecbf 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
@@ -1306,9 +1306,9 @@
slowPathCall.call();
}
-void JIT::emit_op_profile_types_with_high_fidelity(Instruction* currentInstruction)
+void JIT::emit_op_profile_type(Instruction* currentInstruction)
{
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_profile_types_with_high_fidelity);
+ JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_profile_type);
slowPathCall.call();
}
diff --git a/Source/JavaScriptCore/jit/JITOperations.cpp b/Source/JavaScriptCore/jit/JITOperations.cpp
index c3a7525..7189c7e 100644
--- a/Source/JavaScriptCore/jit/JITOperations.cpp
+++ b/Source/JavaScriptCore/jit/JITOperations.cpp
@@ -40,7 +40,6 @@
#include "ErrorHandlingScope.h"
#include "ExceptionFuzz.h"
#include "GetterSetter.h"
-#include "HighFidelityLog.h"
#include "HostCallReturnValue.h"
#include "JIT.h"
#include "JITToDFGDeferredCompilationCallback.h"
@@ -54,6 +53,7 @@
#include "Repatch.h"
#include "RepatchBuffer.h"
#include "TestRunnerUtils.h"
+#include "TypeProfilerLog.h"
#include <wtf/InlineASM.h>
namespace JSC {
@@ -1929,7 +1929,7 @@
void JIT_OPERATION operationProcessTypeProfilerLog(ExecState* exec)
{
- exec->vm().highFidelityLog()->processHighFidelityLog(ASCIILiteral("Log Full, called from inside baseline JIT"));
+ exec->vm().typeProfilerLog()->processLogEntries(ASCIILiteral("Log Full, called from inside baseline JIT"));
}
} // extern "C"
diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp
index f2a2f86..d0a5d38 100644
--- a/Source/JavaScriptCore/jsc.cpp
+++ b/Source/JavaScriptCore/jsc.cpp
@@ -1061,7 +1061,7 @@
EncodedJSValue JSC_HOST_CALL functionDumpTypesForAllVariables(ExecState* exec)
{
- exec->vm().dumpHighFidelityProfilingTypes();
+ exec->vm().dumpTypeProfilerData();
return JSValue::encode(jsUndefined());
}
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
index c091179..21241f5 100644
--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
@@ -34,7 +34,6 @@
#include "ExceptionFuzz.h"
#include "GetterSetter.h"
#include "HostCallReturnValue.h"
-#include "HighFidelityLog.h"
#include "Interpreter.h"
#include "JIT.h"
#include "JITExceptions.h"
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
index 3a945b7..086433b 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
@@ -1352,6 +1352,6 @@
_llint_op_init_global_const_nop:
dispatch(5)
-_llint_op_profile_types_with_high_fidelity:
- callSlowPath(_slow_path_profile_types_with_high_fidelity)
+_llint_op_profile_type:
+ callSlowPath(_slow_path_profile_type)
dispatch(6)
diff --git a/Source/JavaScriptCore/runtime/CodeCache.cpp b/Source/JavaScriptCore/runtime/CodeCache.cpp
index 0589357..f37f6fe 100644
--- a/Source/JavaScriptCore/runtime/CodeCache.cpp
+++ b/Source/JavaScriptCore/runtime/CodeCache.cpp
@@ -79,7 +79,7 @@
{
SourceCodeKey key = SourceCodeKey(source, String(), CacheTypes<UnlinkedCodeBlockType>::codeType, strictness);
CodeCacheMap::AddResult addResult = m_sourceCode.add(key, SourceCodeValue());
- bool canCache = debuggerMode == DebuggerOff && profilerMode == ProfilerOff && !vm.isProfilingTypesWithHighFidelity();
+ bool canCache = debuggerMode == DebuggerOff && profilerMode == ProfilerOff && !vm.typeProfiler();
if (!addResult.isNewEntry && canCache) {
UnlinkedCodeBlockType* unlinkedCodeBlock = jsCast<UnlinkedCodeBlockType*>(addResult.iterator->value.cell.get());
unsigned firstLine = source.firstLine() + unlinkedCodeBlock->firstLine();
diff --git a/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp b/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
index 28e096d..beb341b 100644
--- a/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
+++ b/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
@@ -34,7 +34,6 @@
#include "ErrorHandlingScope.h"
#include "ExceptionFuzz.h"
#include "GetterSetter.h"
-#include "HighFidelityLog.h"
#include "HostCallReturnValue.h"
#include "Interpreter.h"
#include "JIT.h"
@@ -52,6 +51,7 @@
#include "ObjectConstructor.h"
#include "JSCInlines.h"
#include "StructureRareDataInlines.h"
+#include "TypeProfilerLog.h"
#include "VariableWatchpointSetInlines.h"
#include <wtf/StringPrintStream.h>
@@ -637,12 +637,12 @@
RETURN(jsString(exec, Identifier::from(exec, OP(2).jsValue().asUInt32()).string()));
}
-SLOW_PATH_DECL(slow_path_profile_types_with_high_fidelity)
+SLOW_PATH_DECL(slow_path_profile_type)
{
BEGIN();
TypeLocation* location = pc[2].u.location;
JSValue val = OP_C(1).jsValue();
- vm.highFidelityLog()->recordTypeInformationForLocation(val, location);
+ vm.typeProfilerLog()->recordTypeInformationForLocation(val, location);
END();
}
diff --git a/Source/JavaScriptCore/runtime/CommonSlowPaths.h b/Source/JavaScriptCore/runtime/CommonSlowPaths.h
index 01f2d5a..fcac94a 100644
--- a/Source/JavaScriptCore/runtime/CommonSlowPaths.h
+++ b/Source/JavaScriptCore/runtime/CommonSlowPaths.h
@@ -233,7 +233,7 @@
SLOW_PATH_HIDDEN_DECL(slow_path_get_generic_property_enumerator);
SLOW_PATH_HIDDEN_DECL(slow_path_next_enumerator_pname);
SLOW_PATH_HIDDEN_DECL(slow_path_to_index_string);
-SLOW_PATH_HIDDEN_DECL(slow_path_profile_types_with_high_fidelity);
+SLOW_PATH_HIDDEN_DECL(slow_path_profile_type);
} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp
index 4c56b44..8a5b698 100644
--- a/Source/JavaScriptCore/runtime/Executable.cpp
+++ b/Source/JavaScriptCore/runtime/Executable.cpp
@@ -30,12 +30,12 @@
#include "BytecodeGenerator.h"
#include "CodeBlock.h"
#include "DFGDriver.h"
-#include "HighFidelityTypeProfiler.h"
#include "JIT.h"
#include "LLIntEntrypoint.h"
#include "JSCInlines.h"
#include "Parser.h"
#include "ProfilerDatabase.h"
+#include "TypeProfiler.h"
#include <wtf/CommaPrinter.h>
#include <wtf/Vector.h>
#include <wtf/text/StringBuilder.h>
@@ -104,8 +104,8 @@
, m_lastLine(-1)
, m_startColumn(UINT_MAX)
, m_endColumn(UINT_MAX)
- , m_highFidelityTypeProfilingStartOffset(UINT_MAX)
- , m_highFidelityTypeProfilingEndOffset(UINT_MAX)
+ , m_typeProfilingStartOffset(UINT_MAX)
+ , m_typeProfilingEndOffset(UINT_MAX)
{
}
@@ -376,10 +376,10 @@
ProgramExecutable::ProgramExecutable(ExecState* exec, const SourceCode& source)
: ScriptExecutable(exec->vm().programExecutableStructure.get(), exec->vm(), source, false)
{
- m_highFidelityTypeProfilingStartOffset = 0;
- m_highFidelityTypeProfilingEndOffset = source.length() - 1;
- if (exec->vm().isProfilingTypesWithHighFidelity())
- exec->vm().highFidelityTypeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(sourceID(), m_highFidelityTypeProfilingStartOffset, m_highFidelityTypeProfilingEndOffset);
+ m_typeProfilingStartOffset = 0;
+ m_typeProfilingEndOffset = source.length() - 1;
+ if (exec->vm().typeProfiler())
+ exec->vm().typeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(sourceID(), m_typeProfilingStartOffset, m_typeProfilingEndOffset);
}
void ProgramExecutable::destroy(JSCell* cell)
@@ -403,8 +403,8 @@
ASSERT(endColumn != UINT_MAX);
m_startColumn = startColumn;
m_endColumn = endColumn;
- m_highFidelityTypeProfilingStartOffset = unlinkedExecutable->highFidelityTypeProfilingStartOffset();
- m_highFidelityTypeProfilingEndOffset = unlinkedExecutable->highFidelityTypeProfilingEndOffset();
+ m_typeProfilingStartOffset = unlinkedExecutable->typeProfilingStartOffset();
+ m_typeProfilingEndOffset = unlinkedExecutable->typeProfilingEndOffset();
}
void FunctionExecutable::destroy(JSCell* cell)
@@ -501,10 +501,10 @@
UnlinkedFunctionExecutable* unlinkedFunctionExecutable = functionDeclarations[i].second.get();
JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link(vm, m_source, lineNo()), scope);
globalObject->addFunction(callFrame, functionDeclarations[i].first, value);
- if (vm.isProfilingTypesWithHighFidelity()) {
- vm.highFidelityTypeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(sourceID(),
- unlinkedFunctionExecutable->highFidelityTypeProfilingStartOffset(),
- unlinkedFunctionExecutable->highFidelityTypeProfilingEndOffset());
+ if (vm.typeProfiler()) {
+ vm.typeProfiler()->functionHasExecutedCache()->insertUnexecutedRange(sourceID(),
+ unlinkedFunctionExecutable->typeProfilingStartOffset(),
+ unlinkedFunctionExecutable->typeProfilingEndOffset());
}
}
diff --git a/Source/JavaScriptCore/runtime/Executable.h b/Source/JavaScriptCore/runtime/Executable.h
index 1b24e6a..5116f36 100644
--- a/Source/JavaScriptCore/runtime/Executable.h
+++ b/Source/JavaScriptCore/runtime/Executable.h
@@ -365,8 +365,8 @@
int lastLine() const { return m_lastLine; }
unsigned startColumn() const { return m_startColumn; }
unsigned endColumn() const { return m_endColumn; }
- unsigned highFidelityTypeProfilingStartOffset() const { return m_highFidelityTypeProfilingStartOffset; }
- unsigned highFidelityTypeProfilingEndOffset() const { return m_highFidelityTypeProfilingEndOffset; }
+ unsigned typeProfilingStartOffset() const { return m_typeProfilingStartOffset; }
+ unsigned typeProfilingEndOffset() const { return m_typeProfilingEndOffset; }
bool usesEval() const { return m_features & EvalFeature; }
bool usesArguments() const { return m_features & ArgumentsFeature; }
@@ -437,8 +437,8 @@
int m_lastLine;
unsigned m_startColumn;
unsigned m_endColumn;
- unsigned m_highFidelityTypeProfilingStartOffset;
- unsigned m_highFidelityTypeProfilingEndOffset;
+ unsigned m_typeProfilingStartOffset;
+ unsigned m_typeProfilingEndOffset;
};
class EvalExecutable : public ScriptExecutable {
diff --git a/Source/JavaScriptCore/runtime/Options.h b/Source/JavaScriptCore/runtime/Options.h
index 03734c6..dd6f170 100644
--- a/Source/JavaScriptCore/runtime/Options.h
+++ b/Source/JavaScriptCore/runtime/Options.h
@@ -274,7 +274,7 @@
v(unsigned, gcMaxHeapSize, 0) \
v(bool, recordGCPauseTimes, false) \
v(bool, logHeapStatisticsAtExit, false) \
- v(bool, profileTypesWithHighFidelity, false) \
+ v(bool, enableTypeProfiler, false) \
\
v(bool, enableExceptionFuzz, false) \
v(unsigned, fireExceptionFuzzAt, 0)
diff --git a/Source/JavaScriptCore/runtime/SymbolTable.cpp b/Source/JavaScriptCore/runtime/SymbolTable.cpp
index b2a4c64..369ca09 100644
--- a/Source/JavaScriptCore/runtime/SymbolTable.cpp
+++ b/Source/JavaScriptCore/runtime/SymbolTable.cpp
@@ -187,7 +187,7 @@
return result;
}
-void SymbolTable::prepareForHighFidelityTypeProfiling(const ConcurrentJITLocker&)
+void SymbolTable::prepareForTypeProfiling(const ConcurrentJITLocker&)
{
if (m_typeProfilingRareData)
return;
@@ -195,7 +195,7 @@
m_typeProfilingRareData = std::make_unique<TypeProfilingRareData>();
for (auto iter = m_map.begin(), end = m_map.end(); iter != end; ++iter) {
- m_typeProfilingRareData->m_uniqueIDMap.set(iter->key, HighFidelityNeedsUniqueIDGeneration);
+ m_typeProfilingRareData->m_uniqueIDMap.set(iter->key, TypeProfilerNeedsUniqueIDGeneration);
m_typeProfilingRareData->m_registerToVariableMap.set(iter->value.getIndex(), iter->key);
}
}
@@ -207,10 +207,10 @@
auto iter = m_typeProfilingRareData->m_uniqueIDMap.find(key);
auto end = m_typeProfilingRareData->m_uniqueIDMap.end();
if (iter == end)
- return HighFidelityNoGlobalIDExists;
+ return TypeProfilerNoGlobalIDExists;
GlobalVariableID id = iter->value;
- if (id == HighFidelityNeedsUniqueIDGeneration) {
+ if (id == TypeProfilerNeedsUniqueIDGeneration) {
id = vm.getNextUniqueVariableID();
m_typeProfilingRareData->m_uniqueIDMap.set(key, id);
m_typeProfilingRareData->m_uniqueTypeSetMap.set(key, TypeSet::create()); // Make a new global typeset for this corresponding ID.
@@ -226,7 +226,7 @@
auto iter = m_typeProfilingRareData->m_registerToVariableMap.find(registerIndex);
auto end = m_typeProfilingRareData->m_registerToVariableMap.end();
if (iter == end)
- return HighFidelityNoGlobalIDExists;
+ return TypeProfilerNoGlobalIDExists;
return uniqueIDForVariable(locker, iter->value.get(), vm);
}
diff --git a/Source/JavaScriptCore/runtime/SymbolTable.h b/Source/JavaScriptCore/runtime/SymbolTable.h
index f9cd06d..a833ae43 100644
--- a/Source/JavaScriptCore/runtime/SymbolTable.h
+++ b/Source/JavaScriptCore/runtime/SymbolTable.h
@@ -479,7 +479,7 @@
SymbolTable* cloneCapturedNames(VM&);
- void prepareForHighFidelityTypeProfiling(const ConcurrentJITLocker&);
+ void prepareForTypeProfiling(const ConcurrentJITLocker&);
static void visitChildren(JSCell*, SlotVisitor&);
diff --git a/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp b/Source/JavaScriptCore/runtime/TypeProfiler.cpp
similarity index 85%
rename from Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp
rename to Source/JavaScriptCore/runtime/TypeProfiler.cpp
index 8349630..624d7ca 100644
--- a/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp
+++ b/Source/JavaScriptCore/runtime/TypeProfiler.cpp
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "HighFidelityTypeProfiler.h"
+#include "TypeProfiler.h"
#include "InspectorJSTypeBuilders.h"
#include "TypeLocation.h"
@@ -33,9 +33,9 @@
static const bool verbose = false;
-void HighFidelityTypeProfiler::logTypesForTypeLocation(TypeLocation* location)
+void TypeProfiler::logTypesForTypeLocation(TypeLocation* location)
{
- TypeProfilerSearchDescriptor descriptor = location->m_globalVariableID == HighFidelityReturnStatement ? TypeProfilerSearchDescriptorFunctionReturn : TypeProfilerSearchDescriptorNormal;
+ TypeProfilerSearchDescriptor descriptor = location->m_globalVariableID == TypeProfilerReturnStatement ? TypeProfilerSearchDescriptorFunctionReturn : TypeProfilerSearchDescriptorNormal;
dataLogF("[Start, End]::[%u, %u]\n", location->m_divotStart, location->m_divotEnd);
@@ -44,14 +44,14 @@
else
dataLog("\t\t[Entry IS NOT in system]\n");
- dataLog("\t\t", location->m_globalVariableID == HighFidelityReturnStatement ? "[Return Statement]" : "[Normal Statement]", "\n");
+ dataLog("\t\t", location->m_globalVariableID == TypeProfilerReturnStatement ? "[Return Statement]" : "[Normal Statement]", "\n");
dataLog("\t\t#Local#\n\t\t", location->m_instructionTypeSet->seenTypes().replace("\n", "\n\t\t"), "\n");
if (location->m_globalTypeSet)
dataLog("\t\t#Global#\n\t\t", location->m_globalTypeSet->seenTypes().replace("\n", "\n\t\t"), "\n");
}
-void HighFidelityTypeProfiler::insertNewLocation(TypeLocation* location)
+void TypeProfiler::insertNewLocation(TypeLocation* location)
{
if (verbose)
dataLogF("Registering location:: divotStart:%u, divotEnd:%u\n", location->m_divotStart, location->m_divotEnd);
@@ -65,13 +65,13 @@
bucket.append(location);
}
-void HighFidelityTypeProfiler::getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr<Inspector::TypeBuilder::Runtime::TypeDescription>& description)
+void TypeProfiler::getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr<Inspector::TypeBuilder::Runtime::TypeDescription>& description)
{
TypeLocation* location = findLocation(divot, sourceID, descriptor);
if (!location)
return;
- if (location->m_globalTypeSet && location->m_globalVariableID != HighFidelityNoGlobalIDExists) {
+ if (location->m_globalTypeSet && location->m_globalVariableID != TypeProfilerNoGlobalIDExists) {
description->setDisplayTypeName(location->m_globalTypeSet->displayName());
description->setGlobalPrimitiveTypeNames(location->m_globalTypeSet->allPrimitiveTypeNames());
description->setGlobalStructures(location->m_globalTypeSet->allStructureRepresentations());
@@ -84,16 +84,16 @@
static bool descriptorMatchesTypeLocation(TypeProfilerSearchDescriptor descriptor, TypeLocation* location)
{
- if (descriptor == TypeProfilerSearchDescriptorFunctionReturn && location->m_globalVariableID == HighFidelityReturnStatement)
+ if (descriptor == TypeProfilerSearchDescriptorFunctionReturn && location->m_globalVariableID == TypeProfilerReturnStatement)
return true;
- if (descriptor == TypeProfilerSearchDescriptorNormal && location->m_globalVariableID != HighFidelityReturnStatement)
+ if (descriptor == TypeProfilerSearchDescriptorNormal && location->m_globalVariableID != TypeProfilerReturnStatement)
return true;
return false;
}
-TypeLocation* HighFidelityTypeProfiler::findLocation(unsigned divot, intptr_t sourceID, TypeProfilerSearchDescriptor descriptor)
+TypeLocation* TypeProfiler::findLocation(unsigned divot, intptr_t sourceID, TypeProfilerSearchDescriptor descriptor)
{
QueryKey queryKey(sourceID, divot);
auto iter = m_queryCache.find(queryKey);
@@ -126,4 +126,4 @@
return bestMatch;
}
-} //namespace JSC
+} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h b/Source/JavaScriptCore/runtime/TypeProfiler.h
similarity index 91%
rename from Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h
rename to Source/JavaScriptCore/runtime/TypeProfiler.h
index 123c255..ab7fd7a 100644
--- a/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h
+++ b/Source/JavaScriptCore/runtime/TypeProfiler.h
@@ -23,15 +23,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HighFidelityTypeProfiler_h
-#define HighFidelityTypeProfiler_h
+#ifndef TypeProfiler_h
+#define TypeProfiler_h
#include "CodeBlock.h"
#include "FunctionHasExecutedCache.h"
#include "TypeLocationCache.h"
#include <wtf/HashMap.h>
-#include <wtf/text/WTFString.h>
#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
namespace Inspector { namespace TypeBuilder { namespace Runtime {
class TypeDescription;
@@ -71,7 +71,7 @@
static const bool safeToCompareToEmptyOrDeleted = true;
};
-} //namespace JSC
+} // namespace JSC
namespace WTF {
@@ -92,16 +92,16 @@
TypeProfilerSearchDescriptorFunctionReturn = 2
};
-class HighFidelityTypeProfiler {
+class TypeProfiler {
public:
void logTypesForTypeLocation(TypeLocation*);
- void getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr<Inspector::TypeBuilder::Runtime::TypeDescription>&);
+ void getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor, unsigned divot, intptr_t sourceID, RefPtr<Inspector::TypeBuilder::Runtime::TypeDescription>&);
void insertNewLocation(TypeLocation*);
FunctionHasExecutedCache* functionHasExecutedCache() { return &m_functionHasExecutedCache; }
TypeLocationCache* typeLocationCache() { return &m_typeLocationCache; }
private:
- TypeLocation* findLocation(unsigned divot, intptr_t sourceID, TypeProfilerSearchDescriptor descriptor);
+ TypeLocation* findLocation(unsigned divot, intptr_t sourceID, TypeProfilerSearchDescriptor);
typedef HashMap<intptr_t, Vector<TypeLocation*>> SourceIDToLocationBucketMap;
SourceIDToLocationBucketMap m_bucketMap;
FunctionHasExecutedCache m_functionHasExecutedCache;
@@ -112,4 +112,4 @@
} // namespace JSC
-#endif //HighFidelityTypeProfiler_h
+#endif // TypeProfiler_h
diff --git a/Source/JavaScriptCore/runtime/HighFidelityLog.cpp b/Source/JavaScriptCore/runtime/TypeProfilerLog.cpp
similarity index 88%
rename from Source/JavaScriptCore/runtime/HighFidelityLog.cpp
rename to Source/JavaScriptCore/runtime/TypeProfilerLog.cpp
index f711f5d..4e382dc 100644
--- a/Source/JavaScriptCore/runtime/HighFidelityLog.cpp
+++ b/Source/JavaScriptCore/runtime/TypeProfilerLog.cpp
@@ -27,7 +27,7 @@
*/
#include "config.h"
-#include "HighFidelityLog.h"
+#include "TypeProfilerLog.h"
#include "JSCJSValueInlines.h"
#include "TypeLocation.h"
@@ -38,24 +38,24 @@
static const bool verbose = false;
-void HighFidelityLog::initializeHighFidelityLog()
+void TypeProfilerLog::initializeLog()
{
ASSERT(!m_logStartPtr);
- m_highFidelityLogSize = 50000;
- m_logStartPtr = new LogEntry[m_highFidelityLogSize];
+ m_logSize = 50000;
+ m_logStartPtr = new LogEntry[m_logSize];
m_currentLogEntryPtr = m_logStartPtr;
- m_logEndPtr = m_logStartPtr + m_highFidelityLogSize;
+ m_logEndPtr = m_logStartPtr + m_logSize;
}
-HighFidelityLog::~HighFidelityLog()
+TypeProfilerLog::~TypeProfilerLog()
{
delete[] m_logStartPtr;
}
-void HighFidelityLog::processHighFidelityLog(String reason)
+void TypeProfilerLog::processLogEntries(String reason)
{
if (verbose)
- dataLog("Process caller:'", reason,"'");
+ dataLog("Process caller:'", reason, "'");
double before = currentTimeMS();
LogEntry* entry = m_logStartPtr;
@@ -91,4 +91,4 @@
}
}
-} //namespace JSC
+} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/HighFidelityLog.h b/Source/JavaScriptCore/runtime/TypeProfilerLog.h
similarity index 83%
rename from Source/JavaScriptCore/runtime/HighFidelityLog.h
rename to Source/JavaScriptCore/runtime/TypeProfilerLog.h
index 2432e0d..826fab7c 100644
--- a/Source/JavaScriptCore/runtime/HighFidelityLog.h
+++ b/Source/JavaScriptCore/runtime/TypeProfilerLog.h
@@ -26,19 +26,19 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HighFidelityLog_h
-#define HighFidelityLog_h
+#ifndef TypeProfilerLog_h
+#define TypeProfilerLog_h
#include "JSCJSValue.h"
-#include "HighFidelityTypeProfiler.h"
#include "Structure.h"
+#include "TypeProfiler.h"
#include <wtf/ByteSpinLock.h>
namespace JSC {
class TypeLocation;
-class HighFidelityLog {
+class TypeProfilerLog {
public:
struct LogEntry {
@@ -53,13 +53,13 @@
};
- HighFidelityLog()
+ TypeProfilerLog()
: m_logStartPtr(0)
{
- initializeHighFidelityLog();
+ initializeLog();
}
- ~HighFidelityLog();
+ ~TypeProfilerLog();
ALWAYS_INLINE void recordTypeInformationForLocation(JSValue value, TypeLocation* location)
{
@@ -71,24 +71,24 @@
m_currentLogEntryPtr += 1;
if (UNLIKELY(m_currentLogEntryPtr == m_logEndPtr))
- processHighFidelityLog("Log Full");
+ processLogEntries(ASCIILiteral("Log Full"));
}
- void processHighFidelityLog(String);
+ void processLogEntries(String);
LogEntry* logEndPtr() const { return m_logEndPtr; }
- static ptrdiff_t logStartOffset() { return OBJECT_OFFSETOF(HighFidelityLog, m_logStartPtr); }
- static ptrdiff_t currentLogEntryOffset() { return OBJECT_OFFSETOF(HighFidelityLog, m_currentLogEntryPtr); }
+ static ptrdiff_t logStartOffset() { return OBJECT_OFFSETOF(TypeProfilerLog, m_logStartPtr); }
+ static ptrdiff_t currentLogEntryOffset() { return OBJECT_OFFSETOF(TypeProfilerLog, m_currentLogEntryPtr); }
private:
- void initializeHighFidelityLog();
+ void initializeLog();
- unsigned m_highFidelityLogSize;
+ unsigned m_logSize;
LogEntry* m_logStartPtr;
LogEntry* m_currentLogEntryPtr;
LogEntry* m_logEndPtr;
};
-} //namespace JSC
+} // namespace JSC
-#endif //HighFidelityLog_h
+#endif // TypeProfilerLog_h
diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp
index 019782f..666792a 100644
--- a/Source/JavaScriptCore/runtime/VM.cpp
+++ b/Source/JavaScriptCore/runtime/VM.cpp
@@ -48,8 +48,6 @@
#include "GetterSetter.h"
#include "Heap.h"
#include "HeapIterationScope.h"
-#include "HighFidelityTypeProfiler.h"
-#include "HighFidelityLog.h"
#include "HostCallReturnValue.h"
#include "Identifier.h"
#include "IncrementalSweeper.h"
@@ -84,6 +82,8 @@
#include "StrictEvalActivation.h"
#include "StrongInlines.h"
#include "StructureInlines.h"
+#include "TypeProfiler.h"
+#include "TypeProfilerLog.h"
#include "UnlinkedCodeBlock.h"
#include "WeakMapData.h"
#include <wtf/ProcessID.h>
@@ -193,7 +193,7 @@
, m_enabledProfiler(nullptr)
, m_builtinExecutables(BuiltinExecutables::create(*this))
, m_nextUniqueVariableID(1)
- , m_highFidelityTypeProfilingEnabledCount(0)
+ , m_typeProfilerEnabledCount(0)
{
interpreter = new Interpreter(*this);
StackBounds stack = wtfThreadData().stack();
@@ -286,8 +286,8 @@
// won't use this.
m_typedArrayController = adoptRef(new SimpleTypedArrayController());
- if (Options::profileTypesWithHighFidelity())
- enableHighFidelityTypeProfiling();
+ if (Options::enableTypeProfiler())
+ enableTypeProfiler();
}
VM::~VM()
@@ -899,29 +899,29 @@
return m_typeLocationInfo->add();
}
-bool VM::enableHighFidelityTypeProfiling()
+bool VM::enableTypeProfiler()
{
bool needsToRecompile = false;
- if (!m_highFidelityTypeProfilingEnabledCount) {
- m_highFidelityTypeProfiler = std::make_unique<HighFidelityTypeProfiler>();
- m_highFidelityLog = std::make_unique<HighFidelityLog>();
+ if (!m_typeProfilerEnabledCount) {
+ m_typeProfiler = std::make_unique<TypeProfiler>();
+ m_typeProfilerLog = std::make_unique<TypeProfilerLog>();
m_typeLocationInfo = std::make_unique<Bag<TypeLocation>>();
needsToRecompile = true;
}
- m_highFidelityTypeProfilingEnabledCount++;
+ m_typeProfilerEnabledCount++;
return needsToRecompile;
}
-bool VM::disableHighFidelityTypeProfiling()
+bool VM::disableTypeProfiler()
{
- RELEASE_ASSERT(m_highFidelityTypeProfilingEnabledCount > 0);
+ RELEASE_ASSERT(m_typeProfilerEnabledCount > 0);
bool needsToRecompile = false;
- m_highFidelityTypeProfilingEnabledCount--;
- if (!m_highFidelityTypeProfilingEnabledCount) {
- m_highFidelityTypeProfiler.reset(nullptr);
- m_highFidelityLog.reset(nullptr);
+ m_typeProfilerEnabledCount--;
+ if (!m_typeProfilerEnabledCount) {
+ m_typeProfiler.reset(nullptr);
+ m_typeProfilerLog.reset(nullptr);
m_typeLocationInfo.reset(nullptr);
needsToRecompile = true;
}
@@ -929,13 +929,13 @@
return needsToRecompile;
}
-void VM::dumpHighFidelityProfilingTypes()
+void VM::dumpTypeProfilerData()
{
- if (!isProfilingTypesWithHighFidelity())
+ if (!typeProfiler())
return;
- highFidelityLog()->processHighFidelityLog("VM Dump Types");
- HighFidelityTypeProfiler* profiler = m_highFidelityTypeProfiler.get();
+ typeProfilerLog()->processLogEntries(ASCIILiteral("VM Dump Types"));
+ TypeProfiler* profiler = m_typeProfiler.get();
for (Bag<TypeLocation>::iterator iter = m_typeLocationInfo->begin(); !!iter; ++iter) {
TypeLocation* location = *iter;
profiler->logTypesForTypeLocation(location);
diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h
index 26815a9..57b82b8 100644
--- a/Source/JavaScriptCore/runtime/VM.h
+++ b/Source/JavaScriptCore/runtime/VM.h
@@ -77,8 +77,8 @@
class CommonIdentifiers;
class ExecState;
class HandleStack;
- class HighFidelityTypeProfiler;
- class HighFidelityLog;
+ class TypeProfiler;
+ class TypeProfilerLog;
class Identifier;
class Interpreter;
class JSGlobalObject;
@@ -497,13 +497,12 @@
BuiltinExecutables* builtinExecutables() { return m_builtinExecutables.get(); }
- bool isProfilingTypesWithHighFidelity() { return !!m_highFidelityTypeProfiler; }
- bool enableHighFidelityTypeProfiling();
- bool disableHighFidelityTypeProfiling();
- HighFidelityLog* highFidelityLog() { return m_highFidelityLog.get(); }
- HighFidelityTypeProfiler* highFidelityTypeProfiler() { return m_highFidelityTypeProfiler.get(); }
+ bool enableTypeProfiler();
+ bool disableTypeProfiler();
+ TypeProfilerLog* typeProfilerLog() { return m_typeProfilerLog.get(); }
+ TypeProfiler* typeProfiler() { return m_typeProfiler.get(); }
TypeLocation* nextTypeLocation();
- JS_EXPORT_PRIVATE void dumpHighFidelityProfilingTypes();
+ JS_EXPORT_PRIVATE void dumpTypeProfilerData();
GlobalVariableID getNextUniqueVariableID() { return m_nextUniqueVariableID++; }
private:
@@ -554,10 +553,10 @@
OwnPtr<BuiltinExecutables> m_builtinExecutables;
RefCountedArray<StackFrame> m_exceptionStack;
HashMap<String, RefPtr<WatchpointSet>> m_impurePropertyWatchpointSets;
- std::unique_ptr<HighFidelityTypeProfiler> m_highFidelityTypeProfiler;
- std::unique_ptr<HighFidelityLog> m_highFidelityLog;
+ std::unique_ptr<TypeProfiler> m_typeProfiler;
+ std::unique_ptr<TypeProfilerLog> m_typeProfilerLog;
GlobalVariableID m_nextUniqueVariableID;
- unsigned m_highFidelityTypeProfilingEnabledCount;
+ unsigned m_typeProfilerEnabledCount;
std::unique_ptr<Bag<TypeLocation>> m_typeLocationInfo;
};