diff src/share/vm/compiler/abstractCompiler.hpp @ 7568:140d4d4ab3b9

added per-compiler compilation speed statistics for C1 and C2 (included in output produced by -XX:+CITime)
author Doug Simon <doug.simon@oracle.com>
date Wed, 30 Jan 2013 21:36:28 +0100
parents 5d0bb7d52783
children 3ac7d10a6572
line wrap: on
line diff
--- a/src/share/vm/compiler/abstractCompiler.hpp	Wed Jan 30 18:19:01 2013 +0100
+++ b/src/share/vm/compiler/abstractCompiler.hpp	Wed Jan 30 21:36:28 2013 +0100
@@ -29,6 +29,17 @@
 
 typedef void (*initializer)(void);
 
+#ifdef GRAAL
+class CompilerStatistics {
+ public:
+  elapsedTimer _t_osr_compilation;
+  elapsedTimer _t_standard_compilation;
+  int _sum_osr_bytes_compiled;
+  int _sum_standard_bytes_compiled;
+  CompilerStatistics() : _sum_osr_bytes_compiled(0), _sum_standard_bytes_compiled(0) {}
+};
+#endif
+
 class AbstractCompiler : public CHeapObj<mtCompiler> {
  private:
   bool _is_initialized; // Mark whether compiler object is initialized
@@ -49,6 +60,10 @@
  private:
   Type _type;
 
+#ifdef GRAAL
+  CompilerStatistics _stats;
+#endif
+
  public:
   AbstractCompiler(Type type) : _is_initialized(false), _type(type)    {}
 
@@ -83,6 +98,10 @@
   virtual void print_timers() {
     ShouldNotReachHere();
   }
+
+#ifdef GRAAL
+  CompilerStatistics* stats() { return &_stats; }
+#endif
 };
 
 #endif // SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP