hotspot/src/share/vm/compiler/compileBroker.hpp
changeset 8872 36680c58660e
parent 7397 5b173b4ca846
child 10547 ea4a2ec31ae2
equal deleted inserted replaced
8871:5c3b26c4119e 8872:36680c58660e
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    54   jlong        _time_queued;  // in units of os::elapsed_counter()
    54   jlong        _time_queued;  // in units of os::elapsed_counter()
    55   jobject      _hot_method;   // which method actually triggered this task
    55   jobject      _hot_method;   // which method actually triggered this task
    56   int          _hot_count;    // information about its invocation counter
    56   int          _hot_count;    // information about its invocation counter
    57   const char*  _comment;      // more info about the task
    57   const char*  _comment;      // more info about the task
    58 
    58 
    59   void print_compilation(outputStream *st, methodOop method, char* method_name);
       
    60  public:
    59  public:
    61   CompileTask() {
    60   CompileTask() {
    62     _lock = new Monitor(Mutex::nonleaf+2, "CompileTaskLock");
    61     _lock = new Monitor(Mutex::nonleaf+2, "CompileTaskLock");
    63   }
    62   }
    64 
    63 
    94   CompileTask* next() const                      { return _next; }
    93   CompileTask* next() const                      { return _next; }
    95   void         set_next(CompileTask* next)       { _next = next; }
    94   void         set_next(CompileTask* next)       { _next = next; }
    96   CompileTask* prev() const                      { return _prev; }
    95   CompileTask* prev() const                      { return _prev; }
    97   void         set_prev(CompileTask* prev)       { _prev = prev; }
    96   void         set_prev(CompileTask* prev)       { _prev = prev; }
    98 
    97 
       
    98 private:
       
    99   static void  print_compilation_impl(outputStream* st, methodOop method, int compile_id, int comp_level, bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, const char* msg = NULL);
       
   100 
       
   101 public:
       
   102   void         print_compilation(outputStream* st = tty);
       
   103   static void  print_compilation(outputStream* st, const nmethod* nm, const char* msg = NULL) {
       
   104     print_compilation_impl(st, nm->method(), nm->compile_id(), nm->comp_level(), nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false, msg);
       
   105   }
       
   106 
       
   107   static void  print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL);
       
   108   static void  print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) {
       
   109     print_inlining(tty, method, inline_level, bci, msg);
       
   110   }
       
   111 
       
   112   static void  print_inline_indent(int inline_level, outputStream* st = tty);
       
   113 
    99   void         print();
   114   void         print();
   100   void         print_line();
   115   void         print_line();
   101 
       
   102   void         print_line_on_error(outputStream* st, char* buf, int buflen);
   116   void         print_line_on_error(outputStream* st, char* buf, int buflen);
       
   117 
   103   void         log_task(xmlStream* log);
   118   void         log_task(xmlStream* log);
   104   void         log_task_queued();
   119   void         log_task_queued();
   105   void         log_task_start(CompileLog* log);
   120   void         log_task_start(CompileLog* log);
   106   void         log_task_done(CompileLog* log);
   121   void         log_task_done(CompileLog* log);
   107 };
   122 };