src/share/vm/compiler/compileBroker.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8082782.01 Sdiff src/share/vm/compiler

src/share/vm/compiler/compileBroker.hpp

Print this page




  63   Method*      _hot_method;   // which method actually triggered this task
  64   jobject      _hot_method_holder;
  65   int          _hot_count;    // information about its invocation counter
  66   const char*  _comment;      // more info about the task
  67   const char*  _failure_reason;
  68 
  69  public:
  70   CompileTask() {
  71     _lock = new Monitor(Mutex::nonleaf+2, "CompileTaskLock");
  72   }
  73 
  74   void initialize(int compile_id, methodHandle method, int osr_bci, int comp_level,
  75                   methodHandle hot_method, int hot_count, const char* comment,
  76                   bool is_blocking);
  77 
  78   static CompileTask* allocate();
  79   static void         free(CompileTask* task);
  80 
  81   int          compile_id() const                { return _compile_id; }
  82   Method*      method() const                    { return _method; }

  83   int          osr_bci() const                   { return _osr_bci; }
  84   bool         is_complete() const               { return _is_complete; }
  85   bool         is_blocking() const               { return _is_blocking; }
  86   bool         is_success() const                { return _is_success; }
  87 
  88   nmethodLocker* code_handle() const             { return _code_handle; }
  89   void         set_code_handle(nmethodLocker* l) { _code_handle = l; }
  90   nmethod*     code() const;                     // _code_handle->code()
  91   void         set_code(nmethod* nm);            // _code_handle->set_code(nm)
  92 
  93   Monitor*     lock() const                      { return _lock; }
  94 
  95   void         mark_complete()                   { _is_complete = true; }
  96   void         mark_success()                    { _is_success = true; }
  97 
  98   int          comp_level()                      { return _comp_level;}
  99   void         set_comp_level(int comp_level)    { _comp_level = comp_level;}
 100 
 101   int          num_inlined_bytecodes() const     { return _num_inlined_bytecodes; }
 102   void         set_num_inlined_bytecodes(int n)  { _num_inlined_bytecodes = n; }
 103 
 104   CompileTask* next() const                      { return _next; }
 105   void         set_next(CompileTask* next)       { _next = next; }
 106   CompileTask* prev() const                      { return _prev; }
 107   void         set_prev(CompileTask* prev)       { _prev = prev; }
 108   bool         is_free() const                   { return _is_free; }
 109   void         set_is_free(bool val)             { _is_free = val; }



 110 
 111 private:
 112   static void  print_compilation_impl(outputStream* st, Method* method, int compile_id, int comp_level,
 113                                       bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false,
 114                                       const char* msg = NULL, bool short_form = false, bool cr = true);
 115 
 116 public:
 117   void         print_compilation(outputStream* st = tty, const char* msg = NULL, bool short_form = false, bool cr = true);
 118   static void  print_compilation(outputStream* st, const nmethod* nm, const char* msg = NULL, bool short_form = false, bool cr = true) {
 119     print_compilation_impl(st, nm->method(), nm->compile_id(), nm->comp_level(),
 120                            nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false,
 121                            msg, short_form, cr);
 122   }
 123 
 124   static void  print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL);
 125   static void  print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) {
 126     print_inlining(tty, method, inline_level, bci, msg);
 127   }
 128 
 129   // Redefine Classes support




  63   Method*      _hot_method;   // which method actually triggered this task
  64   jobject      _hot_method_holder;
  65   int          _hot_count;    // information about its invocation counter
  66   const char*  _comment;      // more info about the task
  67   const char*  _failure_reason;
  68 
  69  public:
  70   CompileTask() {
  71     _lock = new Monitor(Mutex::nonleaf+2, "CompileTaskLock");
  72   }
  73 
  74   void initialize(int compile_id, methodHandle method, int osr_bci, int comp_level,
  75                   methodHandle hot_method, int hot_count, const char* comment,
  76                   bool is_blocking);
  77 
  78   static CompileTask* allocate();
  79   static void         free(CompileTask* task);
  80 
  81   int          compile_id() const                { return _compile_id; }
  82   Method*      method() const                    { return _method; }
  83   Method*      hot_method() const                { return _hot_method; }
  84   int          osr_bci() const                   { return _osr_bci; }
  85   bool         is_complete() const               { return _is_complete; }
  86   bool         is_blocking() const               { return _is_blocking; }
  87   bool         is_success() const                { return _is_success; }
  88 
  89   nmethodLocker* code_handle() const             { return _code_handle; }
  90   void         set_code_handle(nmethodLocker* l) { _code_handle = l; }
  91   nmethod*     code() const;                     // _code_handle->code()
  92   void         set_code(nmethod* nm);            // _code_handle->set_code(nm)
  93 
  94   Monitor*     lock() const                      { return _lock; }
  95 
  96   void         mark_complete()                   { _is_complete = true; }
  97   void         mark_success()                    { _is_success = true; }
  98 
  99   int          comp_level()                      { return _comp_level;}
 100   void         set_comp_level(int comp_level)    { _comp_level = comp_level;}
 101 
 102   int          num_inlined_bytecodes() const     { return _num_inlined_bytecodes; }
 103   void         set_num_inlined_bytecodes(int n)  { _num_inlined_bytecodes = n; }
 104 
 105   CompileTask* next() const                      { return _next; }
 106   void         set_next(CompileTask* next)       { _next = next; }
 107   CompileTask* prev() const                      { return _prev; }
 108   void         set_prev(CompileTask* prev)       { _prev = prev; }
 109   bool         is_free() const                   { return _is_free; }
 110   void         set_is_free(bool val)             { _is_free = val; }
 111 
 112   // RedefineClasses support
 113   void         metadata_do(void f(Metadata*));
 114 
 115 private:
 116   static void  print_compilation_impl(outputStream* st, Method* method, int compile_id, int comp_level,
 117                                       bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false,
 118                                       const char* msg = NULL, bool short_form = false, bool cr = true);
 119 
 120 public:
 121   void         print_compilation(outputStream* st = tty, const char* msg = NULL, bool short_form = false, bool cr = true);
 122   static void  print_compilation(outputStream* st, const nmethod* nm, const char* msg = NULL, bool short_form = false, bool cr = true) {
 123     print_compilation_impl(st, nm->method(), nm->compile_id(), nm->comp_level(),
 124                            nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false,
 125                            msg, short_form, cr);
 126   }
 127 
 128   static void  print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL);
 129   static void  print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) {
 130     print_inlining(tty, method, inline_level, bci, msg);
 131   }
 132 
 133   // Redefine Classes support


src/share/vm/compiler/compileBroker.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File