<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[198364] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/198364">198364</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2016-03-17 17:53:24 -0700 (Thu, 17 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
https://bugs.webkit.org/show_bug.cgi?id=155561

Reviewed by Saam Barati.

Source/JavaScriptCore:

A VM needs some internal profiling hacks in addition to the profiler(s) that the user sees, because
you can squeeze out more fidelity if you're willing to make some kind of deal with the devil. Prior
to this change JSC had a bunch of these:

- CodeBlock sampling profiler
- Bytecode sampling profiler
- Sampling flags
- Sampling regions
- Some other stuff

I tried using these recently. They didn't even build. Initially I fixed that, but then I found that
these profilers had some serious bugs that made them report bogus results - like underreporting the
time spent in regions of code by more than 2x.

Part of the problem here is that a profiler loses fidelity as it gains power. The more general it
tries to be, the more code gets executed on the hot path for the profiler, which increasingly
perturbs the results. I believe that's the reason for the underreporting - code ran sufficiently
slower, and in a sufficiently different way when profiling, that the results were just wrong.

This change attacks this problem directly by replacing all of the diverse profiling hacks with just
one, which I call the SuperSampler. It consists of exactly one counter. When enabled, the sampler
will periodically print (via dataLog()) the percentage of samples that saw a non-zero count. Because
it's so simple, it gives better accuracy. This comes about in two ways:

- It runs at a lower rate. That's fine since it's only checking one flag. You don't need a high rate
  for just one flag.
        
- The fact that there is only *one* flag means that the user must choose a hypothesis about what is
  slow. This turns the problem of profiling into a hypothesis testing problem, which is an inherently
  less flaky kind of experiment to run.
        
The SuperSampler is enabled with a runtime flag rather than a compile-time flag, so it's much less
likely to break. That also means that you can enable it without rebuilding the universe. The old
samplers all had ENABLE flags in Platform.h, which was rather unfortunate for compile times.

SuperSampler supports both JIT and C++ users. C++ users should use SuperSamplerScope. The default
idiom is to create one and pass &quot;true&quot; to it. You can disable a scope by passing &quot;false&quot; instead.
This patch puts a bunch of scopes in places I care about. I think it's probably OK if people check in
these deactivated scopes. That makes it convenient to retest things we've tested previously.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/SamplingTool.cpp: Removed.
* bytecode/SamplingTool.h: Removed.
* bytecode/SuperSampler.cpp: Added.
(JSC::initializeSuperSampler):
(JSC::printSuperSamplerState):
* bytecode/SuperSampler.h: Added.
(JSC::SuperSamplerScope::SuperSamplerScope):
(JSC::SuperSamplerScope::~SuperSamplerScope):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
* bytecompiler/NodesCodegen.cpp:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::forAllValues):
(JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::clobberStructures):
* dfg/DFGArgumentsEliminationPhase.cpp:
(JSC::DFG::performArgumentsElimination):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::performBackwardsPropagation):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::parse):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::performCFA):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::performCFGSimplification):
* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlocks):
(JSC::DFG::CPSRethreadingPhase::propagatePhis):
(JSC::DFG::performCPSRethreading):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::performLocalCSE):
(JSC::DFG::performGlobalCSE):
* dfg/DFGCleanUpPhase.cpp:
(JSC::DFG::performCleanUp):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::performConstantFolding):
* dfg/DFGConstantHoistingPhase.cpp:
(JSC::DFG::performConstantHoisting):
* dfg/DFGCriticalEdgeBreakingPhase.cpp:
(JSC::DFG::performCriticalEdgeBreaking):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::performDCE):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::performFixup):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dethread):
* dfg/DFGIntegerCheckCombiningPhase.cpp:
(JSC::DFG::performIntegerCheckCombining):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
(JSC::DFG::performIntegerRangeOptimization):
* dfg/DFGInvalidationPointInjectionPhase.cpp:
(JSC::DFG::performInvalidationPointInjection):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::performLICM):
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::performLiveCatchVariablePreservationPhase):
* dfg/DFGLivenessAnalysisPhase.cpp:
(JSC::DFG::performLivenessAnalysis):
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::performLoopPreHeaderCreation):
* dfg/DFGMaximalFlushInsertionPhase.cpp:
(JSC::DFG::performMaximalFlushInsertion):
* dfg/DFGMovHintRemovalPhase.cpp:
(JSC::DFG::performMovHintRemoval):
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::performOSRAvailabilityAnalysis):
* dfg/DFGOSREntrypointCreationPhase.cpp:
(JSC::DFG::performOSREntrypointCreation):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::performObjectAllocationSinking):
* dfg/DFGOperations.cpp:
* dfg/DFGPhantomInsertionPhase.cpp:
(JSC::DFG::performPhantomInsertion):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThread):
* dfg/DFGPredictionInjectionPhase.cpp:
(JSC::DFG::performPredictionInjection):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::performPredictionPropagation):
* dfg/DFGPutStackSinkingPhase.cpp:
(JSC::DFG::performPutStackSinking):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::performSSAConversion):
* dfg/DFGSSALoweringPhase.cpp:
(JSC::DFG::performSSALowering):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::performStackLayout):
* dfg/DFGStaticExecutionCountEstimationPhase.cpp:
(JSC::DFG::performStaticExecutionCountEstimation):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
(JSC::DFG::performFastStoreBarrierInsertion):
(JSC::DFG::performGlobalStoreBarrierInsertion):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::performStrengthReduction):
* dfg/DFGStructureAbstractValue.cpp:
(JSC::DFG::StructureAbstractValue::assertIsRegistered):
(JSC::DFG::StructureAbstractValue::clobber):
(JSC::DFG::StructureAbstractValue::observeTransition):
(JSC::DFG::StructureAbstractValue::observeTransitions):
(JSC::DFG::StructureAbstractValue::add):
(JSC::DFG::StructureAbstractValue::merge):
(JSC::DFG::StructureAbstractValue::mergeSlow):
(JSC::DFG::StructureAbstractValue::mergeNotTop):
(JSC::DFG::StructureAbstractValue::filter):
(JSC::DFG::StructureAbstractValue::filterSlow):
(JSC::DFG::StructureAbstractValue::contains):
(JSC::DFG::StructureAbstractValue::isSubsetOf):
(JSC::DFG::StructureAbstractValue::isSupersetOf):
(JSC::DFG::StructureAbstractValue::overlaps):
(JSC::DFG::StructureAbstractValue::equalsSlow):
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::performStructureRegistration):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::performTierUpCheckInjection):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::performTypeCheckHoisting):
* dfg/DFGUnificationPhase.cpp:
(JSC::DFG::performUnification):
* dfg/DFGVarargsForwardingPhase.cpp:
(JSC::DFG::performVarargsForwarding):
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::performVirtualRegisterAllocation):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::performWatchpointCollection):
* dynbench.cpp:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpExec):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpTest):
(JSC::FTL::DFG::LowerDFGToB3::compileStringReplace):
(JSC::FTL::DFG::LowerDFGToB3::compileGetRegExpObjectLastIndex):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::store):
(JSC::FTL::Output::absolute):
(JSC::FTL::Output::incrementSuperSamplerCount):
(JSC::FTL::Output::decrementSuperSamplerCount):
* ftl/FTLOutput.h:
(JSC::FTL::Output::baseIndex):
(JSC::FTL::Output::load8SignExt32):
(JSC::FTL::Output::load8ZeroExt32):
(JSC::FTL::Output::anchor):
(JSC::FTL::Output::absolute): Deleted.
* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::collectAndSweep):
(JSC::Heap::collectImpl):
(JSC::Heap::zombifyDeadObjects):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::specializedSweep):
* interpreter/Interpreter.cpp:
(JSC::setupVarargsFrameAndSetThis):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::initialize):
(JSC::checkedReturn):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::debug):
(JSC::SamplingScope::SamplingScope): Deleted.
(JSC::SamplingScope::~SamplingScope): Deleted.
(JSC::Interpreter::enableSampler): Deleted.
(JSC::Interpreter::dumpSampleData): Deleted.
(JSC::Interpreter::startSampling): Deleted.
(JSC::Interpreter::stopSampling): Deleted.
* interpreter/Interpreter.h:
(JSC::Interpreter::isCallBytecode):
(JSC::Interpreter::sampler): Deleted.
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::branchIfNotFastTypedArray):
(JSC::AssemblyHelpers::incrementSuperSamplerCount):
(JSC::AssemblyHelpers::decrementSuperSamplerCount):
(JSC::AssemblyHelpers::purifyNaN):
* jit/AssemblyHelpers.h:
* jit/JIT.cpp:
* jit/JIT.h:
* jit/JITArithmetic.cpp:
* jit/JITArithmetic32_64.cpp:
* jit/JITCall.cpp:
* jit/JITCall32_64.cpp:
* jit/JITOperations.cpp:
* jit/JITPropertyAccess.cpp:
* jit/JITPropertyAccess32_64.cpp:
* jsc.cpp:
(runWithScripts):
(jscmain):
* parser/Nodes.cpp:
* parser/Parser.h:
(JSC::parse):
* runtime/Executable.h:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/Options.h:
* runtime/RegExpCachedResult.h:
* runtime/RegExpMatchesArray.h:
(JSC::createRegExpMatchesArray):
* runtime/StringPrototype.cpp:
(JSC::removeUsingRegExpSearch):
(JSC::stringProtoFuncSubstring):
* runtime/VM.cpp:
(JSC::VM::resetDateCache):
(JSC::VM::whenIdle):
(JSC::VM::deleteAllCode):
(JSC::VM::addSourceProviderCache):
(JSC::VM::startSampling): Deleted.
(JSC::VM::stopSampling): Deleted.
(JSC::VM::dumpSampleData): Deleted.
* runtime/VM.h:
(JSC::VM::regExpCache):
* testRegExp.cpp:
(runFromFiles):
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::interpret):

Source/WebCore:

No new tests because no new behavior.

* platform/audio/ios/MediaSessionManagerIOS.mm:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

Source/WTF:

This patch replaces all of our various ad hoc profiling hacks with a single ad hoc profiling hack.
That needs to be able to sleep a thread, so I added a portable way to do it.

This also removes a bunch of ENABLE flags for all of the old non-working hacks.

* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
(WTF::sleep):
* wtf/CurrentTime.h:
(WTF::sleepMS):
* wtf/Platform.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh">trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGArgumentsEliminationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGBackwardsPropagationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCFAPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCFAPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCFGSimplificationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCPSRethreadingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCSEPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCleanUpPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCleanUpPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGConstantFoldingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGConstantHoistingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGConstantHoistingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCriticalEdgeBreakingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCriticalEdgeBreakingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDCEPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGDCEPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDrivercpp">trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphcpp">trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGIntegerCheckCombiningPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGIntegerRangeOptimizationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGInvalidationPointInjectionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGInvalidationPointInjectionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGJITCompilercpp">trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGLICMPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGLiveCatchVariablePreservationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGLivenessAnalysisPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGLivenessAnalysisPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGLoopPreHeaderCreationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGMaximalFlushInsertionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGMovHintRemovalPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGMovHintRemovalPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGOSRAvailabilityAnalysisPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGOSREntrypointCreationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGOSRExitCompilercpp">trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGObjectAllocationSinkingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGOperationscpp">trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPhantomInsertionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPhantomInsertionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPlancpp">trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPredictionInjectionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPredictionPropagationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPutStackSinkingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSSAConversionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSSALoweringPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStackLayoutPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStaticExecutionCountEstimationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStoreBarrierInsertionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStoreBarrierInsertionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStrengthReductionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStructureAbstractValuecpp">trunk/Source/JavaScriptCore/dfg/DFGStructureAbstractValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStructureRegistrationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGTierUpCheckInjectionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGTypeCheckHoistingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGUnificationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGVarargsForwardingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGVirtualRegisterAllocationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGWatchpointCollectionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGWatchpointCollectionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredynbenchcpp">trunk/Source/JavaScriptCore/dynbench.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLOSRExitCompilercpp">trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLOutputcpp">trunk/Source/JavaScriptCore/ftl/FTLOutput.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLOutputh">trunk/Source/JavaScriptCore/ftl/FTLOutput.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapcpp">trunk/Source/JavaScriptCore/heap/Heap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMarkedBlockcpp">trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpreterh">trunk/Source/JavaScriptCore/interpreter/Interpreter.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitAssemblyHelperscpp">trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitAssemblyHelpersh">trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITcpp">trunk/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITh">trunk/Source/JavaScriptCore/jit/JIT.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITArithmeticcpp">trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITArithmetic32_64cpp">trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITCallcpp">trunk/Source/JavaScriptCore/jit/JITCall.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITCall32_64cpp">trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITPropertyAccesscpp">trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITPropertyAccess32_64cpp">trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejsccpp">trunk/Source/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserNodescpp">trunk/Source/JavaScriptCore/parser/Nodes.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserh">trunk/Source/JavaScriptCore/parser/Parser.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutableh">trunk/Source/JavaScriptCore/runtime/Executable.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeInitializeThreadingcpp">trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionsh">trunk/Source/JavaScriptCore/runtime/Options.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpCachedResulth">trunk/Source/JavaScriptCore/runtime/RegExpCachedResult.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpMatchesArrayh">trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStringPrototypecpp">trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMcpp">trunk/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMh">trunk/Source/JavaScriptCore/runtime/VM.h</a></li>
<li><a href="#trunkSourceJavaScriptCoretestRegExpcpp">trunk/Source/JavaScriptCore/testRegExp.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreyarrYarrInterpretercpp">trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfCurrentTimecpp">trunk/Source/WTF/wtf/CurrentTime.cpp</a></li>
<li><a href="#trunkSourceWTFwtfCurrentTimeh">trunk/Source/WTF/wtf/CurrentTime.h</a></li>
<li><a href="#trunkSourceWTFwtfPlatformh">trunk/Source/WTF/wtf/Platform.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioiosMediaSessionManagerIOSmm">trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeSuperSamplercpp">trunk/Source/JavaScriptCore/bytecode/SuperSampler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeSuperSamplerh">trunk/Source/JavaScriptCore/bytecode/SuperSampler.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeSamplingToolcpp">trunk/Source/JavaScriptCore/bytecode/SamplingTool.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeSamplingToolh">trunk/Source/JavaScriptCore/bytecode/SamplingTool.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -213,12 +213,12 @@
</span><span class="cx">     bytecode/PutByIdStatus.cpp
</span><span class="cx">     bytecode/PutByIdVariant.cpp
</span><span class="cx">     bytecode/ReduceWhitespace.cpp
</span><del>-    bytecode/SamplingTool.cpp
</del><span class="cx">     bytecode/SpecialPointer.cpp
</span><span class="cx">     bytecode/SpeculatedType.cpp
</span><span class="cx">     bytecode/StructureSet.cpp
</span><span class="cx">     bytecode/StructureStubClearingWatchpoint.cpp
</span><span class="cx">     bytecode/StructureStubInfo.cpp
</span><ins>+    bytecode/SuperSampler.cpp
</ins><span class="cx">     bytecode/ToThisStatus.cpp
</span><span class="cx">     bytecode/TrackedReferences.cpp
</span><span class="cx">     bytecode/UnlinkedCodeBlock.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1,3 +1,274 @@
</span><ins>+2016-03-17  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
+        https://bugs.webkit.org/show_bug.cgi?id=155561
+
+        Reviewed by Saam Barati.
+
+        A VM needs some internal profiling hacks in addition to the profiler(s) that the user sees, because
+        you can squeeze out more fidelity if you're willing to make some kind of deal with the devil. Prior
+        to this change JSC had a bunch of these:
+
+        - CodeBlock sampling profiler
+        - Bytecode sampling profiler
+        - Sampling flags
+        - Sampling regions
+        - Some other stuff
+
+        I tried using these recently. They didn't even build. Initially I fixed that, but then I found that
+        these profilers had some serious bugs that made them report bogus results - like underreporting the
+        time spent in regions of code by more than 2x.
+
+        Part of the problem here is that a profiler loses fidelity as it gains power. The more general it
+        tries to be, the more code gets executed on the hot path for the profiler, which increasingly
+        perturbs the results. I believe that's the reason for the underreporting - code ran sufficiently
+        slower, and in a sufficiently different way when profiling, that the results were just wrong.
+
+        This change attacks this problem directly by replacing all of the diverse profiling hacks with just
+        one, which I call the SuperSampler. It consists of exactly one counter. When enabled, the sampler
+        will periodically print (via dataLog()) the percentage of samples that saw a non-zero count. Because
+        it's so simple, it gives better accuracy. This comes about in two ways:
+
+        - It runs at a lower rate. That's fine since it's only checking one flag. You don't need a high rate
+          for just one flag.
+        
+        - The fact that there is only *one* flag means that the user must choose a hypothesis about what is
+          slow. This turns the problem of profiling into a hypothesis testing problem, which is an inherently
+          less flaky kind of experiment to run.
+        
+        The SuperSampler is enabled with a runtime flag rather than a compile-time flag, so it's much less
+        likely to break. That also means that you can enable it without rebuilding the universe. The old
+        samplers all had ENABLE flags in Platform.h, which was rather unfortunate for compile times.
+
+        SuperSampler supports both JIT and C++ users. C++ users should use SuperSamplerScope. The default
+        idiom is to create one and pass &quot;true&quot; to it. You can disable a scope by passing &quot;false&quot; instead.
+        This patch puts a bunch of scopes in places I care about. I think it's probably OK if people check in
+        these deactivated scopes. That makes it convenient to retest things we've tested previously.
+
+        * CMakeLists.txt:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * bytecode/SamplingTool.cpp: Removed.
+        * bytecode/SamplingTool.h: Removed.
+        * bytecode/SuperSampler.cpp: Added.
+        (JSC::initializeSuperSampler):
+        (JSC::printSuperSamplerState):
+        * bytecode/SuperSampler.h: Added.
+        (JSC::SuperSamplerScope::SuperSamplerScope):
+        (JSC::SuperSamplerScope::~SuperSamplerScope):
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::generate):
+        * bytecompiler/NodesCodegen.cpp:
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::forAllValues):
+        (JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::clobberStructures):
+        * dfg/DFGArgumentsEliminationPhase.cpp:
+        (JSC::DFG::performArgumentsElimination):
+        * dfg/DFGBackwardsPropagationPhase.cpp:
+        (JSC::DFG::performBackwardsPropagation):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::parse):
+        * dfg/DFGCFAPhase.cpp:
+        (JSC::DFG::performCFA):
+        * dfg/DFGCFGSimplificationPhase.cpp:
+        (JSC::DFG::performCFGSimplification):
+        * dfg/DFGCPSRethreadingPhase.cpp:
+        (JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
+        (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlocks):
+        (JSC::DFG::CPSRethreadingPhase::propagatePhis):
+        (JSC::DFG::performCPSRethreading):
+        * dfg/DFGCSEPhase.cpp:
+        (JSC::DFG::performLocalCSE):
+        (JSC::DFG::performGlobalCSE):
+        * dfg/DFGCleanUpPhase.cpp:
+        (JSC::DFG::performCleanUp):
+        * dfg/DFGConstantFoldingPhase.cpp:
+        (JSC::DFG::performConstantFolding):
+        * dfg/DFGConstantHoistingPhase.cpp:
+        (JSC::DFG::performConstantHoisting):
+        * dfg/DFGCriticalEdgeBreakingPhase.cpp:
+        (JSC::DFG::performCriticalEdgeBreaking):
+        * dfg/DFGDCEPhase.cpp:
+        (JSC::DFG::performDCE):
+        * dfg/DFGDriver.cpp:
+        (JSC::DFG::compileImpl):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::performFixup):
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::dethread):
+        * dfg/DFGIntegerCheckCombiningPhase.cpp:
+        (JSC::DFG::performIntegerCheckCombining):
+        * dfg/DFGIntegerRangeOptimizationPhase.cpp:
+        (JSC::DFG::performIntegerRangeOptimization):
+        * dfg/DFGInvalidationPointInjectionPhase.cpp:
+        (JSC::DFG::performInvalidationPointInjection):
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::compile):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * dfg/DFGLICMPhase.cpp:
+        (JSC::DFG::performLICM):
+        * dfg/DFGLiveCatchVariablePreservationPhase.cpp:
+        (JSC::DFG::performLiveCatchVariablePreservationPhase):
+        * dfg/DFGLivenessAnalysisPhase.cpp:
+        (JSC::DFG::performLivenessAnalysis):
+        * dfg/DFGLoopPreHeaderCreationPhase.cpp:
+        (JSC::DFG::performLoopPreHeaderCreation):
+        * dfg/DFGMaximalFlushInsertionPhase.cpp:
+        (JSC::DFG::performMaximalFlushInsertion):
+        * dfg/DFGMovHintRemovalPhase.cpp:
+        (JSC::DFG::performMovHintRemoval):
+        * dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
+        (JSC::DFG::performOSRAvailabilityAnalysis):
+        * dfg/DFGOSREntrypointCreationPhase.cpp:
+        (JSC::DFG::performOSREntrypointCreation):
+        * dfg/DFGOSRExitCompiler.cpp:
+        * dfg/DFGObjectAllocationSinkingPhase.cpp:
+        (JSC::DFG::performObjectAllocationSinking):
+        * dfg/DFGOperations.cpp:
+        * dfg/DFGPhantomInsertionPhase.cpp:
+        (JSC::DFG::performPhantomInsertion):
+        * dfg/DFGPlan.cpp:
+        (JSC::DFG::Plan::compileInThread):
+        * dfg/DFGPredictionInjectionPhase.cpp:
+        (JSC::DFG::performPredictionInjection):
+        * dfg/DFGPredictionPropagationPhase.cpp:
+        (JSC::DFG::performPredictionPropagation):
+        * dfg/DFGPutStackSinkingPhase.cpp:
+        (JSC::DFG::performPutStackSinking):
+        * dfg/DFGSSAConversionPhase.cpp:
+        (JSC::DFG::performSSAConversion):
+        * dfg/DFGSSALoweringPhase.cpp:
+        (JSC::DFG::performSSALowering):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGStackLayoutPhase.cpp:
+        (JSC::DFG::performStackLayout):
+        * dfg/DFGStaticExecutionCountEstimationPhase.cpp:
+        (JSC::DFG::performStaticExecutionCountEstimation):
+        * dfg/DFGStoreBarrierInsertionPhase.cpp:
+        (JSC::DFG::performFastStoreBarrierInsertion):
+        (JSC::DFG::performGlobalStoreBarrierInsertion):
+        * dfg/DFGStrengthReductionPhase.cpp:
+        (JSC::DFG::performStrengthReduction):
+        * dfg/DFGStructureAbstractValue.cpp:
+        (JSC::DFG::StructureAbstractValue::assertIsRegistered):
+        (JSC::DFG::StructureAbstractValue::clobber):
+        (JSC::DFG::StructureAbstractValue::observeTransition):
+        (JSC::DFG::StructureAbstractValue::observeTransitions):
+        (JSC::DFG::StructureAbstractValue::add):
+        (JSC::DFG::StructureAbstractValue::merge):
+        (JSC::DFG::StructureAbstractValue::mergeSlow):
+        (JSC::DFG::StructureAbstractValue::mergeNotTop):
+        (JSC::DFG::StructureAbstractValue::filter):
+        (JSC::DFG::StructureAbstractValue::filterSlow):
+        (JSC::DFG::StructureAbstractValue::contains):
+        (JSC::DFG::StructureAbstractValue::isSubsetOf):
+        (JSC::DFG::StructureAbstractValue::isSupersetOf):
+        (JSC::DFG::StructureAbstractValue::overlaps):
+        (JSC::DFG::StructureAbstractValue::equalsSlow):
+        * dfg/DFGStructureRegistrationPhase.cpp:
+        (JSC::DFG::performStructureRegistration):
+        * dfg/DFGTierUpCheckInjectionPhase.cpp:
+        (JSC::DFG::performTierUpCheckInjection):
+        * dfg/DFGTypeCheckHoistingPhase.cpp:
+        (JSC::DFG::performTypeCheckHoisting):
+        * dfg/DFGUnificationPhase.cpp:
+        (JSC::DFG::performUnification):
+        * dfg/DFGVarargsForwardingPhase.cpp:
+        (JSC::DFG::performVarargsForwarding):
+        * dfg/DFGVirtualRegisterAllocationPhase.cpp:
+        (JSC::DFG::performVirtualRegisterAllocation):
+        * dfg/DFGWatchpointCollectionPhase.cpp:
+        (JSC::DFG::performWatchpointCollection):
+        * dynbench.cpp:
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileRegExpExec):
+        (JSC::FTL::DFG::LowerDFGToB3::compileRegExpTest):
+        (JSC::FTL::DFG::LowerDFGToB3::compileStringReplace):
+        (JSC::FTL::DFG::LowerDFGToB3::compileGetRegExpObjectLastIndex):
+        * ftl/FTLOSRExitCompiler.cpp:
+        (JSC::FTL::compileFTLOSRExit):
+        * ftl/FTLOutput.cpp:
+        (JSC::FTL::Output::store):
+        (JSC::FTL::Output::absolute):
+        (JSC::FTL::Output::incrementSuperSamplerCount):
+        (JSC::FTL::Output::decrementSuperSamplerCount):
+        * ftl/FTLOutput.h:
+        (JSC::FTL::Output::baseIndex):
+        (JSC::FTL::Output::load8SignExt32):
+        (JSC::FTL::Output::load8ZeroExt32):
+        (JSC::FTL::Output::anchor):
+        (JSC::FTL::Output::absolute): Deleted.
+        * heap/Heap.cpp:
+        (JSC::Heap::markRoots):
+        (JSC::Heap::collectAndSweep):
+        (JSC::Heap::collectImpl):
+        (JSC::Heap::zombifyDeadObjects):
+        * heap/MarkedBlock.cpp:
+        (JSC::MarkedBlock::specializedSweep):
+        * interpreter/Interpreter.cpp:
+        (JSC::setupVarargsFrameAndSetThis):
+        (JSC::Interpreter::Interpreter):
+        (JSC::Interpreter::initialize):
+        (JSC::checkedReturn):
+        (JSC::Interpreter::execute):
+        (JSC::Interpreter::executeCall):
+        (JSC::Interpreter::executeConstruct):
+        (JSC::Interpreter::debug):
+        (JSC::SamplingScope::SamplingScope): Deleted.
+        (JSC::SamplingScope::~SamplingScope): Deleted.
+        (JSC::Interpreter::enableSampler): Deleted.
+        (JSC::Interpreter::dumpSampleData): Deleted.
+        (JSC::Interpreter::startSampling): Deleted.
+        (JSC::Interpreter::stopSampling): Deleted.
+        * interpreter/Interpreter.h:
+        (JSC::Interpreter::isCallBytecode):
+        (JSC::Interpreter::sampler): Deleted.
+        * jit/AssemblyHelpers.cpp:
+        (JSC::AssemblyHelpers::branchIfNotFastTypedArray):
+        (JSC::AssemblyHelpers::incrementSuperSamplerCount):
+        (JSC::AssemblyHelpers::decrementSuperSamplerCount):
+        (JSC::AssemblyHelpers::purifyNaN):
+        * jit/AssemblyHelpers.h:
+        * jit/JIT.cpp:
+        * jit/JIT.h:
+        * jit/JITArithmetic.cpp:
+        * jit/JITArithmetic32_64.cpp:
+        * jit/JITCall.cpp:
+        * jit/JITCall32_64.cpp:
+        * jit/JITOperations.cpp:
+        * jit/JITPropertyAccess.cpp:
+        * jit/JITPropertyAccess32_64.cpp:
+        * jsc.cpp:
+        (runWithScripts):
+        (jscmain):
+        * parser/Nodes.cpp:
+        * parser/Parser.h:
+        (JSC::parse):
+        * runtime/Executable.h:
+        * runtime/InitializeThreading.cpp:
+        (JSC::initializeThreading):
+        * runtime/Options.h:
+        * runtime/RegExpCachedResult.h:
+        * runtime/RegExpMatchesArray.h:
+        (JSC::createRegExpMatchesArray):
+        * runtime/StringPrototype.cpp:
+        (JSC::removeUsingRegExpSearch):
+        (JSC::stringProtoFuncSubstring):
+        * runtime/VM.cpp:
+        (JSC::VM::resetDateCache):
+        (JSC::VM::whenIdle):
+        (JSC::VM::deleteAllCode):
+        (JSC::VM::addSourceProviderCache):
+        (JSC::VM::startSampling): Deleted.
+        (JSC::VM::stopSampling): Deleted.
+        (JSC::VM::dumpSampleData): Deleted.
+        * runtime/VM.h:
+        (JSC::VM::regExpCache):
+        * testRegExp.cpp:
+        (runFromFiles):
+        * yarr/YarrInterpreter.cpp:
+        (JSC::Yarr::interpret):
+
</ins><span class="cx"> 2016-03-17  Saam barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES6] Make GetProperty(.) inside ArrayPrototype.cpp spec compatible.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -376,6 +376,8 @@
</span><span class="cx">                 0F485329187DFDEC0083B687 /* FTLRecoveryOpcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F485325187DFDEC0083B687 /* FTLRecoveryOpcode.cpp */; };
</span><span class="cx">                 0F48532A187DFDEC0083B687 /* FTLRecoveryOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F485326187DFDEC0083B687 /* FTLRecoveryOpcode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F493AF816D0CAD10084508B /* SourceProvider.cpp */; };
</span><ins>+                0F4A38F91C8E13DF00190318 /* SuperSampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4A38F71C8E13DF00190318 /* SuperSampler.cpp */; };
+                0F4A38FA1C8E13DF00190318 /* SuperSampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4A38F81C8E13DF00190318 /* SuperSampler.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F4B94DC17B9F07500DD03A4 /* TypedArrayInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F4C91661C29F4F2004341A6 /* B3OriginDump.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4C91651C29F4F2004341A6 /* B3OriginDump.h */; };
</span><span class="cx">                 0F4DE1CE1C4C1B54004D6C11 /* AirFixObviousSpills.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4DE1CC1C4C1B54004D6C11 /* AirFixObviousSpills.cpp */; };
</span><span class="lines">@@ -988,8 +990,6 @@
</span><span class="cx">                 1429D77C0ED20D7300B89619 /* Interpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1429D77B0ED20D7300B89619 /* Interpreter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1429D7D40ED2128200B89619 /* Interpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D7D30ED2128200B89619 /* Interpreter.cpp */; };
</span><span class="cx">                 1429D8780ED21ACD00B89619 /* ExceptionHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D8770ED21ACD00B89619 /* ExceptionHelpers.cpp */; };
</span><del>-                1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D8830ED21C3D00B89619 /* SamplingTool.cpp */; };
-                1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1429D8840ED21C3D00B89619 /* SamplingTool.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D8DB0ED2205B00B89619 /* CallFrame.cpp */; };
</span><span class="cx">                 1429D8DE0ED2205B00B89619 /* CallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1429D8DC0ED2205B00B89619 /* CallFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1429D92F0ED22D7000B89619 /* JIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D92D0ED22D7000B89619 /* JIT.cpp */; };
</span><span class="lines">@@ -2530,6 +2530,8 @@
</span><span class="cx">                 0F485325187DFDEC0083B687 /* FTLRecoveryOpcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLRecoveryOpcode.cpp; path = ftl/FTLRecoveryOpcode.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F485326187DFDEC0083B687 /* FTLRecoveryOpcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLRecoveryOpcode.h; path = ftl/FTLRecoveryOpcode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F493AF816D0CAD10084508B /* SourceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F4A38F71C8E13DF00190318 /* SuperSampler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SuperSampler.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4A38F81C8E13DF00190318 /* SuperSampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuperSampler.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayInlines.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F4C91651C29F4F2004341A6 /* B3OriginDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3OriginDump.h; path = b3/B3OriginDump.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F4DE1CC1C4C1B54004D6C11 /* AirFixObviousSpills.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirFixObviousSpills.cpp; path = b3/air/AirFixObviousSpills.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3124,8 +3126,6 @@
</span><span class="cx">                 1429D7D30ED2128200B89619 /* Interpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Interpreter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1429D85B0ED218E900B89619 /* JSStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStack.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1429D8770ED21ACD00B89619 /* ExceptionHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExceptionHelpers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1429D8830ED21C3D00B89619 /* SamplingTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SamplingTool.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1429D8840ED21C3D00B89619 /* SamplingTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplingTool.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1429D8DB0ED2205B00B89619 /* CallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallFrame.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1429D8DC0ED2205B00B89619 /* CallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CallFrame.h; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
</span><span class="cx">                 1429D92D0ED22D7000B89619 /* JIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JIT.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -6576,8 +6576,6 @@
</span><span class="cx">                                 0F9FC8C114E1B5FB00D52AE0 /* PutKind.h */,
</span><span class="cx">                                 0FF60ABF16740F8100029779 /* ReduceWhitespace.cpp */,
</span><span class="cx">                                 0FF60AC016740F8100029779 /* ReduceWhitespace.h */,
</span><del>-                                1429D8830ED21C3D00B89619 /* SamplingTool.cpp */,
-                                1429D8840ED21C3D00B89619 /* SamplingTool.h */,
</del><span class="cx">                                 0F5541AF1613C1FB00CE3E25 /* SpecialPointer.cpp */,
</span><span class="cx">                                 0F5541B01613C1FB00CE3E25 /* SpecialPointer.h */,
</span><span class="cx">                                 0FD82E84141F3FDA00179C94 /* SpeculatedType.cpp */,
</span><span class="lines">@@ -6588,6 +6586,8 @@
</span><span class="cx">                                 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */,
</span><span class="cx">                                 BCCF0D0B0EF0B8A500413C8F /* StructureStubInfo.cpp */,
</span><span class="cx">                                 BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */,
</span><ins>+                                0F4A38F71C8E13DF00190318 /* SuperSampler.cpp */,
+                                0F4A38F81C8E13DF00190318 /* SuperSampler.h */,
</ins><span class="cx">                                 0F2D4DE519832DAC007D4B19 /* ToThisStatus.cpp */,
</span><span class="cx">                                 0F2D4DE619832DAC007D4B19 /* ToThisStatus.h */,
</span><span class="cx">                                 0F952ABA1B487A7700C367C5 /* TrackedReferences.cpp */,
</span><span class="lines">@@ -7854,6 +7854,7 @@
</span><span class="cx">                                 0FB387901BFBC44D00E3AB1E /* AirOptimizeBlockOrder.h in Headers */,
</span><span class="cx">                                 0FF729BA166AD360000F5BA3 /* ProfilerCompilation.h in Headers */,
</span><span class="cx">                                 0FF729BB166AD360000F5BA3 /* ProfilerCompilationKind.h in Headers */,
</span><ins>+                                0F4A38FA1C8E13DF00190318 /* SuperSampler.h in Headers */,
</ins><span class="cx">                                 0FF729BC166AD360000F5BA3 /* ProfilerCompiledBytecode.h in Headers */,
</span><span class="cx">                                 0FF729BD166AD360000F5BA3 /* ProfilerDatabase.h in Headers */,
</span><span class="cx">                                 0FF729BE166AD360000F5BA3 /* ProfilerExecutionCounter.h in Headers */,
</span><span class="lines">@@ -7913,7 +7914,6 @@
</span><span class="cx">                                 70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */,
</span><span class="cx">                                 52C0611F1AA51E1C00B4ADBA /* RuntimeType.h in Headers */,
</span><span class="cx">                                 C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */,
</span><del>-                                1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */,
</del><span class="cx">                                 0FE050281AA9095600D33B33 /* ScopedArguments.h in Headers */,
</span><span class="cx">                                 0FE050291AA9095600D33B33 /* ScopedArgumentsTable.h in Headers */,
</span><span class="cx">                                 0FE0502B1AA9095600D33B33 /* ScopeOffset.h in Headers */,
</span><span class="lines">@@ -9069,6 +9069,7 @@
</span><span class="cx">                                 FE384EE71ADDB7AD0055DE2C /* JSDollarVMPrototype.cpp in Sources */,
</span><span class="cx">                                 147F39D7107EC37600427A48 /* JSEnvironmentRecord.cpp in Sources */,
</span><span class="cx">                                 140566D6107EC271005DBC8D /* JSFunction.cpp in Sources */,
</span><ins>+                                0F4A38F91C8E13DF00190318 /* SuperSampler.cpp in Sources */,
</ins><span class="cx">                                 797E07A91B8FCFB9008400BA /* JSGlobalLexicalEnvironment.cpp in Sources */,
</span><span class="cx">                                 147F39D2107EC37600427A48 /* JSGlobalObject.cpp in Sources */,
</span><span class="cx">                                 A5FD0085189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp in Sources */,
</span><span class="lines">@@ -9261,7 +9262,6 @@
</span><span class="cx">                                 0F6B8AD81C4EDDA200969052 /* B3DuplicateTails.cpp in Sources */,
</span><span class="cx">                                 527773DE1AAF83AC00BDE7E8 /* RuntimeType.cpp in Sources */,
</span><span class="cx">                                 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */,
</span><del>-                                1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */,
</del><span class="cx">                                 0FE050271AA9095600D33B33 /* ScopedArguments.cpp in Sources */,
</span><span class="cx">                                 0FE0502F1AAA806900D33B33 /* ScopedArgumentsTable.cpp in Sources */,
</span><span class="cx">                                 992ABCF91BEA9BD2006403A0 /* RemoteAutomationTarget.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeSamplingToolcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/bytecode/SamplingTool.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/SamplingTool.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/bytecode/SamplingTool.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1,479 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009, 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;SamplingTool.h&quot;
-
-#include &quot;CodeBlock.h&quot;
-#include &quot;Interpreter.h&quot;
-#include &quot;Opcode.h&quot;
-#include &quot;JSCInlines.h&quot;
-
-#if !OS(WINDOWS)
-#include &lt;unistd.h&gt;
-#endif
-
-namespace JSC {
-
-#if ENABLE(SAMPLING_FLAGS)
-
-void SamplingFlags::sample()
-{
-    uint32_t mask = static_cast&lt;uint32_t&gt;(1 &lt;&lt; 31);
-    unsigned index;
-
-    for (index = 0; index &lt; 32; ++index) {
-        if (mask &amp; s_flags)
-            break;
-        mask &gt;&gt;= 1;
-    }
-
-    s_flagCounts[32 - index]++;
-}
-
-void SamplingFlags::start()
-{
-    for (unsigned i = 0; i &lt;= 32; ++i)
-        s_flagCounts[i] = 0;
-}
-void SamplingFlags::stop()
-{
-    uint64_t total = 0;
-    for (unsigned i = 0; i &lt;= 32; ++i)
-        total += s_flagCounts[i];
-
-    if (total) {
-        dataLogF(&quot;\nSamplingFlags: sample counts with flags set: (%lld total)\n&quot;, total);
-        for (unsigned i = 0; i &lt;= 32; ++i) {
-            if (s_flagCounts[i])
-                dataLogF(&quot;  [ %02d ] : %lld\t\t(%03.2f%%)\n&quot;, i, s_flagCounts[i], (100.0 * s_flagCounts[i]) / total);
-        }
-        dataLogF(&quot;\n&quot;);
-    } else
-    dataLogF(&quot;\nSamplingFlags: no samples.\n\n&quot;);
-}
-uint64_t SamplingFlags::s_flagCounts[33];
-
-#else
-void SamplingFlags::start() {}
-void SamplingFlags::stop() {}
-#endif
-
-#if ENABLE(SAMPLING_REGIONS)
-volatile uintptr_t SamplingRegion::s_currentOrReserved;
-Spectrum&lt;const char*&gt;* SamplingRegion::s_spectrum;
-unsigned long SamplingRegion::s_noneOfTheAbove;
-unsigned SamplingRegion::s_numberOfSamplesSinceDump;
-
-SamplingRegion::Locker::Locker()
-{
-    uintptr_t previous;
-    while (true) {
-        previous = s_currentOrReserved;
-        if (previous &amp; 1) {
-#if OS(UNIX)
-            sched_yield();
-#endif
-            continue;
-        }
-        if (WTF::weakCompareAndSwapUIntPtr(&amp;s_currentOrReserved, previous, previous | 1))
-            break;
-    }
-}
-
-SamplingRegion::Locker::~Locker()
-{
-    // We don't need the CAS, but we do it out of an
-    // abundance of caution (and because it gives us a memory fence, which is
-    // never bad).
-    uintptr_t previous;
-    do {
-        previous = s_currentOrReserved;
-    } while (!WTF::weakCompareAndSwapUIntPtr(&amp;s_currentOrReserved, previous, previous &amp; ~1));
-}
-
-void SamplingRegion::sample()
-{
-    // Make sure we lock s_current.
-    Locker locker;
-    
-    // Create a spectrum if we don't have one already.
-    if (!s_spectrum)
-        s_spectrum = new Spectrum&lt;const char*&gt;();
-    
-    ASSERT(s_currentOrReserved &amp; 1);
-    
-    // Walk the region stack, and record each region we see.
-    SamplingRegion* region = bitwise_cast&lt;SamplingRegion*&gt;(s_currentOrReserved &amp; ~1);
-    if (region) {
-        for (; region; region = region-&gt;m_previous)
-            s_spectrum-&gt;add(region-&gt;m_name);
-    } else
-        s_noneOfTheAbove++;
-    
-    if (s_numberOfSamplesSinceDump++ == SamplingThread::s_hertz) {
-        s_numberOfSamplesSinceDump = 0;
-        dumpInternal();
-    }
-}
-
-void SamplingRegion::dump()
-{
-    Locker locker;
-    
-    dumpInternal();
-}
-
-void SamplingRegion::dumpInternal()
-{
-    if (!s_spectrum) {
-        dataLogF(&quot;\nSamplingRegion: was never sampled.\n\n&quot;);
-        return;
-    }
-    
-    Vector&lt;Spectrum&lt;const char*&gt;::KeyAndCount&gt; list = s_spectrum-&gt;buildList();
-    
-    unsigned long total = s_noneOfTheAbove;
-    for (unsigned i = list.size(); i--;)
-        total += list[i].count;
-    
-    dataLogF(&quot;\nSamplingRegion: sample counts for regions: (%lu samples)\n&quot;, total);
-
-    for (unsigned i = list.size(); i--;)
-        dataLogF(&quot;    %3.2lf%%  %s\n&quot;, (100.0 * list[i].count) / total, list[i].key);
-}
-#else // ENABLE(SAMPLING_REGIONS)
-void SamplingRegion::dump() { }
-#endif // ENABLE(SAMPLING_REGIONS)
-
-/*
-  Start with flag 16 set.
-  By doing this the monitoring of lower valued flags will be masked out
-  until flag 16 is explictly cleared.
-*/
-uint32_t SamplingFlags::s_flags = 1 &lt;&lt; 15;
-
-
-#if OS(WINDOWS)
-
-static void sleepForMicroseconds(unsigned us)
-{
-    unsigned ms = us / 1000;
-    if (us &amp;&amp; !ms)
-        ms = 1;
-    Sleep(ms);
-}
-
-#else 
-
-static void sleepForMicroseconds(unsigned us)
-{
-    usleep(us);
-}
-
-#endif
-
-static inline unsigned hertz2us(unsigned hertz)
-{
-    return 1000000 / hertz;
-}
-
-
-SamplingTool* SamplingTool::s_samplingTool = 0;
-
-
-bool SamplingThread::s_running = false;
-unsigned SamplingThread::s_hertz = 10000;
-ThreadIdentifier SamplingThread::s_samplingThread;
-
-void SamplingThread::threadStartFunc(void*)
-{
-    while (s_running) {
-        sleepForMicroseconds(hertz2us(s_hertz));
-
-#if ENABLE(SAMPLING_FLAGS)
-        SamplingFlags::sample();
-#endif
-#if ENABLE(SAMPLING_REGIONS)
-        SamplingRegion::sample();
-#endif
-#if ENABLE(OPCODE_SAMPLING)
-        SamplingTool::sample();
-#endif
-    }
-}
-
-
-void SamplingThread::start(unsigned hertz)
-{
-    ASSERT(!s_running);
-    s_running = true;
-    s_hertz = hertz;
-
-    s_samplingThread = createThread(threadStartFunc, 0, &quot;JavaScriptCore::Sampler&quot;);
-}
-
-void SamplingThread::stop()
-{
-    ASSERT(s_running);
-    s_running = false;
-    waitForThreadCompletion(s_samplingThread);
-}
-
-
-void ScriptSampleRecord::sample(CodeBlock* codeBlock, Instruction* vPC)
-{
-    if (!m_samples) {
-        m_size = codeBlock-&gt;instructions().size();
-        m_samples = static_cast&lt;int*&gt;(calloc(m_size, sizeof(int)));
-        m_codeBlock = codeBlock;
-    }
-
-    ++m_sampleCount;
-
-    unsigned offest = vPC - codeBlock-&gt;instructions().begin();
-    // Since we don't read and write codeBlock and vPC atomically, this check
-    // can fail if we sample mid op_call / op_ret.
-    if (offest &lt; m_size) {
-        m_samples[offest]++;
-        m_opcodeSampleCount++;
-    }
-}
-
-void SamplingTool::doRun()
-{
-    Sample sample(m_sample, m_codeBlock);
-    ++m_sampleCount;
-
-    if (sample.isNull())
-        return;
-
-    if (!sample.inHostFunction()) {
-        unsigned opcodeID = m_interpreter-&gt;getOpcodeID(sample.vPC()[0].u.opcode);
-
-        ++m_opcodeSampleCount;
-        ++m_opcodeSamples[opcodeID];
-
-        if (sample.inCTIFunction())
-            m_opcodeSamplesInCTIFunctions[opcodeID]++;
-    }
-
-#if ENABLE(CODEBLOCK_SAMPLING)
-    if (CodeBlock* codeBlock = sample.codeBlock()) {
-        LockHolder locker(m_scriptSampleMapMutex);
-        ScriptSampleRecord* record = m_scopeSampleMap-&gt;get(codeBlock-&gt;ownerExecutable());
-        ASSERT(record);
-        record-&gt;sample(codeBlock, sample.vPC());
-    }
-#endif
-}
-
-void SamplingTool::sample()
-{
-    s_samplingTool-&gt;doRun();
-}
-
-void SamplingTool::notifyOfScope(VM&amp; vm, ScriptExecutable* script)
-{
-#if ENABLE(CODEBLOCK_SAMPLING)
-    LockHolder locker(m_scriptSampleMapMutex);
-    m_scopeSampleMap-&gt;set(script, adoptPtr(new ScriptSampleRecord(vm, script)));
-#else
-    UNUSED_PARAM(vm);
-    UNUSED_PARAM(script);
-#endif
-}
-
-void SamplingTool::setup()
-{
-    s_samplingTool = this;
-}
-
-#if ENABLE(OPCODE_SAMPLING)
-
-struct OpcodeSampleInfo {
-    OpcodeID opcode;
-    long long count;
-    long long countInCTIFunctions;
-};
-
-struct LineCountInfo {
-    unsigned line;
-    unsigned count;
-};
-
-static int compareOpcodeIndicesSampling(const void* left, const void* right)
-{
-    const OpcodeSampleInfo* leftSampleInfo = reinterpret_cast&lt;const OpcodeSampleInfo*&gt;(left);
-    const OpcodeSampleInfo* rightSampleInfo = reinterpret_cast&lt;const OpcodeSampleInfo*&gt;(right);
-
-    return (leftSampleInfo-&gt;count &lt; rightSampleInfo-&gt;count) ? 1 : (leftSampleInfo-&gt;count &gt; rightSampleInfo-&gt;count) ? -1 : 0;
-}
-
-#if ENABLE(CODEBLOCK_SAMPLING)
-static int compareLineCountInfoSampling(const void* left, const void* right)
-{
-    const LineCountInfo* leftLineCount = reinterpret_cast&lt;const LineCountInfo*&gt;(left);
-    const LineCountInfo* rightLineCount = reinterpret_cast&lt;const LineCountInfo*&gt;(right);
-
-    return (leftLineCount-&gt;line &gt; rightLineCount-&gt;line) ? 1 : (leftLineCount-&gt;line &lt; rightLineCount-&gt;line) ? -1 : 0;
-}
-
-static int compareScriptSampleRecords(const void* left, const void* right)
-{
-    const ScriptSampleRecord* const leftValue = *static_cast&lt;const ScriptSampleRecord* const *&gt;(left);
-    const ScriptSampleRecord* const rightValue = *static_cast&lt;const ScriptSampleRecord* const *&gt;(right);
-
-    return (leftValue-&gt;m_sampleCount &lt; rightValue-&gt;m_sampleCount) ? 1 : (leftValue-&gt;m_sampleCount &gt; rightValue-&gt;m_sampleCount) ? -1 : 0;
-}
-#endif
-
-void SamplingTool::dump(ExecState* exec)
-{
-    // Tidies up SunSpider output by removing short scripts - such a small number of samples would likely not be useful anyhow.
-    if (m_sampleCount &lt; 10)
-        return;
-    
-    // (1) Build and sort 'opcodeSampleInfo' array.
-
-    OpcodeSampleInfo opcodeSampleInfo[numOpcodeIDs];
-    for (int i = 0; i &lt; numOpcodeIDs; ++i) {
-        opcodeSampleInfo[i].opcode = static_cast&lt;OpcodeID&gt;(i);
-        opcodeSampleInfo[i].count = m_opcodeSamples[i];
-        opcodeSampleInfo[i].countInCTIFunctions = m_opcodeSamplesInCTIFunctions[i];
-    }
-
-    qsort(opcodeSampleInfo, numOpcodeIDs, sizeof(OpcodeSampleInfo), compareOpcodeIndicesSampling);
-
-    // (2) Print Opcode sampling results.
-
-    dataLogF(&quot;\nBytecode samples [*]\n&quot;);
-    dataLogF(&quot;                             sample   %% of       %% of     |   cti     cti %%\n&quot;);
-    dataLogF(&quot;opcode                       count     VM        total    |  count   of self\n&quot;);
-    dataLogF(&quot;-------------------------------------------------------   |  ----------------\n&quot;);
-
-    for (int i = 0; i &lt; numOpcodeIDs; ++i) {
-        long long count = opcodeSampleInfo[i].count;
-        if (!count)
-            continue;
-
-        OpcodeID opcodeID = opcodeSampleInfo[i].opcode;
-        
-        const char* opcodeName = opcodeNames[opcodeID];
-        const char* opcodePadding = padOpcodeName(opcodeID, 28);
-        double percentOfVM = (static_cast&lt;double&gt;(count) * 100) / m_opcodeSampleCount;
-        double percentOfTotal = (static_cast&lt;double&gt;(count) * 100) / m_sampleCount;
-        long long countInCTIFunctions = opcodeSampleInfo[i].countInCTIFunctions;
-        double percentInCTIFunctions = (static_cast&lt;double&gt;(countInCTIFunctions) * 100) / count;
-        debugDebugPrintf(&quot;%s:%s%-6lld %.3f%%\t%.3f%%\t  |   %-6lld %.3f%%\n&quot;, opcodeName, opcodePadding, count, percentOfVM, percentOfTotal, countInCTIFunctions, percentInCTIFunctions);
-    }
-    
-    dataLogF(&quot;\n[*] Samples inside host code are not charged to any Bytecode.\n\n&quot;);
-    dataLogF(&quot;\tSamples inside VM:\t\t%lld / %lld (%.3f%%)\n&quot;, m_opcodeSampleCount, m_sampleCount, (static_cast&lt;double&gt;(m_opcodeSampleCount) * 100) / m_sampleCount);
-    dataLogF(&quot;\tSamples inside host code:\t%lld / %lld (%.3f%%)\n\n&quot;, m_sampleCount - m_opcodeSampleCount, m_sampleCount, (static_cast&lt;double&gt;(m_sampleCount - m_opcodeSampleCount) * 100) / m_sampleCount);
-    dataLogF(&quot;\tsample count:\tsamples inside this opcode\n&quot;);
-    dataLogF(&quot;\t%% of VM:\tsample count / all opcode samples\n&quot;);
-    dataLogF(&quot;\t%% of total:\tsample count / all samples\n&quot;);
-    dataLogF(&quot;\t--------------\n&quot;);
-    dataLogF(&quot;\tcti count:\tsamples inside a CTI function called by this opcode\n&quot;);
-    dataLogF(&quot;\tcti %% of self:\tcti count / sample count\n&quot;);
-    
-#if ENABLE(CODEBLOCK_SAMPLING)
-
-    // (3) Build and sort 'codeBlockSamples' array.
-
-    int scopeCount = m_scopeSampleMap-&gt;size();
-    Vector&lt;ScriptSampleRecord*&gt; codeBlockSamples(scopeCount);
-    ScriptSampleRecordMap::iterator iter = m_scopeSampleMap-&gt;begin();
-    for (int i = 0; i &lt; scopeCount; ++i, ++iter)
-        codeBlockSamples[i] = iter-&gt;value.get();
-
-    qsort(codeBlockSamples.begin(), scopeCount, sizeof(ScriptSampleRecord*), compareScriptSampleRecords);
-
-    // (4) Print data from 'codeBlockSamples' array.
-
-    dataLogF(&quot;\nCodeBlock samples\n\n&quot;); 
-
-    for (int i = 0; i &lt; scopeCount; ++i) {
-        ScriptSampleRecord* record = codeBlockSamples[i];
-        CodeBlock* codeBlock = record-&gt;m_codeBlock;
-
-        double blockPercent = (record-&gt;m_sampleCount * 100.0) / m_sampleCount;
-
-        if (blockPercent &gt;= 1) {
-            //Instruction* code = codeBlock-&gt;instructions().begin();
-            dataLogF(&quot;#%d: %s:%d: %d / %lld (%.3f%%)\n&quot;, i + 1, record-&gt;m_executable-&gt;sourceURL().utf8().data(), codeBlock-&gt;lineNumberForBytecodeOffset(0), record-&gt;m_sampleCount, m_sampleCount, blockPercent);
-            if (i &lt; 10) {
-                HashMap&lt;unsigned,unsigned&gt; lineCounts;
-                codeBlock-&gt;dump(exec);
-
-                dataLogF(&quot;    Opcode and line number samples [*]\n\n&quot;);
-                for (unsigned op = 0; op &lt; record-&gt;m_size; ++op) {
-                    int count = record-&gt;m_samples[op];
-                    if (count) {
-                        dataLogF(&quot;    [% 4d] has sample count: % 4d\n&quot;, op, count);
-                        unsigned line = codeBlock-&gt;lineNumberForBytecodeOffset(op);
-                        lineCounts.set(line, (lineCounts.contains(line) ? lineCounts.get(line) : 0) + count);
-                    }
-                }
-                dataLogF(&quot;\n&quot;);
-
-                int linesCount = lineCounts.size();
-                Vector&lt;LineCountInfo&gt; lineCountInfo(linesCount);
-                int lineno = 0;
-                for (HashMap&lt;unsigned,unsigned&gt;::iterator iter = lineCounts.begin(); iter != lineCounts.end(); ++iter, ++lineno) {
-                    lineCountInfo[lineno].line = iter-&gt;key;
-                    lineCountInfo[lineno].count = iter-&gt;value;
-                }
-
-                qsort(lineCountInfo.begin(), linesCount, sizeof(LineCountInfo), compareLineCountInfoSampling);
-
-                for (lineno = 0; lineno &lt; linesCount; ++lineno) {
-                    dataLogF(&quot;    Line #%d has sample count %d.\n&quot;, lineCountInfo[lineno].line, lineCountInfo[lineno].count);
-                }
-                dataLogF(&quot;\n&quot;);
-                dataLogF(&quot;    [*] Samples inside host code are charged to the calling Bytecode.\n&quot;);
-                dataLogF(&quot;        Samples on a call / return boundary are not charged to a specific opcode or line.\n\n&quot;);
-                dataLogF(&quot;            Samples on a call / return boundary: %d / %d (%.3f%%)\n\n&quot;, record-&gt;m_sampleCount - record-&gt;m_opcodeSampleCount, record-&gt;m_sampleCount, (static_cast&lt;double&gt;(record-&gt;m_sampleCount - record-&gt;m_opcodeSampleCount) * 100) / record-&gt;m_sampleCount);
-            }
-        }
-    }
-#else
-    UNUSED_PARAM(exec);
-#endif
-}
-
-#else
-
-void SamplingTool::dump(ExecState*)
-{
-}
-
-#endif
-
-} // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeSamplingToolh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/bytecode/SamplingTool.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/SamplingTool.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/bytecode/SamplingTool.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1,349 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2013, 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SamplingTool_h
-#define SamplingTool_h
-
-#include &quot;Strong.h&quot;
-#include &quot;Opcode.h&quot;
-#include &quot;SamplingCounter.h&quot;
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/Atomics.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/Lock.h&gt;
-#include &lt;wtf/MainThread.h&gt;
-#include &lt;wtf/Spectrum.h&gt;
-#include &lt;wtf/Threading.h&gt;
-
-namespace JSC {
-
-    class ScriptExecutable;
-
-    class SamplingFlags {
-    public:
-        JS_EXPORT_PRIVATE static void start();
-        JS_EXPORT_PRIVATE static void stop();
-
-#if ENABLE(SAMPLING_FLAGS)
-        static void setFlag(unsigned flag)
-        {
-            ASSERT(flag &gt;= 1);
-            ASSERT(flag &lt;= 32);
-            s_flags |= 1u &lt;&lt; (flag - 1);
-        }
-
-        static void clearFlag(unsigned flag)
-        {
-            ASSERT(flag &gt;= 1);
-            ASSERT(flag &lt;= 32);
-            s_flags &amp;= ~(1u &lt;&lt; (flag - 1));
-        }
-
-        static void sample();
-
-        class ScopedFlag {
-        public:
-            ScopedFlag(int flag)
-                : m_flag(flag)
-            {
-                setFlag(flag);
-            }
-
-            ~ScopedFlag()
-            {
-                clearFlag(m_flag);
-            }
-
-        private:
-            int m_flag;
-        };
-    
-        static const void* addressOfFlags()
-        {
-            return &amp;s_flags;
-        }
-
-#endif
-    private:
-        JS_EXPORTDATA static uint32_t s_flags;
-#if ENABLE(SAMPLING_FLAGS)
-        static uint64_t s_flagCounts[33];
-#endif
-    };
-
-#if ENABLE(SAMPLING_REGIONS)
-    class SamplingRegion {
-    public:
-        // Create a scoped sampling region using a C string constant name that describes
-        // what you are doing. This must be a string constant that persists for the
-        // lifetime of the process and is immutable.
-        SamplingRegion(const char* name)
-        {
-            if (!isMainThread()) {
-                m_name = 0;
-                return;
-            }
-            
-            m_name = name;
-            exchangeCurrent(this, &amp;m_previous);
-            ASSERT(!m_previous || m_previous &gt; this);
-        }
-        
-        ~SamplingRegion()
-        {
-            if (!m_name)
-                return;
-            
-            ASSERT(bitwise_cast&lt;SamplingRegion*&gt;(s_currentOrReserved &amp; ~1) == this);
-            exchangeCurrent(m_previous);
-        }
-        
-        static void sample();
-        
-        JS_EXPORT_PRIVATE static void dump();
-        
-    private:
-        const char* m_name;
-        SamplingRegion* m_previous;
-
-        static void exchangeCurrent(SamplingRegion* current, SamplingRegion** previousPtr = 0)
-        {
-            uintptr_t previous;
-            while (true) {
-                previous = s_currentOrReserved;
-                
-                // If it's reserved (i.e. sampling thread is reading it), loop around.
-                if (previous &amp; 1) {
-#if OS(UNIX)
-                    sched_yield();
-#endif
-                    continue;
-                }
-                
-                // If we're going to CAS, then make sure previous is set.
-                if (previousPtr)
-                    *previousPtr = bitwise_cast&lt;SamplingRegion*&gt;(previous);
-                
-                if (WTF::weakCompareAndSwapUIntPtr(&amp;s_currentOrReserved, previous, bitwise_cast&lt;uintptr_t&gt;(current)))
-                    break;
-            }
-        }
-        
-        static void dumpInternal();
-
-        class Locker {
-        public:
-            Locker();
-            ~Locker();
-        };
-
-        static volatile uintptr_t s_currentOrReserved;
-        
-        // rely on identity hashing of string constants
-        static Spectrum&lt;const char*&gt;* s_spectrum;
-        
-        static unsigned long s_noneOfTheAbove;
-        
-        static unsigned s_numberOfSamplesSinceDump;
-    };
-#else // ENABLE(SAMPLING_REGIONS)
-    class SamplingRegion {
-    public:
-        SamplingRegion(const char*) { }
-        JS_EXPORT_PRIVATE void dump();
-    };
-#endif // ENABLE(SAMPLING_REGIONS)
-
-    class CodeBlock;
-    class ExecState;
-    class Interpreter;
-    class ScopeNode;
-    struct Instruction;
-
-    struct ScriptSampleRecord {
-        ScriptSampleRecord(VM&amp; vm, ScriptExecutable* executable)
-            : m_executable(vm, executable)
-            , m_codeBlock(0)
-            , m_sampleCount(0)
-            , m_opcodeSampleCount(0)
-            , m_samples(0)
-            , m_size(0)
-        {
-        }
-        
-        ~ScriptSampleRecord()
-        {
-            if (m_samples)
-                free(m_samples);
-        }
-        
-        void sample(CodeBlock*, Instruction*);
-
-        Strong&lt;ScriptExecutable&gt; m_executable;
-        CodeBlock* m_codeBlock;
-        int m_sampleCount;
-        int m_opcodeSampleCount;
-        int* m_samples;
-        unsigned m_size;
-    };
-
-    typedef HashMap&lt;ScriptExecutable*, std::unique_ptr&lt;ScriptSampleRecord&gt;&gt; ScriptSampleRecordMap;
-
-    class SamplingThread {
-    public:
-        // Sampling thread state.
-        static bool s_running;
-        static unsigned s_hertz;
-        static ThreadIdentifier s_samplingThread;
-
-        JS_EXPORT_PRIVATE static void start(unsigned hertz=10000);
-        JS_EXPORT_PRIVATE static void stop();
-
-        static void threadStartFunc(void*);
-    };
-
-    class SamplingTool {
-        WTF_MAKE_FAST_ALLOCATED;
-    public:
-        friend struct CallRecord;
-        
-#if ENABLE(OPCODE_SAMPLING)
-        class CallRecord {
-            WTF_MAKE_NONCOPYABLE(CallRecord);
-        public:
-            CallRecord(SamplingTool* samplingTool, bool isHostCall = false)
-                : m_samplingTool(samplingTool)
-                , m_savedSample(samplingTool-&gt;m_sample)
-                , m_savedCodeBlock(samplingTool-&gt;m_codeBlock)
-            {
-                if (isHostcall)
-                    samplingTool-&gt;m_sample |= 0x1;
-            }
-
-            ~CallRecord()
-            {
-                m_samplingTool-&gt;m_sample = m_savedSample;
-                m_samplingTool-&gt;m_codeBlock = m_savedCodeBlock;
-            }
-
-        private:
-            SamplingTool* m_samplingTool;
-            intptr_t m_savedSample;
-            CodeBlock* m_savedCodeBlock;
-        };
-#else
-        class CallRecord {
-            WTF_MAKE_NONCOPYABLE(CallRecord);
-        public:
-            CallRecord(SamplingTool*, bool = false)
-            {
-            }
-        };
-#endif
-
-        SamplingTool(Interpreter* interpreter)
-            : m_interpreter(interpreter)
-            , m_codeBlock(0)
-            , m_sample(0)
-            , m_sampleCount(0)
-            , m_opcodeSampleCount(0)
-#if ENABLE(CODEBLOCK_SAMPLING)
-            , m_scopeSampleMap(std::make_unique&lt;ScriptSampleRecordMap&gt;)
-#endif
-        {
-            memset(m_opcodeSamples, 0, sizeof(m_opcodeSamples));
-            memset(m_opcodeSamplesInCTIFunctions, 0, sizeof(m_opcodeSamplesInCTIFunctions));
-        }
-
-        JS_EXPORT_PRIVATE void setup();
-        void dump(ExecState*);
-
-        void notifyOfScope(VM&amp;, ScriptExecutable* scope);
-
-        void sample(CodeBlock* codeBlock, Instruction* vPC)
-        {
-            ASSERT(!(reinterpret_cast&lt;intptr_t&gt;(vPC) &amp; 0x3));
-            m_codeBlock = codeBlock;
-            m_sample = reinterpret_cast&lt;intptr_t&gt;(vPC);
-        }
-
-        CodeBlock** codeBlockSlot() { return &amp;m_codeBlock; }
-        intptr_t* sampleSlot() { return &amp;m_sample; }
-
-        void* encodeSample(Instruction* vPC, bool inCTIFunction = false, bool inHostFunction = false)
-        {
-            ASSERT(!(reinterpret_cast&lt;intptr_t&gt;(vPC) &amp; 0x3));
-            return reinterpret_cast&lt;void*&gt;(reinterpret_cast&lt;intptr_t&gt;(vPC) | (static_cast&lt;intptr_t&gt;(inCTIFunction) &lt;&lt; 1) | static_cast&lt;intptr_t&gt;(inHostFunction));
-        }
-
-        static void sample();
-
-    private:
-        class Sample {
-        public:
-            Sample(volatile intptr_t sample, CodeBlock* volatile codeBlock)
-                : m_sample(sample)
-                , m_codeBlock(codeBlock)
-            {
-            }
-            
-            bool isNull() { return !m_sample; }
-            CodeBlock* codeBlock() { return m_codeBlock; }
-            Instruction* vPC() { return reinterpret_cast&lt;Instruction*&gt;(m_sample &amp; ~0x3); }
-            bool inHostFunction() { return m_sample &amp; 0x1; }
-            bool inCTIFunction() { return m_sample &amp; 0x2; }
-
-        private:
-            intptr_t m_sample;
-            CodeBlock* m_codeBlock;
-        };
-
-        void doRun();
-        static SamplingTool* s_samplingTool;
-        
-        Interpreter* m_interpreter;
-        
-        // State tracked by the main thread, used by the sampling thread.
-        CodeBlock* m_codeBlock;
-        intptr_t m_sample;
-
-        // Gathered sample data.
-        long long m_sampleCount;
-        long long m_opcodeSampleCount;
-        unsigned m_opcodeSamples[numOpcodeIDs];
-        unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs];
-        
-#if ENABLE(CODEBLOCK_SAMPLING)
-        Lock m_scriptSampleMapMutex;
-        std::unique_ptr&lt;ScriptSampleRecordMap&gt; m_scopeSampleMap;
-#endif
-    };
-
-} // namespace JSC
-
-#endif // SamplingTool_h
</del></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeSuperSamplercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/bytecode/SuperSampler.cpp (0 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/SuperSampler.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/SuperSampler.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;SuperSampler.h&quot;
+
+#include &quot;MacroAssembler.h&quot;
+#include &quot;Options.h&quot;
+#include &lt;wtf/CurrentTime.h&gt;
+#include &lt;wtf/Threading.h&gt;
+
+namespace JSC {
+
+volatile uint32_t g_superSamplerCount;
+
+static double in;
+static double out;
+
+void initializeSuperSampler()
+{
+    if (!Options::useSuperSampler())
+        return;
+    
+    createThread(
+        &quot;JSC Super Sampler&quot;,
+        [] () {
+            const int sleepQuantum = 10;
+            const int printingPeriod = 1000;
+            for (;;) {
+                for (int ms = 0; ms &lt; printingPeriod; ms += sleepQuantum) {
+                    if (g_superSamplerCount)
+                        in++;
+                    else
+                        out++;
+                    sleepMS(sleepQuantum);
+                }
+                printSuperSamplerState();
+                if (static_cast&lt;int32_t&gt;(g_superSamplerCount) &lt; 0)
+                    dataLog(&quot;WARNING: Super sampler undercount detected!\n&quot;);
+            }
+        });
+}
+
+void printSuperSamplerState()
+{
+    if (!Options::useSuperSampler())
+        return;
+    
+    double percentage = 100.0 * in / (in + out);
+    if (percentage != percentage)
+        percentage = 0.0;
+    dataLog(&quot;Percent time behind super sampler flag: &quot;, percentage, &quot;\n&quot;);
+}
+
+} // namespace JSC
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeSuperSamplerh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/bytecode/SuperSampler.h (0 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/SuperSampler.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/SuperSampler.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef SuperSampler_h
+#define SuperSampler_h
+
+namespace JSC {
+
+class MacroAssembler;
+
+extern volatile uint32_t g_superSamplerCount;
+
+void initializeSuperSampler();
+
+class SuperSamplerScope {
+public:
+    SuperSamplerScope(bool doSample = true)
+        : m_doSample(doSample)
+    {
+        if (m_doSample)
+            g_superSamplerCount++;
+    }
+
+    ~SuperSamplerScope()
+    {
+        if (m_doSample)
+            g_superSamplerCount--;
+    }
+
+private:
+    bool m_doSample;
+};
+
+JS_EXPORT_PRIVATE void printSuperSamplerState();
+
+} // namespace JSC
+
+#endif // SuperSampler_h
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -63,8 +63,6 @@
</span><span class="cx"> 
</span><span class="cx"> ParserError BytecodeGenerator::generate()
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;Bytecode Generation&quot;);
-
</del><span class="cx">     m_codeBlock-&gt;setThisRegister(m_thisRegister.virtualRegister());
</span><span class="cx">     
</span><span class="cx">     // If we have declared a variable named &quot;arguments&quot; and we are using arguments then we should
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx"> #include &quot;PropertyNameArray.h&quot;
</span><span class="cx"> #include &quot;RegExpCache.h&quot;
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;StackAlignment.h&quot;
</span><span class="cx"> #include &quot;TemplateRegistryKey.h&quot;
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -2716,7 +2716,6 @@
</span><span class="cx"> void AbstractInterpreter&lt;AbstractStateType&gt;::forAllValues(
</span><span class="cx">     unsigned clobberLimit, Functor&amp; functor)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG AI For All Values&quot;);
</del><span class="cx">     if (clobberLimit &gt;= m_state.block()-&gt;size())
</span><span class="cx">         clobberLimit = m_state.block()-&gt;size();
</span><span class="cx">     else
</span><span class="lines">@@ -2739,7 +2738,6 @@
</span><span class="cx"> template&lt;typename AbstractStateType&gt;
</span><span class="cx"> void AbstractInterpreter&lt;AbstractStateType&gt;::clobberStructures(unsigned clobberLimit)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG AI Clobber Structures&quot;);
</del><span class="cx">     forAllValues(clobberLimit, AbstractValue::clobberStructuresFor);
</span><span class="cx">     setDidClobber();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGArgumentsEliminationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -678,7 +678,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performArgumentsElimination(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Arguments Elimination Phase&quot;);
</del><span class="cx">     return runPhase&lt;ArgumentsEliminationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGBackwardsPropagationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -426,7 +426,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performBackwardsPropagation(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Backwards Propagation Phase&quot;);
</del><span class="cx">     return runPhase&lt;BackwardsPropagationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -5080,7 +5080,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool parse(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Parsing&quot;);
</del><span class="cx">     return ByteCodeParser(graph).parse();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCFAPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCFAPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCFAPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGCFAPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -204,7 +204,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performCFA(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG CFA Phase&quot;);
</del><span class="cx">     return runPhase&lt;CFAPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCFGSimplificationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -380,7 +380,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performCFGSimplification(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG CFG Simplification Phase&quot;);
</del><span class="cx">     return runPhase&lt;CFGSimplificationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCPSRethreadingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -72,8 +72,6 @@
</span><span class="cx">     
</span><span class="cx">     void freeUnnecessaryNodes()
</span><span class="cx">     {
</span><del>-        SamplingRegion samplingRegion(&quot;DFG CPS Rethreading: freeUnnecessaryNodes&quot;);
-        
</del><span class="cx">         for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
</span><span class="cx">             BasicBlock* block = m_graph.block(blockIndex);
</span><span class="cx">             if (!block)
</span><span class="lines">@@ -361,8 +359,6 @@
</span><span class="cx">     
</span><span class="cx">     void canonicalizeLocalsInBlocks()
</span><span class="cx">     {
</span><del>-        SamplingRegion samplingRegion(&quot;DFG CPS Rethreading: canonicalizeLocalsInBlocks&quot;);
-        
</del><span class="cx">         for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
</span><span class="cx">             m_block = m_graph.block(blockIndex);
</span><span class="cx">             canonicalizeLocalsInBlock();
</span><span class="lines">@@ -384,8 +380,6 @@
</span><span class="cx">     {
</span><span class="cx">         Vector&lt;PhiStackEntry, 128&gt;&amp; phiStack = operandKind == ArgumentOperand ? m_argumentPhiStack : m_localPhiStack;
</span><span class="cx">         
</span><del>-        SamplingRegion samplingRegion(&quot;DFG CPS Rethreading: propagatePhis&quot;);
-        
</del><span class="cx">         // Ensure that attempts to use this fail instantly.
</span><span class="cx">         m_block = 0;
</span><span class="cx">         
</span><span class="lines">@@ -520,7 +514,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performCPSRethreading(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG CPS Rethreading Phase&quot;);
</del><span class="cx">     return runPhase&lt;CPSRethreadingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCSEPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -701,13 +701,11 @@
</span><span class="cx"> 
</span><span class="cx"> bool performLocalCSE(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG LocalCSE Phase&quot;);
</del><span class="cx">     return runPhase&lt;LocalCSEPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool performGlobalCSE(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG GlobalCSE Phase&quot;);
</del><span class="cx">     return runPhase&lt;GlobalCSEPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCleanUpPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCleanUpPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCleanUpPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGCleanUpPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -82,7 +82,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performCleanUp(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Clean Up Phase&quot;);
</del><span class="cx">     return runPhase&lt;CleanUpPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGConstantFoldingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -824,7 +824,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performConstantFolding(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Constant Folding Phase&quot;);
</del><span class="cx">     return runPhase&lt;ConstantFoldingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGConstantHoistingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGConstantHoistingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGConstantHoistingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGConstantHoistingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -139,7 +139,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performConstantHoisting(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Constant Hoisting Phase&quot;);
</del><span class="cx">     return runPhase&lt;ConstantHoistingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCriticalEdgeBreakingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCriticalEdgeBreakingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCriticalEdgeBreakingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGCriticalEdgeBreakingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -87,7 +87,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performCriticalEdgeBreaking(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Critical Edge Breaking Phase&quot;);
</del><span class="cx">     return runPhase&lt;CriticalEdgeBreakingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDCEPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGDCEPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDCEPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGDCEPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -150,7 +150,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performDCE(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG DCE Phase&quot;);
</del><span class="cx">     return runPhase&lt;DCEPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDrivercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #include &quot;JITCode.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;Options.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;TypeProfilerLog.h&quot;
</span><span class="cx"> #include &lt;wtf/Atomics.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -61,8 +60,6 @@
</span><span class="cx">     unsigned osrEntryBytecodeIndex, const Operands&lt;JSValue&gt;&amp; mustHandleValues,
</span><span class="cx">     PassRefPtr&lt;DeferredCompilationCallback&gt; callback)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Compilation (Driver)&quot;);
-    
</del><span class="cx">     if (!Options::bytecodeRangeToDFGCompile().isInRange(codeBlock-&gt;instructionCount())
</span><span class="cx">         || !FunctionWhitelist::ensureGlobalWhitelist().contains(codeBlock))
</span><span class="cx">         return CompilationFailed;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -2446,7 +2446,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performFixup(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Fixup Phase&quot;);
</del><span class="cx">     return runPhase&lt;FixupPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -568,8 +568,6 @@
</span><span class="cx">     if (logCompilationChanges())
</span><span class="cx">         dataLog(&quot;Dethreading DFG graph.\n&quot;);
</span><span class="cx">     
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Dethreading&quot;);
-    
</del><span class="cx">     for (BlockIndex blockIndex = m_blocks.size(); blockIndex--;) {
</span><span class="cx">         BasicBlock* block = m_blocks[blockIndex].get();
</span><span class="cx">         if (!block)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGIntegerCheckCombiningPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -391,7 +391,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performIntegerCheckCombining(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Integer Check Combining Phase&quot;);
</del><span class="cx">     return runPhase&lt;IntegerCheckCombiningPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGIntegerRangeOptimizationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1770,7 +1770,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performIntegerRangeOptimization(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Integer Range Optimization Phase&quot;);
</del><span class="cx">     return runPhase&lt;IntegerRangeOptimizationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGInvalidationPointInjectionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGInvalidationPointInjectionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGInvalidationPointInjectionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGInvalidationPointInjectionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -101,7 +101,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performInvalidationPointInjection(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Invalidation Point Injection Phase&quot;);
</del><span class="cx">     return runPhase&lt;InvalidationPointInjectionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGJITCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -326,8 +326,6 @@
</span><span class="cx"> 
</span><span class="cx"> void JITCompiler::compile()
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Backend&quot;);
-
</del><span class="cx">     setStartOfCode();
</span><span class="cx">     compileEntry();
</span><span class="cx">     m_speculative = std::make_unique&lt;SpeculativeJIT&gt;(*this);
</span><span class="lines">@@ -387,8 +385,6 @@
</span><span class="cx"> 
</span><span class="cx"> void JITCompiler::compileFunction()
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Backend&quot;);
-    
</del><span class="cx">     setStartOfCode();
</span><span class="cx">     compileEntry();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGLICMPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -361,7 +361,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performLICM(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG LICM Phase&quot;);
</del><span class="cx">     return runPhase&lt;LICMPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGLiveCatchVariablePreservationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -165,7 +165,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performLiveCatchVariablePreservationPhase(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Live Catch Variables Preservation Phase&quot;);
</del><span class="cx">     return runPhase&lt;LiveCatchVariablePreservationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGLivenessAnalysisPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGLivenessAnalysisPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGLivenessAnalysisPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGLivenessAnalysisPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -161,7 +161,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performLivenessAnalysis(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Liveness Analysis Phase&quot;);
</del><span class="cx">     return runPhase&lt;LivenessAnalysisPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGLoopPreHeaderCreationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -183,7 +183,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performLoopPreHeaderCreation(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Loop Pre-Header Creation Phase&quot;);
</del><span class="cx">     return runPhase&lt;LoopPreHeaderCreationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGMaximalFlushInsertionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -150,7 +150,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performMaximalFlushInsertion(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Flush Everything Insertion Phase&quot;);
</del><span class="cx">     return runPhase&lt;MaximalFlushInsertionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGMovHintRemovalPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGMovHintRemovalPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGMovHintRemovalPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGMovHintRemovalPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -136,7 +136,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performMovHintRemoval(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG MovHint Removal Phase&quot;);
</del><span class="cx">     return runPhase&lt;MovHintRemovalPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGOSRAvailabilityAnalysisPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -102,7 +102,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performOSRAvailabilityAnalysis(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG OSR Availability Analysis Phase&quot;);
</del><span class="cx">     return runPhase&lt;OSRAvailabilityAnalysisPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGOSREntrypointCreationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -147,7 +147,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performOSREntrypointCreation(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG OSR Entrypoint Creation&quot;);
</del><span class="cx">     return runPhase&lt;OSREntrypointCreationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGOSRExitCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -112,8 +112,6 @@
</span><span class="cx"> 
</span><span class="cx"> void compileOSRExit(ExecState* exec)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG OSR Exit Compilation&quot;);
-
</del><span class="cx">     if (exec-&gt;vm().callFrameForCatch)
</span><span class="cx">         RELEASE_ASSERT(exec-&gt;vm().callFrameForCatch == exec);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGObjectAllocationSinkingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -2211,7 +2211,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performObjectAllocationSinking(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Object Allocation Sinking Phase&quot;);
</del><span class="cx">     return runPhase&lt;ObjectAllocationSinkingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> #include &quot;Repatch.h&quot;
</span><span class="cx"> #include &quot;ScopedArguments.h&quot;
</span><span class="cx"> #include &quot;StringConstructor.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &quot;Symbol.h&quot;
</span><span class="cx"> #include &quot;TypeProfilerLog.h&quot;
</span><span class="cx"> #include &quot;TypedArrayInlines.h&quot;
</span><span class="lines">@@ -621,6 +622,8 @@
</span><span class="cx">         
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationRegExpExecString(ExecState* exec, JSGlobalObject* globalObject, RegExpObject* regExpObject, JSString* argument)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
+    
</ins><span class="cx">     VM&amp; vm = globalObject-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx">     
</span><span class="lines">@@ -629,6 +632,8 @@
</span><span class="cx">         
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationRegExpExec(ExecState* exec, JSGlobalObject* globalObject, RegExpObject* regExpObject, EncodedJSValue encodedArgument)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
+    
</ins><span class="cx">     VM&amp; vm = globalObject-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx">     
</span><span class="lines">@@ -642,6 +647,8 @@
</span><span class="cx">         
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationRegExpExecGeneric(ExecState* exec, JSGlobalObject* globalObject, EncodedJSValue encodedBase, EncodedJSValue encodedArgument)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
+    
</ins><span class="cx">     VM&amp; vm = globalObject-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx"> 
</span><span class="lines">@@ -659,6 +666,8 @@
</span><span class="cx">         
</span><span class="cx"> size_t JIT_OPERATION operationRegExpTestString(ExecState* exec, JSGlobalObject* globalObject, RegExpObject* regExpObject, JSString* input)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
+    
</ins><span class="cx">     VM&amp; vm = globalObject-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx"> 
</span><span class="lines">@@ -667,6 +676,8 @@
</span><span class="cx"> 
</span><span class="cx"> size_t JIT_OPERATION operationRegExpTest(ExecState* exec, JSGlobalObject* globalObject, RegExpObject* regExpObject, EncodedJSValue encodedArgument)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
+    
</ins><span class="cx">     VM&amp; vm = globalObject-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx"> 
</span><span class="lines">@@ -680,6 +691,8 @@
</span><span class="cx"> 
</span><span class="cx"> size_t JIT_OPERATION operationRegExpTestGeneric(ExecState* exec, JSGlobalObject* globalObject, EncodedJSValue encodedBase, EncodedJSValue encodedArgument)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope;
+    
</ins><span class="cx">     VM&amp; vm = globalObject-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPhantomInsertionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPhantomInsertionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPhantomInsertionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGPhantomInsertionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -181,7 +181,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performPhantomInsertion(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Phantom Insertion Phase&quot;);
</del><span class="cx">     return runPhase&lt;PhantomInsertionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPlancpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -174,7 +174,6 @@
</span><span class="cx">     if (reportCompileTimes())
</span><span class="cx">         codeBlockName = toCString(*codeBlock);
</span><span class="cx">     
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Compilation (Plan)&quot;);
</del><span class="cx">     CompilationScope compilationScope;
</span><span class="cx"> 
</span><span class="cx">     if (logCompilationChanges(mode))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPredictionInjectionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -86,7 +86,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performPredictionInjection(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Prediction Injection Phase&quot;);
</del><span class="cx">     return runPhase&lt;PredictionInjectionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPredictionPropagationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1016,7 +1016,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performPredictionPropagation(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Prediction Propagation Phase&quot;);
</del><span class="cx">     return runPhase&lt;PredictionPropagationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPutStackSinkingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -583,7 +583,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performPutStackSinking(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG PutStack Sinking Phase&quot;);
</del><span class="cx">     return runPhase&lt;PutStackSinkingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSSAConversionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -416,7 +416,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performSSAConversion(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG SSA Conversion Phase&quot;);
</del><span class="cx">     return runPhase&lt;SSAConversionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSSALoweringPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -122,7 +122,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performSSALowering(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG SSA Lowering Phase&quot;);
</del><span class="cx">     return runPhase&lt;SSALoweringPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -2988,6 +2988,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     case RegExpExec: {
</span><ins>+        bool sample = false;
+
+        if (sample)
+            m_jit.incrementSuperSamplerCount();
+        
</ins><span class="cx">         SpeculateCellOperand globalObject(this, node-&gt;child1());
</span><span class="cx">         GPRReg globalObjectGPR = globalObject.gpr();
</span><span class="cx">         
</span><span class="lines">@@ -3006,6 +3011,9 @@
</span><span class="cx">                 m_jit.exceptionCheck();
</span><span class="cx">                 
</span><span class="cx">                 jsValueResult(result.gpr(), node);
</span><ins>+
+                if (sample)
+                    m_jit.decrementSuperSamplerCount();
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             
</span><span class="lines">@@ -3021,6 +3029,9 @@
</span><span class="cx">             m_jit.exceptionCheck();
</span><span class="cx">         
</span><span class="cx">             jsValueResult(result.gpr(), node);
</span><ins>+
+            if (sample)
+                m_jit.decrementSuperSamplerCount();
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -3035,6 +3046,9 @@
</span><span class="cx">         m_jit.exceptionCheck();
</span><span class="cx">         
</span><span class="cx">         jsValueResult(result.gpr(), node);
</span><ins>+
+        if (sample)
+            m_jit.decrementSuperSamplerCount();
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3093,6 +3107,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     case StringReplace: {
</span><ins>+        bool sample = false;
+
+        if (sample)
+            m_jit.incrementSuperSamplerCount();
+        
</ins><span class="cx">         if (node-&gt;child1().useKind() == StringUse
</span><span class="cx">             &amp;&amp; node-&gt;child2().useKind() == RegExpObjectUse
</span><span class="cx">             &amp;&amp; node-&gt;child3().useKind() == StringUse) {
</span><span class="lines">@@ -3112,6 +3131,8 @@
</span><span class="cx">                         regExpGPR);
</span><span class="cx">                     m_jit.exceptionCheck();
</span><span class="cx">                     cellResult(result.gpr(), node);
</span><ins>+                    if (sample)
+                        m_jit.decrementSuperSamplerCount();
</ins><span class="cx">                     break;
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -3133,6 +3154,8 @@
</span><span class="cx">                 replaceGPR);
</span><span class="cx">             m_jit.exceptionCheck();
</span><span class="cx">             cellResult(result.gpr(), node);
</span><ins>+            if (sample)
+                m_jit.decrementSuperSamplerCount();
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -3150,6 +3173,8 @@
</span><span class="cx">             replaceGPR);
</span><span class="cx">         m_jit.exceptionCheck();
</span><span class="cx">         cellResult(result.gpr(), node);
</span><ins>+        if (sample)
+            m_jit.decrementSuperSamplerCount();
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStackLayoutPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -261,7 +261,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performStackLayout(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Stack Layout Phase&quot;);
</del><span class="cx">     return runPhase&lt;StackLayoutPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStaticExecutionCountEstimationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -98,7 +98,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performStaticExecutionCountEstimation(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Static Execution Count Estimation&quot;);
</del><span class="cx">     return runPhase&lt;StaticExecutionCountEstimationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStoreBarrierInsertionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStoreBarrierInsertionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStoreBarrierInsertionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGStoreBarrierInsertionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -534,13 +534,11 @@
</span><span class="cx"> 
</span><span class="cx"> bool performFastStoreBarrierInsertion(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Fast Store Barrier Insertion Phase&quot;);
</del><span class="cx">     return runPhase&lt;StoreBarrierInsertionPhase&lt;PhaseMode::Fast&gt;&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool performGlobalStoreBarrierInsertion(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Global Store Barrier Insertion Phase&quot;);
</del><span class="cx">     return runPhase&lt;StoreBarrierInsertionPhase&lt;PhaseMode::Global&gt;&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStrengthReductionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -390,7 +390,6 @@
</span><span class="cx">     
</span><span class="cx"> bool performStrengthReduction(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Strength Reduction Phase&quot;);
</del><span class="cx">     return runPhase&lt;StrengthReductionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStructureAbstractValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStructureAbstractValue.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStructureAbstractValue.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGStructureAbstractValue.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -32,16 +32,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC { namespace DFG {
</span><span class="cx"> 
</span><del>-// Comment out the empty SAMPLE() definition, and uncomment the one that uses SamplingRegion, if
-// you want extremely fine-grained profiling in this code.
-#define SAMPLE(name) 
-//#define SAMPLE(name) SamplingRegion samplingRegion(name)
-
</del><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx"> void StructureAbstractValue::assertIsRegistered(Graph&amp; graph) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue assertIsRegistered&quot;);
-
</del><span class="cx">     if (isTop())
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -52,8 +45,6 @@
</span><span class="cx"> 
</span><span class="cx"> void StructureAbstractValue::clobber()
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue clobber&quot;);
-
</del><span class="cx">     // The premise of this approach to clobbering is that anytime we introduce
</span><span class="cx">     // a watchable structure into an abstract value, we watchpoint it. You can assert
</span><span class="cx">     // that this holds by calling assertIsWatched().
</span><span class="lines">@@ -82,8 +73,6 @@
</span><span class="cx"> 
</span><span class="cx"> void StructureAbstractValue::observeTransition(Structure* from, Structure* to)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue observeTransition&quot;);
-    
</del><span class="cx">     ASSERT(!from-&gt;dfgShouldWatch());
</span><span class="cx"> 
</span><span class="cx">     if (isTop())
</span><span class="lines">@@ -101,8 +90,6 @@
</span><span class="cx"> 
</span><span class="cx"> void StructureAbstractValue::observeTransitions(const TransitionVector&amp; vector)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue observeTransitions&quot;);
-
</del><span class="cx">     if (isTop())
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -125,8 +112,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::add(Structure* structure)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue add&quot;);
-
</del><span class="cx">     if (isTop())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="lines">@@ -141,8 +126,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::merge(const StructureSet&amp; other)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue merge set&quot;);
-
</del><span class="cx">     if (isTop())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="lines">@@ -151,8 +134,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::mergeSlow(const StructureAbstractValue&amp; other)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue merge value slow&quot;);
-
</del><span class="cx">     // It isn't immediately obvious that the code below is doing the right thing, so let's go
</span><span class="cx">     // through it.
</span><span class="cx">     //
</span><span class="lines">@@ -196,8 +177,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::mergeNotTop(const StructureSet&amp; other)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue merge not top&quot;);
-
</del><span class="cx">     if (!m_set.merge(other))
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="lines">@@ -209,8 +188,6 @@
</span><span class="cx"> 
</span><span class="cx"> void StructureAbstractValue::filter(const StructureSet&amp; other)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue filter set&quot;);
-
</del><span class="cx">     if (isTop()) {
</span><span class="cx">         m_set = other;
</span><span class="cx">         return;
</span><span class="lines">@@ -244,8 +221,6 @@
</span><span class="cx"> 
</span><span class="cx"> void StructureAbstractValue::filter(const StructureAbstractValue&amp; other)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue filter value&quot;);
-
</del><span class="cx">     if (other.isTop())
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -270,8 +245,6 @@
</span><span class="cx"> 
</span><span class="cx"> void StructureAbstractValue::filterSlow(SpeculatedType type)
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue filter type slow&quot;);
-
</del><span class="cx">     if (!(type &amp; SpecCell)) {
</span><span class="cx">         clear();
</span><span class="cx">         return;
</span><span class="lines">@@ -287,8 +260,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::contains(Structure* structure) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue contains&quot;);
-
</del><span class="cx">     if (isInfinite())
</span><span class="cx">         return true;
</span><span class="cx">     
</span><span class="lines">@@ -297,8 +268,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::isSubsetOf(const StructureSet&amp; other) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue isSubsetOf set&quot;);
-
</del><span class="cx">     if (isInfinite())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="lines">@@ -307,8 +276,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::isSubsetOf(const StructureAbstractValue&amp; other) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue isSubsetOf value&quot;);
-
</del><span class="cx">     if (isTop())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="lines">@@ -330,8 +297,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::isSupersetOf(const StructureSet&amp; other) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue isSupersetOf set&quot;);
-
</del><span class="cx">     if (isInfinite())
</span><span class="cx">         return true;
</span><span class="cx">     
</span><span class="lines">@@ -340,8 +305,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::overlaps(const StructureSet&amp; other) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue overlaps set&quot;);
-
</del><span class="cx">     if (isInfinite())
</span><span class="cx">         return true;
</span><span class="cx">     
</span><span class="lines">@@ -350,8 +313,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::overlaps(const StructureAbstractValue&amp; other) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue overlaps value&quot;);
-
</del><span class="cx">     if (other.isInfinite())
</span><span class="cx">         return true;
</span><span class="cx">     
</span><span class="lines">@@ -360,8 +321,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool StructureAbstractValue::equalsSlow(const StructureAbstractValue&amp; other) const
</span><span class="cx"> {
</span><del>-    SAMPLE(&quot;StructureAbstractValue equalsSlow&quot;);
-
</del><span class="cx">     ASSERT(m_set.m_pointer != other.m_set.m_pointer);
</span><span class="cx">     ASSERT(!isTop());
</span><span class="cx">     ASSERT(!other.isTop());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStructureRegistrationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -191,7 +191,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performStructureRegistration(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Structure Registration Phase&quot;);
</del><span class="cx">     return runPhase&lt;StructureRegistrationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGTierUpCheckInjectionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -190,7 +190,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performTierUpCheckInjection(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Tier-up Check Injection&quot;);
</del><span class="cx">     return runPhase&lt;TierUpCheckInjectionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGTypeCheckHoistingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -526,7 +526,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performTypeCheckHoisting(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Type Check Hoisting Phase&quot;);
</del><span class="cx">     return runPhase&lt;TypeCheckHoistingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGUnificationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -85,7 +85,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performUnification(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Unification Phase&quot;);
</del><span class="cx">     return runPhase&lt;UnificationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGVarargsForwardingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -325,7 +325,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performVarargsForwarding(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Varargs Forwarding Phase&quot;);
</del><span class="cx">     return runPhase&lt;VarargsForwardingPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGVirtualRegisterAllocationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -113,7 +113,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performVirtualRegisterAllocation(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Virtual Register Allocation Phase&quot;);
</del><span class="cx">     return runPhase&lt;VirtualRegisterAllocationPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGWatchpointCollectionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGWatchpointCollectionPhase.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGWatchpointCollectionPhase.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dfg/DFGWatchpointCollectionPhase.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -131,7 +131,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool performWatchpointCollection(Graph&amp; graph)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;DFG Watchpoint Collection Phase&quot;);
</del><span class="cx">     return runPhase&lt;WatchpointCollectionPhase&gt;(graph);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredynbenchcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dynbench.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dynbench.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/dynbench.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;JSLock.h&quot;
</span><span class="cx"> #include &quot;JSObject.h&quot;
</span><span class="cx"> #include &quot;VM.h&quot;
</span><ins>+#include &lt;wtf/MainThread.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLOSRExitCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -532,8 +532,6 @@
</span><span class="cx"> 
</span><span class="cx"> extern &quot;C&quot; void* compileFTLOSRExit(ExecState* exec, unsigned exitID)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;FTL OSR Exit Compilation&quot;);
-
</del><span class="cx">     if (shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit())
</span><span class="cx">         dataLog(&quot;Compiling OSR exit with exitID = &quot;, exitID, &quot;\n&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLOutputcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLOutput.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLOutput.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/ftl/FTLOutput.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;B3MathExtras.h&quot;
</span><span class="cx"> #include &quot;B3StackmapGenerationParams.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC { namespace FTL {
</span><span class="cx"> 
</span><span class="lines">@@ -296,6 +297,23 @@
</span><span class="cx">     RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TypedPointer Output::absolute(void* address)
+{
+    return TypedPointer(m_heaps-&gt;absolute[address], constIntPtr(address));
+}
+
+void Output::incrementSuperSamplerCount()
+{
+    TypedPointer counter = absolute(bitwise_cast&lt;void*&gt;(&amp;g_superSamplerCount));
+    store32(add(load32(counter), int32One), counter);
+}
+
+void Output::decrementSuperSamplerCount()
+{
+    TypedPointer counter = absolute(bitwise_cast&lt;void*&gt;(&amp;g_superSamplerCount));
+    store32(sub(load32(counter), int32One), counter);
+}
+
</ins><span class="cx"> } } // namespace JSC::FTL
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(FTL_JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLOutputh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLOutput.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLOutput.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/ftl/FTLOutput.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -306,10 +306,7 @@
</span><span class="cx">         return heap.baseIndex(*this, base, index, indexAsConstant, offset);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    TypedPointer absolute(void* address)
-    {
-        return TypedPointer(m_heaps-&gt;absolute[address], constIntPtr(address));
-    }
</del><ins>+    TypedPointer absolute(void* address);
</ins><span class="cx"> 
</span><span class="cx">     LValue load8SignExt32(LValue base, const AbstractHeap&amp; field) { return load8SignExt32(address(base, field)); }
</span><span class="cx">     LValue load8ZeroExt32(LValue base, const AbstractHeap&amp; field) { return load8ZeroExt32(address(base, field)); }
</span><span class="lines">@@ -454,6 +451,9 @@
</span><span class="cx">         return ValueFromBlock(upsilon, m_block);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void incrementSuperSamplerCount();
+    void decrementSuperSamplerCount();
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> #pragma mark - States
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> #include &quot;WeakSetInlines.h&quot;
</span><span class="cx"> #include &lt;algorithm&gt;
</span><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><ins>+#include &lt;wtf/MainThread.h&gt;
</ins><span class="cx"> #include &lt;wtf/ParallelVectorIterator.h&gt;
</span><span class="cx"> #include &lt;wtf/ProcessID.h&gt;
</span><span class="cx"> #include &lt;wtf/RAMSize.h&gt;
</span><span class="lines">@@ -515,8 +516,6 @@
</span><span class="cx"> 
</span><span class="cx"> void Heap::markRoots(double gcStartTime, void* stackOrigin, void* stackTop, MachineThreads::RegisterState&amp; calleeSavedRegisters)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;Garbage Collection: Marking&quot;);
-
</del><span class="cx">     GCPHASE(MarkRoots);
</span><span class="cx">     ASSERT(isValidThreadState(m_vm));
</span><span class="cx"> 
</span><span class="lines">@@ -1090,8 +1089,6 @@
</span><span class="cx"> 
</span><span class="cx">     collect(collectionType);
</span><span class="cx"> 
</span><del>-    SamplingRegion samplingRegion(&quot;Garbage Collection: Sweeping&quot;);
-
</del><span class="cx">     DeferGCForAWhile deferGC(*this);
</span><span class="cx">     m_objectSpace.sweep();
</span><span class="cx">     m_objectSpace.shrink();
</span><span class="lines">@@ -1121,8 +1118,6 @@
</span><span class="cx">         before = currentTimeMS();
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    SamplingRegion samplingRegion(&quot;Garbage Collection&quot;);
-    
</del><span class="cx">     if (vm()-&gt;typeProfiler()) {
</span><span class="cx">         DeferGCForAWhile awhile(*this);
</span><span class="cx">         vm()-&gt;typeProfilerLog()-&gt;processLogEntries(ASCIILiteral(&quot;GC&quot;));
</span><span class="lines">@@ -1602,10 +1597,7 @@
</span><span class="cx"> void Heap::zombifyDeadObjects()
</span><span class="cx"> {
</span><span class="cx">     // Sweep now because destructors will crash once we're zombified.
</span><del>-    {
-        SamplingRegion samplingRegion(&quot;Garbage Collection: Sweeping&quot;);
-        m_objectSpace.zombifySweep();
-    }
</del><ins>+    m_objectSpace.zombifySweep();
</ins><span class="cx">     HeapIterationScope iterationScope(*this);
</span><span class="cx">     m_objectSpace.forEachDeadCell&lt;Zombify&gt;(iterationScope);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMarkedBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -94,8 +94,6 @@
</span><span class="cx">     ASSERT(blockState != Allocated &amp;&amp; blockState != FreeListed);
</span><span class="cx">     ASSERT(!(!callDestructors &amp;&amp; sweepMode == SweepOnly));
</span><span class="cx"> 
</span><del>-    SamplingRegion samplingRegion((!callDestructors &amp;&amp; blockState != New) ? &quot;Calling destructors&quot; : &quot;sweeping&quot;);
-    
</del><span class="cx">     // This produces a free list that is ordered in reverse through the block.
</span><span class="cx">     // This is fine, since the allocation code makes no assumptions about the
</span><span class="cx">     // order of the free list.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -61,7 +61,6 @@
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><span class="cx"> #include &quot;RegExpPrototype.h&quot;
</span><span class="cx"> #include &quot;Register.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;ScopedArguments.h&quot;
</span><span class="cx"> #include &quot;StackAlignment.h&quot;
</span><span class="cx"> #include &quot;StackVisitor.h&quot;
</span><span class="lines">@@ -298,8 +297,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Interpreter::Interpreter(VM&amp; vm)
</span><del>-    : m_sampleEntryDepth(0)
-    , m_vm(vm)
</del><ins>+    : m_vm(vm)
</ins><span class="cx">     , m_stack(vm)
</span><span class="cx">     , m_errorHandlingModeReentry(0)
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="lines">@@ -323,10 +321,6 @@
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx">     m_initialized = true;
</span><span class="cx"> #endif
</span><del>-
-#if ENABLE(OPCODE_SAMPLING)
-    enableSampler();
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #ifdef NDEBUG
</span><span class="lines">@@ -814,25 +808,8 @@
</span><span class="cx">     return returnValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-class SamplingScope {
-public:
-    SamplingScope(Interpreter* interpreter)
-        : m_interpreter(interpreter)
-    {
-        interpreter-&gt;startSampling();
-    }
-    ~SamplingScope()
-    {
-        m_interpreter-&gt;stopSampling();
-    }
-private:
-    Interpreter* m_interpreter;
-};
-
</del><span class="cx"> JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, JSObject* thisObj)
</span><span class="cx"> {
</span><del>-    SamplingScope samplingScope(this);
-
</del><span class="cx">     JSScope* scope = thisObj-&gt;globalObject()-&gt;globalScope();
</span><span class="cx">     VM&amp; vm = *scope-&gt;vm();
</span><span class="cx"> 
</span><span class="lines">@@ -971,11 +948,7 @@
</span><span class="cx">         profiler-&gt;willExecute(callFrame, program-&gt;sourceURL(), program-&gt;firstLine(), program-&gt;startColumn());
</span><span class="cx"> 
</span><span class="cx">     // Execute the code:
</span><del>-    JSValue result;
-    {
-        SamplingTool::CallRecord callRecord(m_sampler.get());
-        result = program-&gt;generatedJITCode()-&gt;execute(&amp;vm, &amp;protoCallFrame);
-    }
</del><ins>+    JSValue result = program-&gt;generatedJITCode()-&gt;execute(&amp;vm, &amp;protoCallFrame);
</ins><span class="cx"> 
</span><span class="cx">     if (LegacyProfiler* profiler = vm.enabledProfiler())
</span><span class="cx">         profiler-&gt;didExecute(callFrame, program-&gt;sourceURL(), program-&gt;firstLine(), program-&gt;startColumn());
</span><span class="lines">@@ -1033,8 +1006,6 @@
</span><span class="cx"> 
</span><span class="cx">     JSValue result;
</span><span class="cx">     {
</span><del>-        SamplingTool::CallRecord callRecord(m_sampler.get(), !isJSCall);
-
</del><span class="cx">         // Execute the code:
</span><span class="cx">         if (isJSCall)
</span><span class="cx">             result = callData.js.functionExecutable-&gt;generatedJITCodeForCall()-&gt;execute(&amp;vm, &amp;protoCallFrame);
</span><span class="lines">@@ -1103,8 +1074,6 @@
</span><span class="cx"> 
</span><span class="cx">     JSValue result;
</span><span class="cx">     {
</span><del>-        SamplingTool::CallRecord callRecord(m_sampler.get(), !isJSConstruct);
-
</del><span class="cx">         // Execute the code.
</span><span class="cx">         if (isJSConstruct)
</span><span class="cx">             result = constructData.js.functionExecutable-&gt;generatedJITCodeForConstruct()-&gt;execute(&amp;vm, &amp;protoCallFrame);
</span><span class="lines">@@ -1153,7 +1122,6 @@
</span><span class="cx"> JSValue Interpreter::execute(CallFrameClosure&amp; closure) 
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = *closure.vm;
</span><del>-    SamplingScope samplingScope(this);
</del><span class="cx">     
</span><span class="cx">     ASSERT(!vm.isCollectorBusy());
</span><span class="cx">     RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock());
</span><span class="lines">@@ -1169,11 +1137,7 @@
</span><span class="cx">         return throwTerminatedExecutionException(closure.oldCallFrame);
</span><span class="cx"> 
</span><span class="cx">     // Execute the code:
</span><del>-    JSValue result;
-    {
-        SamplingTool::CallRecord callRecord(m_sampler.get());
-        result = closure.functionExecutable-&gt;generatedJITCodeForCall()-&gt;execute(&amp;vm, closure.protoCallFrame);
-    }
</del><ins>+    JSValue result = closure.functionExecutable-&gt;generatedJITCodeForCall()-&gt;execute(&amp;vm, closure.protoCallFrame);
</ins><span class="cx"> 
</span><span class="cx">     if (LegacyProfiler* profiler = vm.enabledProfiler())
</span><span class="cx">         profiler-&gt;didExecute(closure.oldCallFrame, closure.function);
</span><span class="lines">@@ -1184,7 +1148,6 @@
</span><span class="cx"> JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue thisValue, JSScope* scope)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = *scope-&gt;vm();
</span><del>-    SamplingScope samplingScope(this);
</del><span class="cx">     
</span><span class="cx">     ASSERT(scope-&gt;vm() == &amp;callFrame-&gt;vm());
</span><span class="cx">     ASSERT(!vm.exception());
</span><span class="lines">@@ -1280,11 +1243,7 @@
</span><span class="cx">         profiler-&gt;willExecute(callFrame, eval-&gt;sourceURL(), eval-&gt;firstLine(), eval-&gt;startColumn());
</span><span class="cx"> 
</span><span class="cx">     // Execute the code:
</span><del>-    JSValue result;
-    {
-        SamplingTool::CallRecord callRecord(m_sampler.get());
-        result = eval-&gt;generatedJITCode()-&gt;execute(&amp;vm, &amp;protoCallFrame);
-    }
</del><ins>+    JSValue result = eval-&gt;generatedJITCode()-&gt;execute(&amp;vm, &amp;protoCallFrame);
</ins><span class="cx"> 
</span><span class="cx">     if (LegacyProfiler* profiler = vm.enabledProfiler())
</span><span class="cx">         profiler-&gt;didExecute(callFrame, eval-&gt;sourceURL(), eval-&gt;firstLine(), eval-&gt;startColumn());
</span><span class="lines">@@ -1295,7 +1254,6 @@
</span><span class="cx"> JSValue Interpreter::execute(ModuleProgramExecutable* executable, CallFrame* callFrame, JSModuleEnvironment* scope)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = *scope-&gt;vm();
</span><del>-    SamplingScope samplingScope(this);
</del><span class="cx"> 
</span><span class="cx">     ASSERT(scope-&gt;vm() == &amp;callFrame-&gt;vm());
</span><span class="cx">     ASSERT(!vm.exception());
</span><span class="lines">@@ -1328,11 +1286,7 @@
</span><span class="cx">         profiler-&gt;willExecute(callFrame, executable-&gt;sourceURL(), executable-&gt;firstLine(), executable-&gt;startColumn());
</span><span class="cx"> 
</span><span class="cx">     // Execute the code:
</span><del>-    JSValue result;
-    {
-        SamplingTool::CallRecord callRecord(m_sampler.get());
-        result = executable-&gt;generatedJITCode()-&gt;execute(&amp;vm, &amp;protoCallFrame);
-    }
</del><ins>+    JSValue result = executable-&gt;generatedJITCode()-&gt;execute(&amp;vm, &amp;protoCallFrame);
</ins><span class="cx"> 
</span><span class="cx">     if (LegacyProfiler* profiler = vm.enabledProfiler())
</span><span class="cx">         profiler-&gt;didExecute(callFrame, executable-&gt;sourceURL(), executable-&gt;firstLine(), executable-&gt;startColumn());
</span><span class="lines">@@ -1372,40 +1326,4 @@
</span><span class="cx">     ASSERT(!callFrame-&gt;hadException());
</span><span class="cx"> }    
</span><span class="cx"> 
</span><del>-void Interpreter::enableSampler()
-{
-#if ENABLE(OPCODE_SAMPLING)
-    if (!m_sampler) {
-        m_sampler = std::make_unique&lt;SamplingTool&gt;(this);
-        m_sampler-&gt;setup();
-    }
-#endif
-}
-void Interpreter::dumpSampleData(ExecState* exec)
-{
-#if ENABLE(OPCODE_SAMPLING)
-    if (m_sampler)
-        m_sampler-&gt;dump(exec);
-#else
-    UNUSED_PARAM(exec);
-#endif
-}
-void Interpreter::startSampling()
-{
-#if ENABLE(SAMPLING_THREAD)
-    if (!m_sampleEntryDepth)
-        SamplingThread::start();
-
-    m_sampleEntryDepth++;
-#endif
-}
-void Interpreter::stopSampling()
-{
-#if ENABLE(SAMPLING_THREAD)
-    m_sampleEntryDepth--;
-    if (!m_sampleEntryDepth)
-        SamplingThread::stop();
-#endif
-}
-
</del><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpreterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -59,7 +59,6 @@
</span><span class="cx">     class ModuleProgramExecutable;
</span><span class="cx">     class Register;
</span><span class="cx">     class JSScope;
</span><del>-    class SamplingTool;
</del><span class="cx">     struct CallFrameClosure;
</span><span class="cx">     struct HandlerInfo;
</span><span class="cx">     struct Instruction;
</span><span class="lines">@@ -221,8 +220,6 @@
</span><span class="cx"> 
</span><span class="cx">         void getArgumentsData(CallFrame*, JSFunction*&amp;, ptrdiff_t&amp; firstParameterIndex, Register*&amp; argv, int&amp; argc);
</span><span class="cx">         
</span><del>-        SamplingTool* sampler() { return m_sampler.get(); }
-
</del><span class="cx">         NEVER_INLINE HandlerInfo* unwind(VM&amp;, CallFrame*&amp;, Exception*, UnwindStart);
</span><span class="cx">         void notifyDebuggerOfExceptionToBeThrown(CallFrame*, Exception*);
</span><span class="cx">         NEVER_INLINE void debug(CallFrame*, DebugHookID);
</span><span class="lines">@@ -233,10 +230,6 @@
</span><span class="cx">         static EncodedJSValue JSC_HOST_CALL constructWithNativeErrorConstructor(ExecState*);
</span><span class="cx">         static EncodedJSValue JSC_HOST_CALL callNativeErrorConstructor(ExecState*);
</span><span class="cx"> 
</span><del>-        void dumpSampleData(ExecState* exec);
-        void startSampling();
-        void stopSampling();
-
</del><span class="cx">         JS_EXPORT_PRIVATE void dumpCallFrame(CallFrame*);
</span><span class="cx"> 
</span><span class="cx">         void getStackTrace(Vector&lt;StackFrame&gt;&amp; results, size_t maxStackSize = std::numeric_limits&lt;size_t&gt;::max());
</span><span class="lines">@@ -254,10 +247,6 @@
</span><span class="cx">         
</span><span class="cx">         bool isCallBytecode(Opcode opcode) { return opcode == getOpcode(op_call) || opcode == getOpcode(op_construct) || opcode == getOpcode(op_call_eval) || opcode == getOpcode(op_tail_call); }
</span><span class="cx"> 
</span><del>-        void enableSampler();
-        int m_sampleEntryDepth;
-        std::unique_ptr&lt;SamplingTool&gt; m_sampler;
-
</del><span class="cx">         VM&amp; m_vm;
</span><span class="cx">         JSStack m_stack;
</span><span class="cx">         int m_errorHandlingModeReentry;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitAssemblyHelperscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -148,6 +148,16 @@
</span><span class="cx">         TrustedImm32(FastTypedArray));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void AssemblyHelpers::incrementSuperSamplerCount()
+{
+    add32(TrustedImm32(1), AbsoluteAddress(bitwise_cast&lt;const void*&gt;(&amp;g_superSamplerCount)));
+}
+
+void AssemblyHelpers::decrementSuperSamplerCount()
+{
+    sub32(TrustedImm32(1), AbsoluteAddress(bitwise_cast&lt;const void*&gt;(&amp;g_superSamplerCount)));
+}
+    
</ins><span class="cx"> void AssemblyHelpers::purifyNaN(FPRReg fpr)
</span><span class="cx"> {
</span><span class="cx">     MacroAssembler::Jump notNaN = branchDouble(DoubleEqual, fpr, fpr);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitAssemblyHelpersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include &quot;MaxFrameExtentForSlowPathCall.h&quot;
</span><span class="cx"> #include &quot;RegisterAtOffsetList.h&quot;
</span><span class="cx"> #include &quot;RegisterSet.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &quot;TypeofType.h&quot;
</span><span class="cx"> #include &quot;VM.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -1006,6 +1007,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void jitReleaseAssertNoException();
</span><ins>+
+    void incrementSuperSamplerCount();
+    void decrementSuperSamplerCount();
</ins><span class="cx">     
</span><span class="cx">     void purifyNaN(FPRReg);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JIT.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> #include &quot;PCToCodeOriginMap.h&quot;
</span><span class="cx"> #include &quot;ProfilerDatabase.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SlowPathCall.h&quot;
</span><span class="cx"> #include &quot;StackAlignment.h&quot;
</span><span class="cx"> #include &quot;TypeProfilerLog.h&quot;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JIT.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> #include &quot;Opcode.h&quot;
</span><span class="cx"> #include &quot;PCToCodeOriginMap.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;UnusedPointer.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITArithmeticcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx"> #include &quot;Interpreter.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SlowPathCall.h&quot;
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITArithmetic32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include &quot;Interpreter.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SlowPathCall.h&quot;
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITCallcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITCall.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITCall.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITCall.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;LinkBuffer.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SetupVarargsFrame.h&quot;
</span><span class="cx"> #include &quot;StackAlignment.h&quot;
</span><span class="cx"> #include &quot;ThunkGenerators.h&quot;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITCall32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;LinkBuffer.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SetupVarargsFrame.h&quot;
</span><span class="cx"> #include &quot;StackAlignment.h&quot;
</span><span class="cx"> #include &lt;wtf/StringPrintStream.h&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #include &quot;PropertyName.h&quot;
</span><span class="cx"> #include &quot;Repatch.h&quot;
</span><span class="cx"> #include &quot;ScopedArguments.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &quot;TestRunnerUtils.h&quot;
</span><span class="cx"> #include &quot;TypeProfilerLog.h&quot;
</span><span class="cx"> #include &quot;VMInlines.h&quot;
</span><span class="lines">@@ -1034,6 +1035,7 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
</ins><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><span class="cx">     RegExp* regexp = static_cast&lt;RegExp*&gt;(regexpPtr);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITPropertyAccesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include &quot;JSFunction.h&quot;
</span><span class="cx"> #include &quot;LinkBuffer.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;ScopedArguments.h&quot;
</span><span class="cx"> #include &quot;ScopedArgumentsTable.h&quot;
</span><span class="cx"> #include &quot;SlowPathCall.h&quot;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITPropertyAccess32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include &quot;JSFunction.h&quot;
</span><span class="cx"> #include &quot;LinkBuffer.h&quot;
</span><span class="cx"> #include &quot;ResultType.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SlowPathCall.h&quot;
</span><span class="cx"> #include &lt;wtf/StringPrintStream.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jsc.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jsc.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/jsc.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -51,10 +51,10 @@
</span><span class="cx"> #include &quot;JSWASMModule.h&quot;
</span><span class="cx"> #include &quot;ProfilerDatabase.h&quot;
</span><span class="cx"> #include &quot;SamplingProfiler.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;StackVisitor.h&quot;
</span><span class="cx"> #include &quot;StructureInlines.h&quot;
</span><span class="cx"> #include &quot;StructureRareDataInlines.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &quot;TestRunnerUtils.h&quot;
</span><span class="cx"> #include &quot;TypeProfilerLog.h&quot;
</span><span class="cx"> #include &quot;WASMModuleParser.h&quot;
</span><span class="lines">@@ -1919,8 +1919,6 @@
</span><span class="cx">             fileName = ASCIILiteral(&quot;[Command Line]&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        vm.startSampling();
-
</del><span class="cx">         if (module) {
</span><span class="cx">             if (!promise)
</span><span class="cx">                 promise = loadAndEvaluateModule(globalObject-&gt;globalExec(), jscSource(scriptBuffer, fileName));
</span><span class="lines">@@ -1936,20 +1934,9 @@
</span><span class="cx">             dumpException(globalObject, evaluationException);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        vm.stopSampling();
</del><span class="cx">         globalObject-&gt;globalExec()-&gt;clearException();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-#if ENABLE(SAMPLING_FLAGS)
-    SamplingFlags::stop();
-#endif
-#if ENABLE(SAMPLING_REGIONS)
-    SamplingRegion::dump();
-#endif
-    vm.dumpSampleData(globalObject-&gt;globalExec());
-#if ENABLE(SAMPLING_COUNTERS)
-    AbstractSamplingCounter::dump();
-#endif
</del><span class="cx"> #if ENABLE(REGEXP_TRACING)
</span><span class="cx">     vm.dumpRegExpTrace();
</span><span class="cx"> #endif
</span><span class="lines">@@ -2210,6 +2197,8 @@
</span><span class="cx">         vm-&gt;heap.collectAllGarbage();
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    printSuperSamplerState();
+
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserNodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Nodes.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Nodes.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/parser/Nodes.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #include &quot;Parser.h&quot;
</span><span class="cx"> #include &quot;PropertyNameArray.h&quot;
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCountedLeakCounter.h&gt;
</span><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1654,8 +1654,6 @@
</span><span class="cx">     ConstructorKind defaultConstructorKind = ConstructorKind::None, ThisTDZMode thisTDZMode = ThisTDZMode::CheckIfNeeded,
</span><span class="cx">     DerivedContextType derivedContextType = DerivedContextType::None)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;Parsing&quot;);
-
</del><span class="cx">     ASSERT(!source.provider()-&gt;source().isNull());
</span><span class="cx">     if (source.provider()-&gt;source().is8Bit()) {
</span><span class="cx">         Parser&lt;Lexer&lt;LChar&gt;&gt; parser(vm, source, builtinMode, strictMode, parseMode, superBinding, defaultConstructorKind, thisTDZMode, derivedContextType, isEvalNode&lt;ParsedNode&gt;());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include &quot;InferredValue.h&quot;
</span><span class="cx"> #include &quot;JITCode.h&quot;
</span><span class="cx"> #include &quot;JSGlobalObject.h&quot;
</span><del>-#include &quot;SamplingTool.h&quot;
</del><span class="cx"> #include &quot;SourceCode.h&quot;
</span><span class="cx"> #include &quot;TypeSet.h&quot;
</span><span class="cx"> #include &quot;UnlinkedCodeBlock.h&quot;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeInitializeThreadingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include &quot;JSLock.h&quot;
</span><span class="cx"> #include &quot;LLIntData.h&quot;
</span><span class="cx"> #include &quot;StructureIDTable.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &quot;WriteBarrier.h&quot;
</span><span class="cx"> #include &lt;mutex&gt;
</span><span class="cx"> #include &lt;wtf/dtoa.h&gt;
</span><span class="lines">@@ -69,6 +70,7 @@
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         DisallowGC::initialize();
</span><span class="cx"> #endif
</span><ins>+        initializeSuperSampler();
</ins><span class="cx">         WTFThreadData&amp; threadData = wtfThreadData();
</span><span class="cx">         threadData.setSavedLastStackTop(threadData.stack().origin());
</span><span class="cx">     });
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/Options.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -348,6 +348,8 @@
</span><span class="cx">     v(bool, dumpModuleRecord, false, nullptr) \
</span><span class="cx">     v(bool, dumpModuleLoadingState, false, nullptr) \
</span><span class="cx">     v(bool, exposeInternalModuleLoader, false, &quot;expose the internal module loader object to the global space for debugging&quot;) \
</span><ins>+    \
+    v(bool, useSuperSampler, false, nullptr)
</ins><span class="cx"> 
</span><span class="cx"> enum OptionEquivalence {
</span><span class="cx">     SameOption,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpCachedResulth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpCachedResult.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpCachedResult.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/RegExpCachedResult.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #define RegExpCachedResult_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpMatchesArrayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -52,8 +52,6 @@
</span><span class="cx">     VM&amp; vm, JSGlobalObject* globalObject, JSString* input, const String&amp; inputValue,
</span><span class="cx">     RegExp* regExp, unsigned startOffset, MatchResult&amp; result)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;createRegExpMatchesArray&quot;);
-    
</del><span class="cx">     Vector&lt;int, 32&gt; subpatternResults;
</span><span class="cx">     int position = regExp-&gt;matchInline(vm, inputValue, startOffset, subpatternResults);
</span><span class="cx">     if (position == -1) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStringPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;RegExpConstructor.h&quot;
</span><span class="cx"> #include &quot;RegExpMatchesArray.h&quot;
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &lt;algorithm&gt;
</span><span class="cx"> #include &lt;unicode/uconfig.h&gt;
</span><span class="cx"> #include &lt;unicode/unorm.h&gt;
</span><span class="lines">@@ -447,6 +448,8 @@
</span><span class="cx"> 
</span><span class="cx"> static ALWAYS_INLINE EncodedJSValue removeUsingRegExpSearch(ExecState* exec, JSString* string, const String&amp; source, RegExp* regExp)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
+    
</ins><span class="cx">     size_t lastIndex = 0;
</span><span class="cx">     unsigned startPosition = 0;
</span><span class="cx"> 
</span><span class="lines">@@ -1468,7 +1471,6 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL stringProtoFuncSubstring(ExecState* exec)
</span><span class="cx"> {
</span><del>-    SamplingRegion samplingRegion(&quot;Doing substringing&quot;);
</del><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!checkObjectCoercible(thisValue))
</span><span class="cx">         return throwVMTypeError(exec);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -528,16 +528,6 @@
</span><span class="cx">     dateInstanceCache.reset();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void VM::startSampling()
-{
-    interpreter-&gt;startSampling();
-}
-
-void VM::stopSampling()
-{
-    interpreter-&gt;stopSampling();
-}
-
</del><span class="cx"> void VM::whenIdle(std::function&lt;void()&gt; callback)
</span><span class="cx"> {
</span><span class="cx">     if (!entryScope) {
</span><span class="lines">@@ -575,14 +565,6 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void VM::dumpSampleData(ExecState* exec)
-{
-    interpreter-&gt;dumpSampleData(exec);
-#if ENABLE(ASSEMBLER)
-    ExecutableAllocator::dumpProfile();
-#endif
-}
-
</del><span class="cx"> SourceProviderCache* VM::addSourceProviderCache(SourceProvider* sourceProvider)
</span><span class="cx"> {
</span><span class="cx">     auto addResult = sourceProviderCacheMap.add(sourceProvider, nullptr);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -553,9 +553,6 @@
</span><span class="cx"> 
</span><span class="cx">     JS_EXPORT_PRIVATE void resetDateCache();
</span><span class="cx"> 
</span><del>-    JS_EXPORT_PRIVATE void startSampling();
-    JS_EXPORT_PRIVATE void stopSampling();
-    JS_EXPORT_PRIVATE void dumpSampleData(ExecState*);
</del><span class="cx">     RegExpCache* regExpCache() { return m_regExpCache; }
</span><span class="cx"> #if ENABLE(REGEXP_TRACING)
</span><span class="cx">     void addRegExpToTrace(RegExp*);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestRegExpcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/testRegExp.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/testRegExp.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/testRegExp.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -489,7 +489,6 @@
</span><span class="cx"> 
</span><span class="cx">     delete[] lineBuffer;
</span><span class="cx"> 
</span><del>-    vm.dumpSampleData(globalObject-&gt;globalExec());
</del><span class="cx"> #if ENABLE(REGEXP_TRACING)
</span><span class="cx">     vm.dumpRegExpTrace();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreyarrYarrInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;YarrInterpreter.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;SuperSampler.h&quot;
</ins><span class="cx"> #include &quot;Yarr.h&quot;
</span><span class="cx"> #include &quot;YarrCanonicalize.h&quot;
</span><span class="cx"> #include &lt;wtf/BumpPointerAllocator.h&gt;
</span><span class="lines">@@ -2034,6 +2035,7 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned interpret(BytecodePattern* bytecode, const String&amp; input, unsigned start, unsigned* output)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
</ins><span class="cx">     if (input.is8Bit())
</span><span class="cx">         return Interpreter&lt;LChar&gt;(bytecode, output, input.characters8(), input.length(), start).interpret();
</span><span class="cx">     return Interpreter&lt;UChar&gt;(bytecode, output, input.characters16(), input.length(), start).interpret();
</span><span class="lines">@@ -2041,11 +2043,13 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned interpret(BytecodePattern* bytecode, const LChar* input, unsigned length, unsigned start, unsigned* output)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
</ins><span class="cx">     return Interpreter&lt;LChar&gt;(bytecode, output, input, length, start).interpret();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned interpret(BytecodePattern* bytecode, const UChar* input, unsigned length, unsigned start, unsigned* output)
</span><span class="cx"> {
</span><ins>+    SuperSamplerScope superSamplerScope(false);
</ins><span class="cx">     return Interpreter&lt;UChar&gt;(bytecode, output, input, length, start).interpret();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WTF/ChangeLog        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-03-16  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
+        https://bugs.webkit.org/show_bug.cgi?id=155561
+
+        Reviewed by Saam Barati.
+
+        This patch replaces all of our various ad hoc profiling hacks with a single ad hoc profiling hack.
+        That needs to be able to sleep a thread, so I added a portable way to do it.
+
+        This also removes a bunch of ENABLE flags for all of the old non-working hacks.
+
+        * wtf/CurrentTime.cpp:
+        (WTF::currentCPUTime):
+        (WTF::sleep):
+        * wtf/CurrentTime.h:
+        (WTF::sleepMS):
+        * wtf/Platform.h:
+
</ins><span class="cx"> 2016-03-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Set the WebContent process's main thread QoS to USER-INTERACTIVE
</span></span></pre></div>
<a id="trunkSourceWTFwtfCurrentTimecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CurrentTime.cpp (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CurrentTime.cpp        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WTF/wtf/CurrentTime.cpp        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -34,6 +34,9 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CurrentTime.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;Condition.h&quot;
+#include &quot;Lock.h&quot;
+
</ins><span class="cx"> #if OS(DARWIN)
</span><span class="cx"> #include &lt;mach/mach.h&gt;
</span><span class="cx"> #include &lt;mach/mach_time.h&gt;
</span><span class="lines">@@ -327,4 +330,17 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void sleep(double value)
+{
+    // It's very challenging to find portable ways of sleeping for less than a second. On UNIX, you want to
+    // use usleep() but it's hard to #include it in a portable way (you'd think it's in unistd.h, but then
+    // you'd be wrong on some OSX SDKs). Also, usleep() won't save you on Windows. Hence, bottoming out in
+    // lock code, which already solves the sleeping problem, is probably for the best.
+    
+    Lock fakeLock;
+    Condition fakeCondition;
+    LockHolder fakeLocker(fakeLock);
+    fakeCondition.waitUntilMonotonicClockSeconds(fakeLock, monotonicallyIncreasingTime() + value);
+}
+
</ins><span class="cx"> } // namespace WTF
</span></span></pre></div>
<a id="trunkSourceWTFwtfCurrentTimeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CurrentTime.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CurrentTime.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WTF/wtf/CurrentTime.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -66,12 +66,21 @@
</span><span class="cx"> // than a millisecond.
</span><span class="cx"> WTF_EXPORT_PRIVATE std::chrono::microseconds currentCPUTime();
</span><span class="cx"> 
</span><ins>+WTF_EXPORT_PRIVATE void sleep(double);
+
+inline void sleepMS(double value)
+{
+    sleep(value / 1000.0);
+}
+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><ins>+using WTF::currentCPUTime;
</ins><span class="cx"> using WTF::currentTime;
</span><span class="cx"> using WTF::currentTimeMS;
</span><span class="cx"> using WTF::monotonicallyIncreasingTime;
</span><span class="cx"> using WTF::monotonicallyIncreasingTimeMS;
</span><del>-using WTF::currentCPUTime;
</del><ins>+using WTF::sleep;
+using WTF::sleepMS;
</ins><span class="cx"> 
</span><span class="cx"> #endif // CurrentTime_h
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Platform.h (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Platform.h        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WTF/wtf/Platform.h        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -677,19 +677,6 @@
</span><span class="cx"> #define USE_SYSTEM_MALLOC 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#define ENABLE_DEBUG_WITH_BREAKPOINT 0
-#define ENABLE_SAMPLING_COUNTERS 0
-#define ENABLE_SAMPLING_FLAGS 0
-#define ENABLE_SAMPLING_REGIONS 0
-#define ENABLE_OPCODE_SAMPLING 0
-#define ENABLE_CODEBLOCK_SAMPLING 0
-#if ENABLE(CODEBLOCK_SAMPLING) &amp;&amp; !ENABLE(OPCODE_SAMPLING)
-#error &quot;CODEBLOCK_SAMPLING requires OPCODE_SAMPLING&quot;
-#endif
-#if ENABLE(OPCODE_SAMPLING) || ENABLE(SAMPLING_FLAGS) || ENABLE(SAMPLING_REGIONS)
-#define ENABLE_SAMPLING_THREAD 1
-#endif
-
</del><span class="cx"> #if !defined(USE_JSVALUE64) &amp;&amp; !defined(USE_JSVALUE32_64)
</span><span class="cx"> #if (CPU(X86_64) &amp;&amp; (OS(UNIX) || OS(WINDOWS))) \
</span><span class="cx">     || (CPU(IA64) &amp;&amp; !CPU(IA64_32)) \
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WebCore/ChangeLog        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-17  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
+        https://bugs.webkit.org/show_bug.cgi?id=155561
+
+        Reviewed by Saam Barati.
+
+        No new tests because no new behavior.
+
+        * platform/audio/ios/MediaSessionManagerIOS.mm:
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+
</ins><span class="cx"> 2016-03-17  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Some media tests are flaky.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioiosMediaSessionManagerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #import &lt;MediaPlayer/MPVolumeView.h&gt;
</span><span class="cx"> #import &lt;UIKit/UIApplication.h&gt;
</span><span class="cx"> #import &lt;objc/runtime.h&gt;
</span><ins>+#import &lt;wtf/MainThread.h&gt;
</ins><span class="cx"> #import &lt;wtf/RAMSize.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (198363 => 198364)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2016-03-18 00:50:46 UTC (rev 198363)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2016-03-18 00:53:24 UTC (rev 198364)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> #import &lt;wtf/text/AtomicString.h&gt;
</span><span class="cx"> #import &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #import &lt;wtf/HashCountedSet.h&gt;
</span><ins>+#import &lt;wtf/MainThread.h&gt;
</ins><span class="cx"> #import &lt;wtf/WeakPtr.h&gt;
</span><span class="cx"> #import &lt;map&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>