Changeset 37316 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 5, 2008, 10:38:32 AM (17 years ago)
Author:
[email protected]
Message:

2008-10-05 Gavin Barraclough <[email protected]>

Reviewed by Cameron Zwarich.

Fix for bug #21387 - using SamplingTool with CTI.

(1) A repatch offset offset changes due to an additional instruction to update SamplingTool state.
(2) Fix an incusion order problem due to ExecState changes.
(3) Change to a MACHINE_SAMPLING macro, use of exec should now be accessing global data.

  • VM/CTI.h: (JSC::CTI::execute):
  • VM/SamplingTool.h: (JSC::SamplingTool::privateExecuteReturned):
  • kjs/Shell.cpp:
Location:
trunk/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r37312 r37316  
     12008-10-05  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Fix for bug #21387 - using SamplingTool with CTI.
     6
     7        (1) A repatch offset offset changes due to an additional instruction to update SamplingTool state.
     8        (2) Fix an incusion order problem due to ExecState changes.
     9        (3) Change to a MACHINE_SAMPLING macro, use of exec should now be accessing global data.
     10
     11        * VM/CTI.h:
     12        (JSC::CTI::execute):
     13        * VM/SamplingTool.h:
     14        (JSC::SamplingTool::privateExecuteReturned):
     15        * kjs/Shell.cpp:
     16
    1172008-10-04  Mark Rowe  <[email protected]>
    218
  • trunk/JavaScriptCore/VM/CTI.h

    r37297 r37316  
    3737#include <wtf/AlwaysInline.h>
    3838#include <wtf/Vector.h>
    39 
    40 #if ENABLE(SAMPLING_TOOL)
    41 #include "SamplingTool.h"
    42 #endif
    4339
    4440#if COMPILER(MSVC)
     
    260256        static const int repatchOffsetGetByIdBranchToSlowCase = 25;
    261257        static const int repatchOffsetGetByIdPropertyMapOffset = 34;
     258#if ENABLE(SAMPLING_TOOL)
     259        static const int repatchOffsetGetByIdSlowCaseCall = 27 + ctiArgumentInitSize;
     260#else
    262261        static const int repatchOffsetGetByIdSlowCaseCall = 17 + ctiArgumentInitSize;
     262#endif
    263263
    264264    public:
     
    326326        inline static JSValue* execute(void* code, RegisterFile* registerFile, Register* r, JSGlobalData* globalData, JSValue** exception)
    327327        {
    328             JSValue* value = ctiTrampoline(code, registerFile, r, exception, Profiler::enabledProfilerReference(), globalData);
    329 #if ENABLE(SAMPLING_TOOL)
    330             currentOpcodeID = static_cast<OpcodeID>(-1);
    331 #endif
    332             return value;
     328            return ctiTrampoline(code, registerFile, r, exception, Profiler::enabledProfilerReference(), globalData);
    333329        }
    334330
  • trunk/JavaScriptCore/VM/SamplingTool.h

    r36402 r37316  
    108108            m_recordedCodeBlock = 0;
    109109            m_recordedVPC = 0;
     110#if ENABLE(SAMPLING_TOOL)
     111            currentOpcodeID = static_cast<OpcodeID>(-1);
     112#endif
    110113        }
    111114       
     
    143146#define MACHINE_SAMPLING_privateExecuteReturned() m_sampler->privateExecuteReturned()
    144147#define MACHINE_SAMPLING_callingHostFunction() m_sampler->callingHostFunction()
    145 #define CTI_MACHINE_SAMPLING_callingHostFunction() machine->m_sampler->callingHostFunction()
     148#define CTI_MACHINE_SAMPLING_callingHostFunction() ARG_globalData->machine->m_sampler->callingHostFunction()
    146149#else
    147150#define SCOPENODE_SAMPLING_notifyOfScope(sampler)
  • trunk/JavaScriptCore/kjs/Shell.cpp

    r37242 r37316  
    2828#include "JSLock.h"
    2929#include "PrototypeFunction.h"
     30#include "SamplingTool.h"
    3031#include "completion.h"
    3132#include "interpreter.h"
Note: See TracChangeset for help on using the changeset viewer.