< prev index next >

src/hotspot/share/interpreter/bytecodeHistogram.hpp

Print this page
*** 30,45 ***
  
  // BytecodeCounter counts the number of bytecodes executed
  
  class BytecodeCounter: AllStatic {
   private:
!   NOT_PRODUCT(static int   _counter_value;)
!   NOT_PRODUCT(static jlong _reset_time;)
  
    friend class TemplateInterpreterGenerator;
    friend class         BytecodeInterpreter;
  
   public:
    // Initialization
!   static void reset()                      PRODUCT_RETURN;
  
    // Counter info (all info since last reset)
!   static int    counter_value()            PRODUCT_RETURN0 NOT_PRODUCT({ return _counter_value; });
!   static double elapsed_time()             PRODUCT_RETURN0; // in seconds
!   static double frequency()                PRODUCT_RETURN0; // bytecodes/seconds
  
    // Counter printing
!   static void   print()                    PRODUCT_RETURN;
  };
  
  
  // BytecodeHistogram collects number of executions of bytecodes
  
  class BytecodeHistogram: AllStatic {
   private:
!   NOT_PRODUCT(static int _counters[Bytecodes::number_of_codes];)   // a counter for each bytecode
  
    friend class TemplateInterpreterGenerator;
    friend class         BytecodeInterpreter;
  
   public:
    // Initialization
!   static void reset()                       PRODUCT_RETURN; // reset counters
  
    // Profile printing
!   static void print(float cutoff = 0.01F)   PRODUCT_RETURN; // cutoff in percent
  };
  
  
  // BytecodePairHistogram collects number of executions of bytecode pairs.
  // A bytecode pair is any sequence of two consecutive bytecodes.
--- 30,45 ---
  
  // BytecodeCounter counts the number of bytecodes executed
  
  class BytecodeCounter: AllStatic {
   private:
!   static jlong _counter_value;
!   static jlong _reset_time;
  
    friend class TemplateInterpreterGenerator;
    friend class         BytecodeInterpreter;
  
   public:
    // Initialization
!   static void reset();
  
    // Counter info (all info since last reset)
!   static jlong  counter_value() { return _counter_value; }
!   static double elapsed_time(); // in seconds
!   static double frequency();    // bytecodes/seconds
  
    // Counter printing
!   static void   print();
  };
  
  
  // BytecodeHistogram collects number of executions of bytecodes
  
  class BytecodeHistogram: AllStatic {
   private:
!   static int _counters[Bytecodes::number_of_codes];   // a counter for each bytecode
  
    friend class TemplateInterpreterGenerator;
    friend class         BytecodeInterpreter;
  
   public:
    // Initialization
!   static void reset(); // reset counters
  
    // Profile printing
!   static void print(float cutoff); // cutoff in percent
  };
  
  
  // BytecodePairHistogram collects number of executions of bytecode pairs.
  // A bytecode pair is any sequence of two consecutive bytecodes.
< prev index next >