Profiler should show bytecode dumps as they would have been visible to the...
Profiler should show bytecode dumps as they would have been visible to the JITs, including the profiling data that the JITs would see https://bugs.webkit.org/show_bug.cgi?id=104647 Reviewed by Oliver Hunt. Source/JavaScriptCore: Adds more profiling data to bytecode dumps, and adds the ability to do a secondary bytecode dump for each JIT compilation of a code block. This is relevant because both the bytecodes, and the profiling data, may change after some number of executions. Also fixes some random dumping code to use PrintStream& rather than static const char[thingy]. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/ArrayProfile.cpp: (JSC::dumpArrayModes): (JSC::ArrayProfile::briefDescription): * bytecode/ArrayProfile.h: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::printGetByIdOp): (JSC::CodeBlock::printGetByIdCacheStatus): (JSC::CodeBlock::printCallOp): (JSC::CodeBlock::dumpValueProfiling): (JSC::CodeBlock::dumpArrayProfiling): (JSC::CodeBlock::dumpBytecode): * bytecode/CodeBlock.h: * bytecode/ValueProfile.h: (JSC::ValueProfileBase::briefDescription): * dfg/DFGAbstractValue.h: (JSC::DFG::AbstractValue::dump): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseCodeBlock): * jit/JIT.cpp: (JSC::JIT::privateCompile): * profiler/ProfilerBytecodeSequence.cpp: Added. (JSC::Profiler::BytecodeSequence::BytecodeSequence): (JSC::Profiler::BytecodeSequence::~BytecodeSequence): (JSC::Profiler::BytecodeSequence::indexForBytecodeIndex): (JSC::Profiler::BytecodeSequence::forBytecodeIndex): (JSC::Profiler::BytecodeSequence::addSequenceProperties): * profiler/ProfilerBytecodeSequence.h: Added. (JSC::Profiler::BytecodeSequence::size): (JSC::Profiler::BytecodeSequence::at): * profiler/ProfilerBytecodes.cpp: (JSC::Profiler::Bytecodes::Bytecodes): (JSC::Profiler::Bytecodes::toJS): * profiler/ProfilerBytecodes.h: (JSC::Profiler::Bytecodes::instructionCount): * profiler/ProfilerCompilation.cpp: (JSC::Profiler::Compilation::addProfiledBytecodes): (JSC::Profiler::Compilation::toJS): * profiler/ProfilerCompilation.h: (JSC::Profiler::Compilation::profiledBytecodesSize): (JSC::Profiler::Compilation::profiledBytecodesAt): * profiler/ProfilerDatabase.cpp: (JSC::Profiler::Database::ensureBytecodesFor): * profiler/ProfilerDatabase.h: * profiler/ProfilerProfiledBytecodes.cpp: Added. (JSC::Profiler::ProfiledBytecodes::ProfiledBytecodes): (JSC::Profiler::ProfiledBytecodes::~ProfiledBytecodes): (JSC::Profiler::ProfiledBytecodes::toJS): * profiler/ProfilerProfiledBytecodes.h: Added. (JSC::Profiler::ProfiledBytecodes::bytecodes): * runtime/CommonIdentifiers.h: Tools: Added a "profiling" (or "p") command to show the profiling data that the JITs saw for each JIT compilation of a code block. Also added instruction counts in the "full" display and made the "full" display the default thing you see. * Scripts/display-profiler-output: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Showing