Changeset 48905 in webkit for trunk/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Sep 29, 2009, 2:48:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r48774 r48905 364 364 365 365 Interpreter::Interpreter() 366 : m_sample r(0)366 : m_sampleEntryDepth(0) 367 367 , m_reentryDepth(0) 368 368 { 369 369 privateExecute(InitializeAndReturn, 0, 0, 0); 370 #if ENABLE(OPCODE_SAMPLING) 371 enableSampler(); 372 #endif 370 373 } 371 374 … … 649 652 JSValue result; 650 653 { 651 SamplingTool::CallRecord callRecord(m_sampler );654 SamplingTool::CallRecord callRecord(m_sampler.get()); 652 655 653 656 m_reentryDepth++; … … 715 718 JSValue result; 716 719 { 717 SamplingTool::CallRecord callRecord(m_sampler );720 SamplingTool::CallRecord callRecord(m_sampler.get()); 718 721 719 722 m_reentryDepth++; … … 783 786 JSValue result; 784 787 { 785 SamplingTool::CallRecord callRecord(m_sampler );788 SamplingTool::CallRecord callRecord(m_sampler.get()); 786 789 787 790 m_reentryDepth++; … … 877 880 JSValue result; 878 881 { 879 SamplingTool::CallRecord callRecord(m_sampler );882 SamplingTool::CallRecord callRecord(m_sampler.get()); 880 883 881 884 m_reentryDepth++; … … 3057 3060 JSValue returnValue; 3058 3061 { 3059 SamplingTool::HostCallRecord callRecord(m_sampler );3062 SamplingTool::HostCallRecord callRecord(m_sampler.get()); 3060 3063 returnValue = callData.native.function(newCallFrame, asObject(v), thisValue, args); 3061 3064 } … … 3211 3214 JSValue returnValue; 3212 3215 { 3213 SamplingTool::HostCallRecord callRecord(m_sampler );3216 SamplingTool::HostCallRecord callRecord(m_sampler.get()); 3214 3217 returnValue = callData.native.function(newCallFrame, asObject(v), thisValue, args); 3215 3218 } … … 3463 3466 JSValue returnValue; 3464 3467 { 3465 SamplingTool::HostCallRecord callRecord(m_sampler );3468 SamplingTool::HostCallRecord callRecord(m_sampler.get()); 3466 3469 returnValue = constructData.native.function(newCallFrame, asObject(v), args); 3467 3470 } … … 3915 3918 } 3916 3919 3920 void Interpreter::enableSampler() 3921 { 3922 #if ENABLE(OPCODE_SAMPLING) 3923 if (!m_sampler) { 3924 m_sampler.set(new SamplingTool(this)); 3925 m_sampler->setup(); 3926 } 3927 #endif 3928 } 3929 void Interpreter::dumpSampleData(ExecState* exec) 3930 { 3931 #if ENABLE(OPCODE_SAMPLING) 3932 if (m_sampler) 3933 m_sampler->dump(exec); 3934 #else 3935 UNUSED_PARAM(exec); 3936 #endif 3937 } 3938 void Interpreter::startSampling() 3939 { 3940 #if ENABLE(SAMPLING_THREAD) 3941 if (!m_sampleEntryDepth) 3942 SamplingThread::start(); 3943 3944 m_sampleEntryDepth++; 3945 #endif 3946 } 3947 void Interpreter::stopSampling() 3948 { 3949 #if ENABLE(SAMPLING_THREAD) 3950 m_sampleEntryDepth--; 3951 if (!m_sampleEntryDepth) 3952 SamplingThread::stop(); 3953 #endif 3954 } 3955 3917 3956 } // namespace JSC
Note:
See TracChangeset
for help on using the changeset viewer.