Skip to content

Commit 32ea879

Browse files
author
Filip Pizlo
committed
JSC profiler should show reasons for jettison
https://bugs.webkit.org/show_bug.cgi?id=128047 Source/JavaScriptCore: Reviewed by Geoffrey Garen. Henceforth if you want to jettison a CodeBlock, you gotta tell the Profiler why you did it. This makes figuring out convergence issues - where some code seems to take a long time to get into the top tier compiler - a lot easier. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::finalizeUnconditionally): (JSC::CodeBlock::jettison): (JSC::CodeBlock::addBreakpoint): (JSC::CodeBlock::setSteppingMode): * bytecode/CodeBlock.h: * bytecode/CodeBlockJettisoningWatchpoint.cpp: (JSC::CodeBlockJettisoningWatchpoint::fireInternal): * bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp: (JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal): * dfg/DFGOperations.cpp: * jit/JITOperations.cpp: * profiler/ProfilerCompilation.cpp: (JSC::Profiler::Compilation::Compilation): (JSC::Profiler::Compilation::toJS): * profiler/ProfilerCompilation.h: (JSC::Profiler::Compilation::setJettisonReason): * profiler/ProfilerJettisonReason.cpp: Added. (WTF::printInternal): * profiler/ProfilerJettisonReason.h: Added. * runtime/CommonIdentifiers.h: * runtime/VM.cpp: (JSC::SetEnabledProfilerFunctor::operator()): Tools: Reviewed by Geoffrey Garen. Gave the tool a "log" command, that tells you all of the interesting things that happened to a piece of bytecode, from the standpoint of optimization. It's a great summary view for seeing how our tier-up machinery works. This uses a lot of information that was already available, plus the newly added jettisonReason field. * Scripts/display-profiler-output: Canonical link: https://commits.webkit.org/146072@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 8f85c92 commit 32ea879

19 files changed

Lines changed: 345 additions & 86 deletions

‎Source/JavaScriptCore/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ set(JavaScriptCore_SOURCES
304304
profiler/ProfilerCompilationKind.cpp
305305
profiler/ProfilerCompiledBytecode.cpp
306306
profiler/ProfilerDatabase.cpp
307+
profiler/ProfilerJettisonReason.cpp
307308
profiler/ProfilerOSRExit.cpp
308309
profiler/ProfilerOSRExitSite.cpp
309310
profiler/ProfilerOrigin.cpp

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
2014-02-01 Filip Pizlo <fpizlo@apple.com>
2+
3+
JSC profiler should show reasons for jettison
4+
https://bugs.webkit.org/show_bug.cgi?id=128047
5+
6+
Reviewed by Geoffrey Garen.
7+
8+
Henceforth if you want to jettison a CodeBlock, you gotta tell the Profiler why you did
9+
it. This makes figuring out convergence issues - where some code seems to take a long
10+
time to get into the top tier compiler - a lot easier.
11+
12+
* CMakeLists.txt:
13+
* GNUmakefile.list.am:
14+
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
15+
* JavaScriptCore.xcodeproj/project.pbxproj:
16+
* bytecode/CodeBlock.cpp:
17+
(JSC::CodeBlock::finalizeUnconditionally):
18+
(JSC::CodeBlock::jettison):
19+
(JSC::CodeBlock::addBreakpoint):
20+
(JSC::CodeBlock::setSteppingMode):
21+
* bytecode/CodeBlock.h:
22+
* bytecode/CodeBlockJettisoningWatchpoint.cpp:
23+
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
24+
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
25+
(JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):
26+
* dfg/DFGOperations.cpp:
27+
* jit/JITOperations.cpp:
28+
* profiler/ProfilerCompilation.cpp:
29+
(JSC::Profiler::Compilation::Compilation):
30+
(JSC::Profiler::Compilation::toJS):
31+
* profiler/ProfilerCompilation.h:
32+
(JSC::Profiler::Compilation::setJettisonReason):
33+
* profiler/ProfilerJettisonReason.cpp: Added.
34+
(WTF::printInternal):
35+
* profiler/ProfilerJettisonReason.h: Added.
36+
* runtime/CommonIdentifiers.h:
37+
* runtime/VM.cpp:
38+
(JSC::SetEnabledProfilerFunctor::operator()):
39+
140
2014-02-01 Mark Lam <mark.lam@apple.com>
241

342
Saying "jitType() == JITCode::DFGJIT" is almost never correct.

‎Source/JavaScriptCore/GNUmakefile.list.am‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,8 @@ javascriptcore_sources += \
819819
Source/JavaScriptCore/profiler/ProfilerDatabase.cpp \
820820
Source/JavaScriptCore/profiler/ProfilerDatabase.h \
821821
Source/JavaScriptCore/profiler/ProfilerExecutionCounter.h \
822+
Source/JavaScriptCore/profiler/ProfilerJettisonReason.cpp \
823+
Source/JavaScriptCore/profiler/ProfilerJettisonReason.h \
822824
Source/JavaScriptCore/profiler/ProfilerOrigin.cpp \
823825
Source/JavaScriptCore/profiler/ProfilerOrigin.h \
824826
Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp \

‎Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@
553553
<ClCompile Include="..\profiler\ProfilerCompilationKind.cpp" />
554554
<ClCompile Include="..\profiler\ProfilerCompiledBytecode.cpp" />
555555
<ClCompile Include="..\profiler\ProfilerDatabase.cpp" />
556+
<ClCompile Include="..\profiler\ProfilerJettisonReason.cpp" />
556557
<ClCompile Include="..\profiler\ProfilerOrigin.cpp" />
557558
<ClCompile Include="..\profiler\ProfilerOriginStack.cpp" />
558559
<ClCompile Include="..\profiler\ProfilerOSRExit.cpp" />
@@ -1163,6 +1164,7 @@
11631164
<ClInclude Include="..\profiler\ProfilerCompiledBytecode.h" />
11641165
<ClInclude Include="..\profiler\ProfilerDatabase.h" />
11651166
<ClInclude Include="..\profiler\ProfilerExecutionCounter.h" />
1167+
<ClInclude Include="..\profiler\ProfilerJettisonReason.h" />
11661168
<ClInclude Include="..\profiler\ProfilerOrigin.h" />
11671169
<ClInclude Include="..\profiler\ProfilerOriginStack.h" />
11681170
<ClInclude Include="..\profiler\ProfilerOSRExit.h" />

‎Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */; settings = {ATTRIBUTES = (Private, ); }; };
8282
0F16015D156198C900C2587C /* DFGArgumentsSimplificationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F16015A156198BF00C2587C /* DFGArgumentsSimplificationPhase.cpp */; };
8383
0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F16015B156198BF00C2587C /* DFGArgumentsSimplificationPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
84+
0F190CAC189D82F6000AE5F0 /* ProfilerJettisonReason.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F190CAA189D82F6000AE5F0 /* ProfilerJettisonReason.cpp */; };
85+
0F190CAD189D82F6000AE5F0 /* ProfilerJettisonReason.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F190CAB189D82F6000AE5F0 /* ProfilerJettisonReason.h */; settings = {ATTRIBUTES = (Private, ); }; };
8486
0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1E3A431534CBAD000F9456 /* DFGArgumentPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
8587
0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1E3A441534CBAD000F9456 /* DFGDoubleFormatState.h */; settings = {ATTRIBUTES = (Private, ); }; };
8688
0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1E3A65153A21DF000F9456 /* DFGSilentRegisterSavePlan.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -922,7 +924,6 @@
922924
A503FA19188E0FB000110F14 /* JavaScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A503FA13188E0FAF00110F14 /* JavaScriptCallFrame.cpp */; };
923925
A503FA1A188E0FB000110F14 /* JavaScriptCallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA14188E0FAF00110F14 /* JavaScriptCallFrame.h */; };
924926
A503FA1B188E0FB000110F14 /* JSJavaScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A503FA15188E0FB000110F14 /* JSJavaScriptCallFrame.cpp */; };
925-
A503FA1C188E0FB000110F14 /* JSJavaScriptCallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA16188E0FB000110F14 /* JSJavaScriptCallFrame.h */; };
926927
A503FA1D188E0FB000110F14 /* JSJavaScriptCallFramePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A503FA17188E0FB000110F14 /* JSJavaScriptCallFramePrototype.cpp */; };
927928
A503FA1E188E0FB000110F14 /* JSJavaScriptCallFramePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA18188E0FB000110F14 /* JSJavaScriptCallFramePrototype.h */; };
928929
A503FA21188EFF6800110F14 /* ScriptBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA1F188EFF6800110F14 /* ScriptBreakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1498,6 +1499,8 @@
14981499
0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonSlowPaths.h; sourceTree = "<group>"; };
14991500
0F16015A156198BF00C2587C /* DFGArgumentsSimplificationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGArgumentsSimplificationPhase.cpp; path = dfg/DFGArgumentsSimplificationPhase.cpp; sourceTree = "<group>"; };
15001501
0F16015B156198BF00C2587C /* DFGArgumentsSimplificationPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArgumentsSimplificationPhase.h; path = dfg/DFGArgumentsSimplificationPhase.h; sourceTree = "<group>"; };
1502+
0F190CAA189D82F6000AE5F0 /* ProfilerJettisonReason.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerJettisonReason.cpp; path = profiler/ProfilerJettisonReason.cpp; sourceTree = "<group>"; };
1503+
0F190CAB189D82F6000AE5F0 /* ProfilerJettisonReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerJettisonReason.h; path = profiler/ProfilerJettisonReason.h; sourceTree = "<group>"; };
15011504
0F1E3A431534CBAD000F9456 /* DFGArgumentPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArgumentPosition.h; path = dfg/DFGArgumentPosition.h; sourceTree = "<group>"; };
15021505
0F1E3A441534CBAD000F9456 /* DFGDoubleFormatState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDoubleFormatState.h; path = dfg/DFGDoubleFormatState.h; sourceTree = "<group>"; };
15031506
0F1E3A501537C2CB000F9456 /* DFGSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGSlowPathGenerator.h; path = dfg/DFGSlowPathGenerator.h; sourceTree = "<group>"; };
@@ -4295,6 +4298,8 @@
42954298
0FF7299C166AD347000F5BA3 /* ProfilerDatabase.cpp */,
42964299
0FF7299D166AD347000F5BA3 /* ProfilerDatabase.h */,
42974300
0FF7299E166AD347000F5BA3 /* ProfilerExecutionCounter.h */,
4301+
0F190CAA189D82F6000AE5F0 /* ProfilerJettisonReason.cpp */,
4302+
0F190CAB189D82F6000AE5F0 /* ProfilerJettisonReason.h */,
42984303
0FF7299F166AD347000F5BA3 /* ProfilerOrigin.cpp */,
42994304
0FF729A0166AD347000F5BA3 /* ProfilerOrigin.h */,
43004305
0FF729A1166AD347000F5BA3 /* ProfilerOriginStack.cpp */,
@@ -4606,11 +4611,11 @@
46064611
86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */,
46074612
A5CEEE15187F3BAD00E55C99 /* InspectorAgent.h in Headers */,
46084613
65C0285D1717966800351E35 /* ARMv7DOpcode.h in Headers */,
4609-
2A68295B1875F80500B6C3E2 /* CopyWriteBarrier.h in Headers */,
4610-
2A4EC90C1860D6C20094F782 /* WriteBarrierBuffer.h in Headers */,
4614+
2A68295B1875F80500B6C3E2 /* CopyWriteBarrier.h in Headers */,
4615+
2A4EC90C1860D6C20094F782 /* WriteBarrierBuffer.h in Headers */,
46114616
FE5932A8183C5A2600A1ECCC /* VMEntryScope.h in Headers */,
46124617
A532439318569709002ED692 /* CodeGeneratorInspectorStrings.py in Headers */,
4613-
A532439218569709002ED692 /* CodeGeneratorInspector.py in Headers */,
4618+
A532439218569709002ED692 /* CodeGeneratorInspector.py in Headers */,
46144619
0F24E54F17EE274900ABB217 /* TempRegisterSet.h in Headers */,
46154620
A50E4B6418809DD50068A46D /* JSGlobalObjectRuntimeAgent.h in Headers */,
46164621
FEB58C15187B8B160098EF0B /* ErrorHandlingScope.h in Headers */,
@@ -4622,7 +4627,7 @@
46224627
0F8335B81639C1EA001443B5 /* ArrayAllocationProfile.h in Headers */,
46234628
A5840E29187CA5E600843B10 /* inline-and-minify-stylesheets-and-scripts.py in Headers */,
46244629
A5840E2B187CA75B00843B10 /* jsmin.py in Headers */,
4625-
A53243981856A489002ED692 /* InspectorJS.json in Headers */,
4630+
A53243981856A489002ED692 /* InspectorJS.json in Headers */,
46264631
A5840E2A187CA75900843B10 /* xxd.pl in Headers */,
46274632
FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */,
46284633
A7A8AF3517ADB5F3005AB174 /* ArrayBuffer.h in Headers */,
@@ -4733,7 +4738,7 @@
47334738
A1A009C01831A22D00CF8711 /* MacroAssemblerARM64.h in Headers */,
47344739
86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */,
47354740
0F485328187DFDEC0083B687 /* FTLAvailableRecovery.h in Headers */,
4736-
A593CF87184038CA00BFCE27 /* InspectorAgentRegistry.h in Headers */,
4741+
A593CF87184038CA00BFCE27 /* InspectorAgentRegistry.h in Headers */,
47374742
0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */,
47384743
0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */,
47394744
0FFFC95814EF90A200C72532 /* DFGCFAPhase.h in Headers */,
@@ -5142,6 +5147,7 @@
51425147
A700873E17CBE8D300C3E643 /* MapPrototype.h in Headers */,
51435148
C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */,
51445149
A51007C1187CC3C600B38879 /* JSGlobalObjectInspectorController.h in Headers */,
5150+
0F190CAD189D82F6000AE5F0 /* ProfilerJettisonReason.h in Headers */,
51455151
142D6F0913539A2800B02E86 /* MarkedBlock.h in Headers */,
51465152
141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */,
51475153
14D2F3DB139F4BE200491031 /* MarkedSpace.h in Headers */,
@@ -5976,7 +5982,7 @@
59765982
0F6B1CC51862C47800845D97 /* FTLUnwindInfo.cpp in Sources */,
59775983
0F9D339A1803ADB70073C2BC /* FTLStackMaps.cpp in Sources */,
59785984
0FEA0A161706BB9000BB722C /* FTLState.cpp in Sources */,
5979-
7C008CD2186F8A9300955C24 /* JSPromiseFunctions.cpp in Sources */,
5985+
7C008CD2186F8A9300955C24 /* JSPromiseFunctions.cpp in Sources */,
59805986
0F6B1CB5185FC9E900845D97 /* FTLJSCall.cpp in Sources */,
59815987
0F235BE117178E1C00690C7F /* FTLThunks.cpp in Sources */,
59825988
A593CF7C1840360300BFCE27 /* InspectorBackendDispatcher.cpp in Sources */,
@@ -6151,6 +6157,7 @@
61516157
14469DE3107EC7E700650446 /* NumberObject.cpp in Sources */,
61526158
14469DE4107EC7E700650446 /* NumberPrototype.cpp in Sources */,
61536159
86F3EEBE168CDE930077B92A /* ObjCCallbackFunction.mm in Sources */,
6160+
0F190CAC189D82F6000AE5F0 /* ProfilerJettisonReason.cpp in Sources */,
61546161
14469DE5107EC7E700650446 /* ObjectConstructor.cpp in Sources */,
61556162
14469DE6107EC7E700650446 /* ObjectPrototype.cpp in Sources */,
61566163
E124A8F80E555775003091F1 /* OpaqueJSString.cpp in Sources */,

‎Source/JavaScriptCore/bytecode/CodeBlock.cpp‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,7 +2287,7 @@ void CodeBlock::finalizeUnconditionally()
22872287
}
22882288
}
22892289

2290-
jettison();
2290+
jettison(Profiler::JettisonDueToWeakReference);
22912291
return;
22922292
}
22932293
#endif // ENABLE(DFG_JIT)
@@ -2766,19 +2766,24 @@ DFG::CapabilityLevel FunctionCodeBlock::capabilityLevelInternal()
27662766
}
27672767
#endif
27682768

2769-
void CodeBlock::jettison(ReoptimizationMode mode)
2769+
void CodeBlock::jettison(Profiler::JettisonReason reason, ReoptimizationMode mode)
27702770
{
2771+
RELEASE_ASSERT(reason != Profiler::NotJettisoned);
2772+
27712773
#if ENABLE(DFG_JIT)
27722774
if (DFG::shouldShowDisassembly()) {
27732775
dataLog("Jettisoning ", *this);
27742776
if (mode == CountReoptimization)
27752777
dataLog(" and counting reoptimization");
2776-
dataLog(".\n");
2778+
dataLog(" due to ", reason, ".\n");
27772779
}
27782780

27792781
DeferGCForAWhile deferGC(*m_heap);
27802782
RELEASE_ASSERT(JITCode::isOptimizingJIT(jitType()));
27812783

2784+
if (Profiler::Compilation* compilation = jitCode()->dfgCommon()->compilation.get())
2785+
compilation->setJettisonReason(reason);
2786+
27822787
// We want to accomplish two things here:
27832788
// 1) Make sure that if this CodeBlock is on the stack right now, then if we return to it
27842789
// we should OSR exit at the top of the next bytecode instruction after the return.
@@ -3559,14 +3564,14 @@ void CodeBlock::addBreakpoint(unsigned numBreakpoints)
35593564
m_numBreakpoints += numBreakpoints;
35603565
ASSERT(m_numBreakpoints);
35613566
if (JITCode::isOptimizingJIT(jitType()))
3562-
jettison();
3567+
jettison(Profiler::JettisonDueToDebuggerBreakpoint);
35633568
}
35643569

35653570
void CodeBlock::setSteppingMode(CodeBlock::SteppingMode mode)
35663571
{
35673572
m_steppingMode = mode;
35683573
if (mode == SteppingModeEnabled && JITCode::isOptimizingJIT(jitType()))
3569-
jettison();
3574+
jettison(Profiler::JettisonDueToDebuggerStepping);
35703575
}
35713576

35723577
} // namespace JSC

‎Source/JavaScriptCore/bytecode/CodeBlock.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
#include "LLIntCallLinkInfo.h"
6767
#include "LazyOperandValueProfile.h"
6868
#include "ProfilerCompilation.h"
69+
#include "ProfilerJettisonReason.h"
6970
#include "RegExpObject.h"
7071
#include "StructureStubInfo.h"
7172
#include "UnconditionalFinalizer.h"
@@ -296,7 +297,7 @@ class CodeBlock : public ThreadSafeRefCounted<CodeBlock>, public UnconditionalFi
296297
bool hasOptimizedReplacement(); // the typeToReplace is my JITType
297298
#endif
298299

299-
void jettison(ReoptimizationMode = DontCountReoptimization);
300+
void jettison(Profiler::JettisonReason, ReoptimizationMode = DontCountReoptimization);
300301

301302
ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); }
302303

‎Source/JavaScriptCore/bytecode/CodeBlockJettisoningWatchpoint.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2013 Apple Inc. All rights reserved.
2+
* Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -36,7 +36,7 @@ void CodeBlockJettisoningWatchpoint::fireInternal()
3636
if (DFG::shouldShowDisassembly())
3737
dataLog("Firing watchpoint ", RawPointer(this), " on ", *m_codeBlock, "\n");
3838

39-
m_codeBlock->jettison(CountReoptimization);
39+
m_codeBlock->jettison(Profiler::JettisonDueToUnprofiledWatchpoint, CountReoptimization);
4040

4141
if (isOnList())
4242
remove();

‎Source/JavaScriptCore/bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void ProfiledCodeBlockJettisoningWatchpoint::fireInternal()
5656
exitingJITTypeFor(m_codeBlock->jitType())));
5757
}
5858

59-
m_codeBlock->jettison(CountReoptimization);
59+
m_codeBlock->jettison(Profiler::JettisonDueToProfiledWatchpoint, CountReoptimization);
6060

6161
if (isOnList())
6262
remove();

‎Source/JavaScriptCore/dfg/DFGOperations.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
2+
* Copyright (C) 2011, 2013, 2014 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -1107,7 +1107,7 @@ extern "C" void JIT_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock)
11071107
return;
11081108
}
11091109

1110-
optimizedCodeBlock->jettison(CountReoptimization);
1110+
optimizedCodeBlock->jettison(Profiler::JettisonDueToOSRExit, CountReoptimization);
11111111
}
11121112

11131113
#if ENABLE(FTL_JIT)

0 commit comments

Comments
 (0)