Ignore:
Timestamp:
Sep 29, 2009, 2:48:52 PM (16 years ago)
Author:
[email protected]
Message:

Tidy up codeblock sampler
https://bugs.webkit.org/show_bug.cgi?id=29836

Reviewed by Gavin Barraclough.

Some rather simple refactoring of codeblock sampler so that
it's easier for us to use it to find problems in non-jsc
environments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.h

    r47412 r48905  
    106106        void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc);
    107107       
    108         void setSampler(SamplingTool* sampler) { m_sampler = sampler; }
    109         SamplingTool* sampler() { return m_sampler; }
     108        SamplingTool* sampler() { return m_sampler.get(); }
    110109
    111110        NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue);
     
    113112        NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine);
    114113
     114        void dumpSampleData(ExecState* exec);
     115        void startSampling();
     116        void stopSampling();
    115117    private:
    116118        enum ExecutionFlag { Normal, InitializeAndReturn };
     
    150152        bool isCallBytecode(Opcode opcode) { return opcode == getOpcode(op_call) || opcode == getOpcode(op_construct) || opcode == getOpcode(op_call_eval); }
    151153
    152         SamplingTool* m_sampler;
     154        void enableSampler();
     155        int m_sampleEntryDepth;
     156        OwnPtr<SamplingTool> m_sampler;
    153157
    154158        int m_reentryDepth;
Note: See TracChangeset for help on using the changeset viewer.