< prev index next >

src/hotspot/share/compiler/abstractCompiler.hpp

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP
  26 #define SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP
  27 
  28 #include "ci/compilerInterface.hpp"
  29 #include "compiler/compilerDefinitions.hpp"
  30 #include "compiler/compilerDirectives.hpp"
  31 
  32 typedef void (*initializer)(void);
  33 
  34 #if INCLUDE_JVMCI
  35 // Per-compiler statistics
  36 class CompilerStatistics VALUE_OBJ_CLASS_SPEC {
  37   friend class VMStructs;
  38 
  39   class Data VALUE_OBJ_CLASS_SPEC {
  40     friend class VMStructs;
  41   public:
  42     elapsedTimer _time;  // time spent compiling
  43     int _bytes;          // number of bytecodes compiled, including inlined bytecodes
  44     int _count;          // number of compilations
  45     Data() : _bytes(0), _count(0) {}
  46     void update(elapsedTimer time, int bytes) {
  47       _time.add(time);
  48       _bytes += bytes;
  49       _count++;
  50     }
  51     void reset() {
  52       _time.reset();
  53     }
  54   };
  55 
  56  public:
  57   Data _standard;  // stats for non-OSR compilations
  58   Data _osr;       // stats for OSR compilations
  59   int _nmethods_size; //




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP
  26 #define SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP
  27 
  28 #include "ci/compilerInterface.hpp"
  29 #include "compiler/compilerDefinitions.hpp"
  30 #include "compiler/compilerDirectives.hpp"
  31 
  32 typedef void (*initializer)(void);
  33 
  34 #if INCLUDE_JVMCI
  35 // Per-compiler statistics
  36 class CompilerStatistics {
  37   friend class VMStructs;
  38 
  39   class Data {
  40     friend class VMStructs;
  41   public:
  42     elapsedTimer _time;  // time spent compiling
  43     int _bytes;          // number of bytecodes compiled, including inlined bytecodes
  44     int _count;          // number of compilations
  45     Data() : _bytes(0), _count(0) {}
  46     void update(elapsedTimer time, int bytes) {
  47       _time.add(time);
  48       _bytes += bytes;
  49       _count++;
  50     }
  51     void reset() {
  52       _time.reset();
  53     }
  54   };
  55 
  56  public:
  57   Data _standard;  // stats for non-OSR compilations
  58   Data _osr;       // stats for OSR compilations
  59   int _nmethods_size; //


< prev index next >