Changeset 34371 in webkit for trunk/JavaScriptCore/VM/Opcode.h


Ignore:
Timestamp:
Jun 4, 2008, 9:39:09 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-04 Cameron Zwarich <[email protected]>

Reviewed by Oliver.

Add an option to dump statistics on executed instructions.

JavaScriptCore:

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.cpp: (KJS::): (KJS::OpcodeStats::~OpcodeStats): (KJS::OpcodeStats::recordInstruction):
  • VM/Opcode.h:

WebKitTools:

  • Scripts/check-for-global-initializers:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/Opcode.h

    r33979 r34371  
    3434
    3535namespace KJS {
    36        
     36
     37#define DUMP_OPCODE_STATS 0
     38
    3739    #define FOR_EACH_OPCODE_ID(macro) \
    3840        macro(op_load) \
     
    137139#endif
    138140
     141#if DUMP_OPCODE_STATS
     142
     143    struct OpcodeStats {
     144        OpcodeStats();
     145        ~OpcodeStats();
     146        static unsigned opcodeCounts[numOpcodeIDs];
     147        static void recordInstruction(int opcode);
     148    };
     149
     150#endif
     151
    139152} // namespace KJS
    140153
Note: See TracChangeset for help on using the changeset viewer.