Changeset 146548 in webkit
- Timestamp:
- Mar 21, 2013 6:17:09 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r146505 r146548 1 2013-03-21 Filip Pizlo <fpizlo@apple.com> 2 3 JSC profiler should have an at-a-glance report of the success of DFG optimization 4 https://bugs.webkit.org/show_bug.cgi?id=112988 5 6 Reviewed by Geoffrey Garen. 7 8 * dfg/DFGByteCodeParser.cpp: 9 (JSC::DFG::ByteCodeParser::handleCall): 10 (JSC::DFG::ByteCodeParser::handleGetById): 11 (JSC::DFG::ByteCodeParser::parseBlock): 12 * profiler/ProfilerCompilation.cpp: 13 (JSC::Profiler::Compilation::Compilation): 14 (JSC::Profiler::Compilation::toJS): 15 * profiler/ProfilerCompilation.h: 16 (JSC::Profiler::Compilation::noticeInlinedGetById): 17 (JSC::Profiler::Compilation::noticeInlinedPutById): 18 (JSC::Profiler::Compilation::noticeInlinedCall): 19 (Compilation): 20 * runtime/CommonIdentifiers.h: 21 1 22 2013-03-21 Mark Lam <mark.lam@apple.com> 2 23 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r146382 r146548 1231 1231 addToGraph(Phantom, callTarget); 1232 1232 emitArgumentPhantoms(registerOffset, argumentCountIncludingThis, kind); 1233 if (m_graph.m_compilation) 1234 m_graph.m_compilation->noticeInlinedCall(); 1233 1235 return; 1234 1236 } 1235 } else if (handleInlining(usesResult, callTarget, resultOperand, callLinkStatus, registerOffset, argumentCountIncludingThis, nextOffset, kind)) 1237 } else if (handleInlining(usesResult, callTarget, resultOperand, callLinkStatus, registerOffset, argumentCountIncludingThis, nextOffset, kind)) { 1238 if (m_graph.m_compilation) 1239 m_graph.m_compilation->noticeInlinedCall(); 1236 1240 return; 1241 } 1237 1242 1238 1243 addCall(interpreter, currentInstruction, op); … … 1718 1723 if (prediction == SpecNone) 1719 1724 addToGraph(ForceOSRExit); 1725 else if (m_graph.m_compilation) 1726 m_graph.m_compilation->noticeInlinedGetById(); 1720 1727 1721 1728 Node* originalBaseForBaselineJIT = base; … … 2596 2603 m_currentIndex, 2597 2604 m_codeBlock->identifier(identifierNumber)); 2598 if (!putByIdStatus.isSet()) 2605 bool canCountAsInlined = true; 2606 if (!putByIdStatus.isSet()) { 2599 2607 addToGraph(ForceOSRExit); 2608 canCountAsInlined = false; 2609 } 2600 2610 2601 2611 bool hasExitSite = m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache); … … 2685 2695 else 2686 2696 addToGraph(PutById, OpInfo(identifierNumber), base, value); 2687 } 2697 canCountAsInlined = false; 2698 } 2699 2700 if (canCountAsInlined && m_graph.m_compilation) 2701 m_graph.m_compilation->noticeInlinedPutById(); 2688 2702 2689 2703 NEXT_OPCODE(op_put_by_id); -
trunk/Source/JavaScriptCore/profiler/ProfilerCompilation.cpp
r141050 r146548 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 38 38 : m_bytecodes(bytecodes) 39 39 , m_kind(kind) 40 , m_numInlinedGetByIds(0) 41 , m_numInlinedPutByIds(0) 42 , m_numInlinedCalls(0) 40 43 { 41 44 } … … 125 128 result->putDirect(exec->globalData(), exec->propertyNames().osrExits, exits); 126 129 130 result->putDirect(exec->globalData(), exec->propertyNames().numInlinedGetByIds, jsNumber(m_numInlinedGetByIds)); 131 result->putDirect(exec->globalData(), exec->propertyNames().numInlinedPutByIds, jsNumber(m_numInlinedPutByIds)); 132 result->putDirect(exec->globalData(), exec->propertyNames().numInlinedCalls, jsNumber(m_numInlinedCalls)); 133 127 134 return result; 128 135 } -
trunk/Source/JavaScriptCore/profiler/ProfilerCompilation.h
r140718 r146548 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 56 56 const ProfiledBytecodes& profiledBytecodesAt(unsigned i) const { return m_profiledBytecodes[i]; } 57 57 58 void noticeInlinedGetById() { m_numInlinedGetByIds++; } 59 void noticeInlinedPutById() { m_numInlinedPutByIds++; } 60 void noticeInlinedCall() { m_numInlinedCalls++; } 61 58 62 Bytecodes* bytecodes() const { return m_bytecodes; } 59 63 CompilationKind kind() const { return m_kind; } … … 74 78 Vector<OSRExitSite> m_osrExitSites; 75 79 SegmentedVector<OSRExit> m_osrExits; 80 unsigned m_numInlinedGetByIds; 81 unsigned m_numInlinedPutByIds; 82 unsigned m_numInlinedCalls; 76 83 }; 77 84 -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r146071 r146548 74 74 macro(name) \ 75 75 macro(now) \ 76 macro(numInlinedGetByIds) \ 77 macro(numInlinedPutByIds) \ 78 macro(numInlinedCalls) \ 76 79 macro(Object) \ 77 80 macro(opcode) \ -
trunk/Tools/ChangeLog
r146546 r146548 1 2013-03-21 Filip Pizlo <fpizlo@apple.com> 2 3 JSC profiler should have an at-a-glance report of the success of DFG optimization 4 https://bugs.webkit.org/show_bug.cgi?id=112988 5 6 Reviewed by Geoffrey Garen. 7 8 * Scripts/display-profiler-output: 9 1 10 2013-03-21 Dirk Pranke <dpranke@chromium.org> 2 11 -
trunk/Tools/Scripts/display-profiler-output
r139021 r146548 1 1 #!/usr/bin/env ruby 2 2 3 # Copyright (C) 2012 Apple Inc. All rights reserved.3 # Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 4 4 # 5 5 # Redistribution and use in source and binary forms, with or without … … 326 326 327 327 class Compilation 328 attr_accessor :bytecode, :engine, :descriptions, :counters, :compilationIndex, :osrExits, :profiledBytecodes 328 attr_accessor :bytecode, :engine, :descriptions, :counters, :compilationIndex 329 attr_accessor :osrExits, :profiledBytecodes, :numInlinedGetByIds, :numInlinedPutByIds 330 attr_accessor :numInlinedCalls 329 331 330 332 def initialize(json) … … 376 378 @profiledBytecodes << ProfiledBytecodes.new(subJson) 377 379 } 380 @numInlinedGetByIds = json["numInlinedGetByIds"] 381 @numInlinedPutByIds = json["numInlinedPutByIds"] 382 @numInlinedCalls = json["numInlinedCalls"] 378 383 end 379 384 … … 508 513 exitCountCols = 7 509 514 remaining -= exitCountCols + 1 515 516 recentOptsCols = 12 517 remaining -= recentOptsCols + 1 510 518 end 511 519 … … 526 534 print(" " + center("Inlines", inlinesCols)) 527 535 print(" " + center("#Exits", exitCountCols)) 536 print(" " + center("Last Opts", recentOptsCols)) 528 537 end 529 538 if sourceCols … … 541 550 print(" " + (" " * compilationsCols)) 542 551 print(" " + center("Src/Total", inlinesCols)) 552 print(" " + (" " * exitCountCols)) 553 print(" " + center("Get/Put/Call", recentOptsCols)) 543 554 end 544 555 puts … … 565 576 print(" " + center(bytecode.sourceMachineInlineSites.to_s + "/" + bytecode.totalMachineInlineSites.to_s, inlinesCols)) 566 577 print(" " + center(bytecode.totalExitCount.to_s, exitCountCols)) 578 lastCompilation = bytecode.compilations[-1] 579 if lastCompilation 580 optData = [lastCompilation.numInlinedGetByIds, 581 lastCompilation.numInlinedPutByIds, 582 lastCompilation.numInlinedCalls] 583 else 584 optData = ["N/A"] 585 end 586 print(" " + center(optData.join('/'), recentOptsCols)) 567 587 end 568 588 if sourceCols … … 827 847 828 848 puts("Compilation #{compilation}:") 849 puts(" Num inlined: GetByIds: #{compilation.numInlinedGetByIds} PutByIds: #{compilation.numInlinedPutByIds} Calls: #{compilation.numInlinedCalls}") 829 850 puts(center("Actual Counts", actualCountCols) + " " + center("Source Counts", sourceCountCols) + " " + center("Disassembly in #{compilation.engine}", screenWidth - 1 - sourceCountCols - 1 - actualCountCols)) 830 851 puts((" " * actualCountCols) + " " + center("Base/DFG", sourceCountCols))
Note: See TracChangeset
for help on using the changeset viewer.