Changeset 94942 in webkit
- Timestamp:
- Sep 11, 2011 8:42:39 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r94939 r94942 1 2011-09-11 Filip Pizlo <fpizlo@apple.com> 2 3 DFGNode.h has macros that indicate the enabling of a feature, but 4 they do not use the ENABLE() idiom. 5 https://bugs.webkit.org/show_bug.cgi?id=67907 6 7 Reviewed by Oliver Hunt. 8 9 * dfg/DFGByteCodeParser.cpp: 10 (JSC::DFG::ByteCodeParser::stronglyPredict): 11 (JSC::DFG::ByteCodeParser::parse): 12 * dfg/DFGGraph.cpp: 13 (JSC::DFG::Graph::predictArgumentTypes): 14 * dfg/DFGJITCodeGenerator.cpp: 15 * dfg/DFGJITCodeGenerator.h: 16 * dfg/DFGJITCompiler.cpp: 17 (JSC::DFG::JITCompiler::fillInt32ToInteger): 18 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative): 19 (JSC::DFG::JITCompiler::compileBody): 20 (JSC::DFG::JITCompiler::link): 21 * dfg/DFGJITCompiler.h: 22 * dfg/DFGNode.h: 23 * dfg/DFGNonSpeculativeJIT.cpp: 24 (JSC::DFG::NonSpeculativeJIT::compile): 25 * dfg/DFGOperations.cpp: 26 * dfg/DFGOperations.h: 27 * dfg/DFGPropagator.cpp: 28 (JSC::DFG::Propagator::fixpoint): 29 (JSC::DFG::Propagator::propagateNode): 30 (JSC::DFG::Propagator::propagateForward): 31 (JSC::DFG::Propagator::propagateBackward): 32 (JSC::DFG::propagate): 33 * dfg/DFGScoreBoard.h: 34 * dfg/DFGSpeculativeJIT.cpp: 35 (JSC::DFG::SpeculativeJIT::compile): 36 * dfg/DFGSpeculativeJIT.h: 37 (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): 38 * jit/JIT.cpp: 39 (JSC::JIT::privateCompile): 40 1 41 2011-09-11 Fumitoshi Ukai <ukai@chromium.org> 2 42 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r94802 r94942 476 476 ValueProfile* profile = m_profiledBlock->valueProfileForBytecodeOffset(bytecodeIndex); 477 477 ASSERT(profile); 478 #if DFG_DEBUG_VERBOSE478 #if ENABLE(DFG_DEBUG_VERBOSE) 479 479 printf("Dynamic profile [%u, %u]: ", nodeIndex, bytecodeIndex); 480 480 profile->dump(stdout); … … 482 482 #endif 483 483 m_graph[nodeIndex].predict(makePrediction(*m_globalData, *profile), StrongPrediction); 484 #if DFG_DEBUG_VERBOSE484 #if ENABLE(DFG_DEBUG_VERBOSE) 485 485 printf(" Prediction: %s\n", predictionToString(m_graph[nodeIndex].getPrediction())); 486 486 #endif … … 1376 1376 allocateVirtualRegisters(); 1377 1377 1378 #if DFG_DEBUG_VERBOSE1378 #if ENABLE(DFG_DEBUG_VERBOSE) 1379 1379 m_graph.dump(m_codeBlock); 1380 1380 #endif -
trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp
r94629 r94942 219 219 continue; 220 220 221 #if DFG_DEBUG_VERBOSE221 #if ENABLE(DFG_DEBUG_VERBOSE) 222 222 printf("Argument profile [%lu]: ", arg); 223 223 profile->dump(stdout); … … 227 227 m_predictions.predictArgument(arg, makePrediction(globalData, *profile) & ~PredictionTagMask, StrongPrediction); 228 228 229 #if DFG_DEBUG_VERBOSE229 #if ENABLE(DFG_DEBUG_VERBOSE) 230 230 printf(" Prediction: %s\n", predictionToString(m_predictions.getArgumentPrediction(arg))); 231 231 #endif -
trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator.cpp
r94914 r94942 1209 1209 1210 1210 1211 #if DFG_CONSISTENCY_CHECK1211 #if ENABLE(DFG_CONSISTENCY_CHECK) 1212 1212 void JITCodeGenerator::checkConsistency() 1213 1213 { -
trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator.h
r94914 r94942 928 928 #endif 929 929 930 #if DFG_CONSISTENCY_CHECK930 #if ENABLE(DFG_CONSISTENCY_CHECK) 931 931 void checkConsistency(); 932 932 #else -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
r94920 r94942 69 69 move(MacroAssembler::Imm32(valueOfInt32Constant(nodeIndex)), gpr); 70 70 } else { 71 #if DFG_JIT_ASSERT71 #if ENABLE(DFG_JIT_ASSERT) 72 72 // Redundant load, just so we can check the tag! 73 73 loadPtr(addressFor(node.virtualRegister()), gpr); … … 483 483 check.m_check.link(this); 484 484 485 #if DFG_DEBUG_VERBOSE485 #if ENABLE(DFG_DEBUG_VERBOSE) 486 486 fprintf(stderr, "Speculation failure for Node @%d at JIT offset 0x%x\n", (int)check.m_nodeIndex, debugOffset()); 487 487 #endif 488 #if DFG_JIT_BREAK_ON_SPECULATION_FAILURE488 #if ENABLE(DFG_JIT_BREAK_ON_SPECULATION_FAILURE) 489 489 breakpoint(); 490 490 #endif 491 491 492 #if DFG_VERBOSE_SPECULATION_FAILURE492 #if ENABLE(DFG_VERBOSE_SPECULATION_FAILURE) 493 493 SpeculationFailureDebugInfo* debugInfo = new SpeculationFailureDebugInfo; 494 494 debugInfo->codeBlock = m_codeBlock; … … 827 827 // non-speculative path's requirements). 828 828 829 #if DFG_JIT_BREAK_ON_EVERY_FUNCTION829 #if ENABLE(DFG_JIT_BREAK_ON_EVERY_FUNCTION) 830 830 // Handy debug tool! 831 831 breakpoint(); … … 835 835 Label speculativePathBegin = label(); 836 836 SpeculativeJIT speculative(*this); 837 #if ! DFG_DEBUG_LOCAL_DISBALE_SPECULATIVE837 #if !ENABLE(DFG_DEBUG_LOCAL_DISBALE_SPECULATIVE) 838 838 bool compiledSpeculative = speculative.compile(); 839 839 #else … … 893 893 { 894 894 // Link the code, populate data in CodeBlock data structures. 895 #if DFG_DEBUG_VERBOSE895 #if ENABLE(DFG_DEBUG_VERBOSE) 896 896 fprintf(stderr, "JIT code for %p start at [%p, %p)\n", m_codeBlock, linkBuffer.debugAddress(), static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.debugSize()); 897 897 #endif … … 1025 1025 } 1026 1026 1027 #if DFG_JIT_ASSERT1027 #if ENABLE(DFG_JIT_ASSERT) 1028 1028 void JITCompiler::jitAssertIsInt32(GPRReg gpr) 1029 1029 { -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h
r94688 r94942 59 59 #endif 60 60 61 #if DFG_VERBOSE_SPECULATION_FAILURE61 #if ENABLE(DFG_VERBOSE_SPECULATION_FAILURE) 62 62 struct SpeculationFailureDebugInfo { 63 63 CodeBlock* codeBlock; … … 259 259 260 260 // These methods JIT generate dynamic, debug-only checks - akin to ASSERTs. 261 #if DFG_JIT_ASSERT261 #if ENABLE(DFG_JIT_ASSERT) 262 262 void jitAssertIsInt32(GPRReg); 263 263 void jitAssertIsJSInt32(GPRReg); -
trunk/Source/JavaScriptCore/dfg/DFGNode.h
r94629 r94942 28 28 29 29 // Emit various logging information for debugging, including dumping the dataflow graphs. 30 #define DFG_DEBUG_VERBOSE 030 #define ENABLE_DFG_DEBUG_VERBOSE 0 31 31 // Enable generation of dynamic checks into the instruction stream. 32 32 #if !ASSERT_DISABLED 33 #define DFG_JIT_ASSERT 133 #define ENABLE_DFG_JIT_ASSERT 1 34 34 #else 35 #define DFG_JIT_ASSERT 035 #define ENABLE_DFG_JIT_ASSERT 0 36 36 #endif 37 37 // Consistency check contents compiler data structures. 38 #define DFG_CONSISTENCY_CHECK 038 #define ENBALE_DFG_CONSISTENCY_CHECK 0 39 39 // Emit a breakpoint into the head of every generated function, to aid debugging in GDB. 40 #define DFG_JIT_BREAK_ON_EVERY_FUNCTION 040 #define ENABLE_DFG_JIT_BREAK_ON_EVERY_FUNCTION 0 41 41 // Emit a breakpoint into the head of every generated node, to aid debugging in GDB. 42 #define DFG_JIT_BREAK_ON_EVERY_BLOCK 042 #define ENABLE_DFG_JIT_BREAK_ON_EVERY_BLOCK 0 43 43 // Emit a breakpoint into the head of every generated node, to aid debugging in GDB. 44 #define DFG_JIT_BREAK_ON_EVERY_NODE 044 #define ENABLE_DFG_JIT_BREAK_ON_EVERY_NODE 0 45 45 // Emit a breakpoint into the speculation failure code. 46 #define DFG_JIT_BREAK_ON_SPECULATION_FAILURE 046 #define ENABLE_DFG_JIT_BREAK_ON_SPECULATION_FAILURE 0 47 47 // Log every speculation failure. 48 #define DFG_VERBOSE_SPECULATION_FAILURE 048 #define ENABLE_DFG_VERBOSE_SPECULATION_FAILURE 0 49 49 // Disable the DFG JIT without having to touch Platform.h! 50 50 #define DFG_DEBUG_LOCAL_DISBALE 0 … … 52 52 #define DFG_DEBUG_LOCAL_DISBALE_SPECULATIVE 0 53 53 // Generate stats on how successful we were in making use of the DFG jit, and remaining on the hot path. 54 #define DFG_SUCCESS_STATS 054 #define ENABLE_DFG_SUCCESS_STATS 0 55 55 56 56 -
trunk/Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp
r94688 r94942 1087 1087 ASSERT(GPRInfo::returnValueGPR != GPRInfo::callFrameRegister); 1088 1088 1089 #if DFG_SUCCESS_STATS1089 #if ENABLE(DFG_SUCCESS_STATS) 1090 1090 static SamplingCounter counter("NonSpeculativeJIT"); 1091 1091 m_jit.emitCount(counter); … … 1253 1253 m_blockHeads[m_block] = m_jit.label(); 1254 1254 1255 #if DFG_JIT_BREAK_ON_EVERY_BLOCK1255 #if ENABLE(DFG_JIT_BREAK_ON_EVERY_BLOCK) 1256 1256 m_jit.breakpoint(); 1257 1257 #endif … … 1262 1262 continue; 1263 1263 1264 #if DFG_DEBUG_VERBOSE1264 #if ENABLE(DFG_DEBUG_VERBOSE) 1265 1265 fprintf(stderr, "NonSpeculativeJIT generating Node @%d at code offset 0x%x ", (int)m_compileIndex, m_jit.debugOffset()); 1266 1266 #endif 1267 #if DFG_JIT_BREAK_ON_EVERY_NODE1267 #if ENABLE(DFG_JIT_BREAK_ON_EVERY_NODE) 1268 1268 m_jit.breakpoint(); 1269 1269 #endif … … 1271 1271 checkConsistency(); 1272 1272 compile(checkIterator, node); 1273 #if DFG_DEBUG_VERBOSE1273 #if ENABLE(DFG_DEBUG_VERBOSE) 1274 1274 if (node.hasResult()) 1275 1275 fprintf(stderr, "-> %s\n", dataFormatToString(m_generationInfo[node.virtualRegister()].registerFormat())); -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r94629 r94942 679 679 } 680 680 681 #if DFG_VERBOSE_SPECULATION_FAILURE681 #if ENABLE(DFG_VERBOSE_SPECULATION_FAILURE) 682 682 void debugOperationPrintSpeculationFailure(ExecState*, void* debugInfoRaw) 683 683 { -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r94629 r94942 116 116 RegisterSizedBoolean dfgConvertJSValueToBoolean(ExecState*, EncodedJSValue); 117 117 118 #if DFG_VERBOSE_SPECULATION_FAILURE118 #if ENABLE(DFG_VERBOSE_SPECULATION_FAILURE) 119 119 void debugOperationPrintSpeculationFailure(ExecState*, void*); 120 120 #endif -
trunk/Source/JavaScriptCore/dfg/DFGPropagator.cpp
r94629 r94942 67 67 void fixpoint() 68 68 { 69 #if DFG_DEBUG_VERBOSE69 #if ENABLE(DFG_DEBUG_VERBOSE) 70 70 m_count = 0; 71 71 #endif … … 121 121 NodeType op = node.op; 122 122 123 #if DFG_DEBUG_VERBOSE123 #if ENABLE(DFG_DEBUG_VERBOSE) 124 124 printf(" %s[%u]: ", Graph::opName(op), m_compileIndex); 125 125 #endif … … 306 306 } 307 307 308 #if DFG_DEBUG_VERBOSE308 #if ENABLE(DFG_DEBUG_VERBOSE) 309 309 printf("expect(%s) use(%s) %s\n", predictionToString(m_predictions[m_compileIndex]), predictionToString(m_uses[m_compileIndex]), changed ? "CHANGED" : ""); 310 310 #endif … … 315 315 void propagateForward() 316 316 { 317 #if DFG_DEBUG_VERBOSE317 #if ENABLE(DFG_DEBUG_VERBOSE) 318 318 printf("Propagating forward [%u]\n", ++m_count); 319 319 #endif … … 324 324 void propagateBackward() 325 325 { 326 #if DFG_DEBUG_VERBOSE326 #if ENABLE(DFG_DEBUG_VERBOSE) 327 327 printf("Propagating backward [%u]\n", ++m_count); 328 328 #endif … … 343 343 PredictionTracker m_variableUses; 344 344 345 #if DFG_DEBUG_VERBOSE345 #if ENABLE(DFG_DEBUG_VERBOSE) 346 346 unsigned m_count; 347 347 #endif … … 359 359 propagator.fixpoint(); 360 360 361 #if DFG_DEBUG_VERBOSE361 #if ENABLE(DFG_DEBUG_VERBOSE) 362 362 graph.dump(codeBlock); 363 363 #endif -
trunk/Source/JavaScriptCore/dfg/DFGScoreBoard.h
r85249 r94942 49 49 } 50 50 51 #if DFG_CONSISTENCY_CHECK51 #if ENABLE(DFG_CONSISTENCY_CHECK) 52 52 ~ScoreBoard() 53 53 { -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r94914 r94942 1143 1143 ASSERT(GPRInfo::returnValueGPR != GPRInfo::callFrameRegister); 1144 1144 1145 #if DFG_SUCCESS_STATS1145 #if ENABLE(DFG_SUCCESS_STATS) 1146 1146 static SamplingCounter counter("SpeculativeJIT"); 1147 1147 m_jit.emitCount(counter); … … 1380 1380 ASSERT(m_compileIndex == block.begin); 1381 1381 m_blockHeads[m_block] = m_jit.label(); 1382 #if DFG_JIT_BREAK_ON_EVERY_BLOCK1382 #if ENABLE(DFG_JIT_BREAK_ON_EVERY_BLOCK) 1383 1383 m_jit.breakpoint(); 1384 1384 #endif … … 1389 1389 continue; 1390 1390 1391 #if DFG_DEBUG_VERBOSE1391 #if ENABLE(DFG_DEBUG_VERBOSE) 1392 1392 fprintf(stderr, "SpeculativeJIT generating Node @%d at JIT offset 0x%x ", (int)m_compileIndex, m_jit.debugOffset()); 1393 1393 #endif 1394 #if DFG_JIT_BREAK_ON_EVERY_NODE1394 #if ENABLE(DFG_JIT_BREAK_ON_EVERY_NODE) 1395 1395 m_jit.breakpoint(); 1396 1396 #endif … … 1405 1405 return; 1406 1406 } 1407 #if DFG_DEBUG_VERBOSE1407 #if ENABLE(DFG_DEBUG_VERBOSE) 1408 1408 if (node.hasResult()) 1409 1409 fprintf(stderr, "-> %s\n", dataFormatToString(m_generationInfo[node.virtualRegister()].registerFormat())); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r94914 r94942 218 218 void terminateSpeculativeExecution() 219 219 { 220 #if DFG_DEBUG_VERBOSE220 #if ENABLE(DFG_DEBUG_VERBOSE) 221 221 fprintf(stderr, "SpeculativeJIT was terminated.\n"); 222 222 #endif -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r94920 r94942 522 522 Jump registerFileCheck; 523 523 if (m_codeBlock->codeType() == FunctionCode) { 524 #if DFG_SUCCESS_STATS524 #if ENABLE(DFG_SUCCESS_STATS) 525 525 static SamplingCounter counter("orignalJIT"); 526 526 emitCount(counter);
Note: See TracChangeset
for help on using the changeset viewer.