Ignore:
Timestamp:
Apr 30, 2009, 2:02:19 PM (16 years ago)
Author:
[email protected]
Message:

2009-04-30 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

Two quick improvements to SamplingFlags mechanism.

SamplingFlags::ScopedFlag class to provide support for automagically
clearing a flag as it goes out of scope, and add a little more detail
to the output generated by the tool.

  • bytecode/SamplingTool.cpp: (JSC::SamplingFlags::stop):
  • bytecode/SamplingTool.h: (JSC::SamplingFlags::ScopedFlag::ScopedFlag): (JSC::SamplingFlags::ScopedFlag::~ScopedFlag):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/SamplingTool.h

    r43047 r43087  
    6060
    6161        static void sample();
     62
     63        class ScopedFlag {
     64        public:
     65            ScopedFlag(int flag)
     66                : m_flag(flag)
     67            {
     68                setFlag(flag);
     69            }
     70
     71            ~ScopedFlag()
     72            {
     73                clearFlag(m_flag);
     74            }
     75
     76        private:
     77            int m_flag;
     78        };
     79   
    6280#endif
    6381    private:
Note: See TracChangeset for help on using the changeset viewer.