< prev index next >

src/share/vm/opto/compile.hpp

Print this page




  14  *
  15  * You should have received a copy of the GNU General Public License version
  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_OPTO_COMPILE_HPP
  26 #define SHARE_VM_OPTO_COMPILE_HPP
  27 
  28 #include "asm/codeBuffer.hpp"
  29 #include "ci/compilerInterface.hpp"
  30 #include "code/debugInfoRec.hpp"
  31 #include "code/exceptionHandlerTable.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "compiler/compileBroker.hpp"

  34 #include "libadt/dict.hpp"
  35 #include "libadt/port.hpp"
  36 #include "libadt/vectset.hpp"
  37 #include "memory/resourceArea.hpp"
  38 #include "opto/idealGraphPrinter.hpp"
  39 #include "opto/phasetype.hpp"
  40 #include "opto/phase.hpp"
  41 #include "opto/regmask.hpp"
  42 #include "runtime/deoptimization.hpp"
  43 #include "runtime/vmThread.hpp"
  44 #include "trace/tracing.hpp"
  45 #include "utilities/ticks.hpp"
  46 
  47 class Block;
  48 class Bundle;
  49 class C2Compiler;
  50 class CallGenerator;
  51 class ConnectionGraph;
  52 class InlineTree;
  53 class Int_Array;
  54 class Matcher;
  55 class MachConstantNode;
  56 class MachConstantBaseNode;
  57 class MachNode;
  58 class MachOper;
  59 class MachSafePointNode;
  60 class Node;
  61 class Node_Array;
  62 class Node_Notes;
  63 class OptoReg;
  64 class PhaseCFG;


 620   void          set_has_irreducible_loop(bool z) { _has_irreducible_loop = z; }
 621 
 622   // JSR 292
 623   bool              has_method_handle_invokes() const { return _has_method_handle_invokes;     }
 624   void          set_has_method_handle_invokes(bool z) {        _has_method_handle_invokes = z; }
 625 
 626   Ticks _latest_stage_start_counter;
 627 
 628   void begin_method() {
 629 #ifndef PRODUCT
 630     if (_printer) _printer->begin_method(this);
 631 #endif
 632     C->_latest_stage_start_counter.stamp();
 633   }
 634 
 635   void print_method(CompilerPhaseType cpt, int level = 1) {
 636     EventCompilerPhase event;
 637     if (event.should_commit()) {
 638       event.set_starttime(C->_latest_stage_start_counter);
 639       event.set_phase((u1) cpt);
 640       event.set_compileID(C->_compile_id);
 641       event.set_phaseLevel(level);
 642       event.commit();
 643     }
 644 
 645 
 646 #ifndef PRODUCT
 647     if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
 648 #endif
 649     C->_latest_stage_start_counter.stamp();
 650   }
 651 
 652   void end_method(int level = 1) {
 653     EventCompilerPhase event;
 654     if (event.should_commit()) {
 655       event.set_starttime(C->_latest_stage_start_counter);
 656       event.set_phase((u1) PHASE_END);
 657       event.set_compileID(C->_compile_id);
 658       event.set_phaseLevel(level);
 659       event.commit();
 660     }
 661 #ifndef PRODUCT
 662     if (_printer) _printer->end_method();
 663 #endif
 664   }
 665 
 666   int           macro_count()             const { return _macro_nodes->length(); }
 667   int           predicate_count()         const { return _predicate_opaqs->length();}
 668   int           expensive_count()         const { return _expensive_nodes->length(); }
 669   Node*         macro_node(int idx)       const { return _macro_nodes->at(idx); }
 670   Node*         predicate_opaque1_node(int idx) const { return _predicate_opaqs->at(idx);}
 671   Node*         expensive_node(int idx)   const { return _expensive_nodes->at(idx); }
 672   ConnectionGraph* congraph()                   { return _congraph;}
 673   void set_congraph(ConnectionGraph* congraph)  { _congraph = congraph;}
 674   void add_macro_node(Node * n) {
 675     //assert(n->is_macro(), "must be a macro node");
 676     assert(!_macro_nodes->contains(n), "duplicate entry in expand list");
 677     _macro_nodes->append(n);




  14  *
  15  * You should have received a copy of the GNU General Public License version
  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_OPTO_COMPILE_HPP
  26 #define SHARE_VM_OPTO_COMPILE_HPP
  27 
  28 #include "asm/codeBuffer.hpp"
  29 #include "ci/compilerInterface.hpp"
  30 #include "code/debugInfoRec.hpp"
  31 #include "code/exceptionHandlerTable.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "compiler/compileBroker.hpp"
  34 #include "jfr/jfrEvents.hpp"
  35 #include "libadt/dict.hpp"
  36 #include "libadt/port.hpp"
  37 #include "libadt/vectset.hpp"
  38 #include "memory/resourceArea.hpp"
  39 #include "opto/idealGraphPrinter.hpp"
  40 #include "opto/phasetype.hpp"
  41 #include "opto/phase.hpp"
  42 #include "opto/regmask.hpp"
  43 #include "runtime/deoptimization.hpp"
  44 #include "runtime/vmThread.hpp"

  45 #include "utilities/ticks.hpp"
  46 
  47 class Block;
  48 class Bundle;
  49 class C2Compiler;
  50 class CallGenerator;
  51 class ConnectionGraph;
  52 class InlineTree;
  53 class Int_Array;
  54 class Matcher;
  55 class MachConstantNode;
  56 class MachConstantBaseNode;
  57 class MachNode;
  58 class MachOper;
  59 class MachSafePointNode;
  60 class Node;
  61 class Node_Array;
  62 class Node_Notes;
  63 class OptoReg;
  64 class PhaseCFG;


 620   void          set_has_irreducible_loop(bool z) { _has_irreducible_loop = z; }
 621 
 622   // JSR 292
 623   bool              has_method_handle_invokes() const { return _has_method_handle_invokes;     }
 624   void          set_has_method_handle_invokes(bool z) {        _has_method_handle_invokes = z; }
 625 
 626   Ticks _latest_stage_start_counter;
 627 
 628   void begin_method() {
 629 #ifndef PRODUCT
 630     if (_printer) _printer->begin_method(this);
 631 #endif
 632     C->_latest_stage_start_counter.stamp();
 633   }
 634 
 635   void print_method(CompilerPhaseType cpt, int level = 1) {
 636     EventCompilerPhase event;
 637     if (event.should_commit()) {
 638       event.set_starttime(C->_latest_stage_start_counter);
 639       event.set_phase((u1) cpt);
 640       event.set_compileId(C->_compile_id);
 641       event.set_phaseLevel(level);
 642       event.commit();
 643     }
 644 
 645 
 646 #ifndef PRODUCT
 647     if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
 648 #endif
 649     C->_latest_stage_start_counter.stamp();
 650   }
 651 
 652   void end_method(int level = 1) {
 653     EventCompilerPhase event;
 654     if (event.should_commit()) {
 655       event.set_starttime(C->_latest_stage_start_counter);
 656       event.set_phase((u1) PHASE_END);
 657       event.set_compileId(C->_compile_id);
 658       event.set_phaseLevel(level);
 659       event.commit();
 660     }
 661 #ifndef PRODUCT
 662     if (_printer) _printer->end_method();
 663 #endif
 664   }
 665 
 666   int           macro_count()             const { return _macro_nodes->length(); }
 667   int           predicate_count()         const { return _predicate_opaqs->length();}
 668   int           expensive_count()         const { return _expensive_nodes->length(); }
 669   Node*         macro_node(int idx)       const { return _macro_nodes->at(idx); }
 670   Node*         predicate_opaque1_node(int idx) const { return _predicate_opaqs->at(idx);}
 671   Node*         expensive_node(int idx)   const { return _expensive_nodes->at(idx); }
 672   ConnectionGraph* congraph()                   { return _congraph;}
 673   void set_congraph(ConnectionGraph* congraph)  { _congraph = congraph;}
 674   void add_macro_node(Node * n) {
 675     //assert(n->is_macro(), "must be a macro node");
 676     assert(!_macro_nodes->contains(n), "duplicate entry in expand list");
 677     _macro_nodes->append(n);


< prev index next >