src/share/vm/opto/compile.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/compile.hpp

Print this page
rev 8995 : 8046155: JEP165: Compiler Control
Summary:
Reviewed-by:


 654   bool              age_code() const             { return _age_code; }
 655   void          set_age_code(bool z)             { _age_code = z; }
 656   int               AliasLevel() const           { return _AliasLevel; }
 657   bool              print_assembly() const       { return _print_assembly; }
 658   void          set_print_assembly(bool z)       { _print_assembly = z; }
 659   bool              print_inlining() const       { return _print_inlining; }
 660   void          set_print_inlining(bool z)       { _print_inlining = z; }
 661   bool              print_intrinsics() const     { return _print_intrinsics; }
 662   void          set_print_intrinsics(bool z)     { _print_intrinsics = z; }
 663   RTMState          rtm_state()  const           { return _rtm_state; }
 664   void          set_rtm_state(RTMState s)        { _rtm_state = s; }
 665   bool              use_rtm() const              { return (_rtm_state & NoRTM) == 0; }
 666   bool          profile_rtm() const              { return _rtm_state == ProfileRTM; }
 667   uint              max_node_limit() const       { return (uint)_max_node_limit; }
 668   void          set_max_node_limit(uint n)       { _max_node_limit = n; }
 669 
 670   // check the CompilerOracle for special behaviours for this compile
 671   bool          method_has_option(const char * option) {
 672     return method() != NULL && method()->has_option(option);
 673   }
 674   template<typename T>
 675   bool          method_has_option_value(const char * option, T& value) {
 676     return method() != NULL && method()->has_option_value(option, value);
 677   }
 678 #ifndef PRODUCT
 679   bool          trace_opto_output() const       { return _trace_opto_output; }
 680   bool              parsed_irreducible_loop() const { return _parsed_irreducible_loop; }
 681   void          set_parsed_irreducible_loop(bool z) { _parsed_irreducible_loop = z; }
 682   int _in_dump_cnt;  // Required for dumping ir nodes.
 683 #endif
 684   bool              has_irreducible_loop() const { return _has_irreducible_loop; }
 685   void          set_has_irreducible_loop(bool z) { _has_irreducible_loop = z; }
 686 
 687   // JSR 292
 688   bool              has_method_handle_invokes() const { return _has_method_handle_invokes;     }
 689   void          set_has_method_handle_invokes(bool z) {        _has_method_handle_invokes = z; }
 690 
 691   Ticks _latest_stage_start_counter;
 692 
 693   void begin_method() {
 694 #ifndef PRODUCT
 695     if (_printer && _printer->should_print(_method)) {
 696       _printer->begin_method(this);
 697     }
 698 #endif
 699     C->_latest_stage_start_counter.stamp();
 700   }
 701 
 702   void print_method(CompilerPhaseType cpt, int level = 1) {
 703     EventCompilerPhase event;
 704     if (event.should_commit()) {
 705       event.set_starttime(C->_latest_stage_start_counter);
 706       event.set_phase((u1) cpt);
 707       event.set_compileID(C->_compile_id);
 708       event.set_phaseLevel(level);
 709       event.commit();
 710     }
 711 
 712 
 713 #ifndef PRODUCT
 714     if (_printer && _printer->should_print(_method)) {
 715       _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
 716     }
 717 #endif
 718     C->_latest_stage_start_counter.stamp();
 719   }
 720 
 721   void end_method(int level = 1) {
 722     EventCompilerPhase event;
 723     if (event.should_commit()) {
 724       event.set_starttime(C->_latest_stage_start_counter);
 725       event.set_phase((u1) PHASE_END);
 726       event.set_compileID(C->_compile_id);
 727       event.set_phaseLevel(level);
 728       event.commit();
 729     }
 730 #ifndef PRODUCT
 731     if (_printer && _printer->should_print(_method)) {
 732       _printer->end_method();
 733     }
 734 #endif
 735   }
 736 
 737   int           macro_count()             const { return _macro_nodes->length(); }
 738   int           predicate_count()         const { return _predicate_opaqs->length();}
 739   int           expensive_count()         const { return _expensive_nodes->length(); }
 740   Node*         macro_node(int idx)       const { return _macro_nodes->at(idx); }
 741   Node*         predicate_opaque1_node(int idx) const { return _predicate_opaqs->at(idx);}
 742   Node*         expensive_node(int idx)   const { return _expensive_nodes->at(idx); }
 743   ConnectionGraph* congraph()                   { return _congraph;}
 744   void set_congraph(ConnectionGraph* congraph)  { _congraph = congraph;}
 745   void add_macro_node(Node * n) {
 746     //assert(n->is_macro(), "must be a macro node");
 747     assert(!_macro_nodes->contains(n), " duplicate entry in expand list");
 748     _macro_nodes->append(n);
 749   }
 750   void remove_macro_node(Node * n) {
 751     // this function may be called twice for a node so check




 654   bool              age_code() const             { return _age_code; }
 655   void          set_age_code(bool z)             { _age_code = z; }
 656   int               AliasLevel() const           { return _AliasLevel; }
 657   bool              print_assembly() const       { return _print_assembly; }
 658   void          set_print_assembly(bool z)       { _print_assembly = z; }
 659   bool              print_inlining() const       { return _print_inlining; }
 660   void          set_print_inlining(bool z)       { _print_inlining = z; }
 661   bool              print_intrinsics() const     { return _print_intrinsics; }
 662   void          set_print_intrinsics(bool z)     { _print_intrinsics = z; }
 663   RTMState          rtm_state()  const           { return _rtm_state; }
 664   void          set_rtm_state(RTMState s)        { _rtm_state = s; }
 665   bool              use_rtm() const              { return (_rtm_state & NoRTM) == 0; }
 666   bool          profile_rtm() const              { return _rtm_state == ProfileRTM; }
 667   uint              max_node_limit() const       { return (uint)_max_node_limit; }
 668   void          set_max_node_limit(uint n)       { _max_node_limit = n; }
 669 
 670   // check the CompilerOracle for special behaviours for this compile
 671   bool          method_has_option(const char * option) {
 672     return method() != NULL && method()->has_option(option);
 673   }
 674 



 675 #ifndef PRODUCT
 676   bool          trace_opto_output() const       { return _trace_opto_output; }
 677   bool              parsed_irreducible_loop() const { return _parsed_irreducible_loop; }
 678   void          set_parsed_irreducible_loop(bool z) { _parsed_irreducible_loop = z; }
 679   int _in_dump_cnt;  // Required for dumping ir nodes.
 680 #endif
 681   bool              has_irreducible_loop() const { return _has_irreducible_loop; }
 682   void          set_has_irreducible_loop(bool z) { _has_irreducible_loop = z; }
 683 
 684   // JSR 292
 685   bool              has_method_handle_invokes() const { return _has_method_handle_invokes;     }
 686   void          set_has_method_handle_invokes(bool z) {        _has_method_handle_invokes = z; }
 687 
 688   Ticks _latest_stage_start_counter;
 689 
 690   void begin_method() {
 691 #ifndef PRODUCT
 692     if (_printer && _printer->should_print(1)) {
 693       _printer->begin_method(this);
 694     }
 695 #endif
 696     C->_latest_stage_start_counter.stamp();
 697   }
 698 
 699   void print_method(CompilerPhaseType cpt, int level = 1) {
 700     EventCompilerPhase event;
 701     if (event.should_commit()) {
 702       event.set_starttime(C->_latest_stage_start_counter);
 703       event.set_phase((u1) cpt);
 704       event.set_compileID(C->_compile_id);
 705       event.set_phaseLevel(level);
 706       event.commit();
 707     }
 708 
 709 
 710 #ifndef PRODUCT
 711     if (_printer && _printer->should_print(level)) {
 712       _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
 713     }
 714 #endif
 715     C->_latest_stage_start_counter.stamp();
 716   }
 717 
 718   void end_method(int level = 1) {
 719     EventCompilerPhase event;
 720     if (event.should_commit()) {
 721       event.set_starttime(C->_latest_stage_start_counter);
 722       event.set_phase((u1) PHASE_END);
 723       event.set_compileID(C->_compile_id);
 724       event.set_phaseLevel(level);
 725       event.commit();
 726     }
 727 #ifndef PRODUCT
 728     if (_printer && _printer->should_print(level)) {
 729       _printer->end_method();
 730     }
 731 #endif
 732   }
 733 
 734   int           macro_count()             const { return _macro_nodes->length(); }
 735   int           predicate_count()         const { return _predicate_opaqs->length();}
 736   int           expensive_count()         const { return _expensive_nodes->length(); }
 737   Node*         macro_node(int idx)       const { return _macro_nodes->at(idx); }
 738   Node*         predicate_opaque1_node(int idx) const { return _predicate_opaqs->at(idx);}
 739   Node*         expensive_node(int idx)   const { return _expensive_nodes->at(idx); }
 740   ConnectionGraph* congraph()                   { return _congraph;}
 741   void set_congraph(ConnectionGraph* congraph)  { _congraph = congraph;}
 742   void add_macro_node(Node * n) {
 743     //assert(n->is_macro(), "must be a macro node");
 744     assert(!_macro_nodes->contains(n), " duplicate entry in expand list");
 745     _macro_nodes->append(n);
 746   }
 747   void remove_macro_node(Node * n) {
 748     // this function may be called twice for a node so check


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