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

src/share/vm/opto/compile.cpp

Print this page




2404         n->format(_regalloc, tty);
2405         tty->cr();
2406       }
2407 
2408       // If we have an instruction with a delay slot, and have seen a delay,
2409       // then back up and print it
2410       if (valid_bundle_info(n) && node_bundling(n)->use_unconditional_delay()) {
2411         assert(delay != NULL, "no unconditional delay instruction");
2412         if (WizardMode) delay->dump();
2413 
2414         if (node_bundling(delay)->starts_bundle())
2415           starts_bundle = '+';
2416         if (pcs && n->_idx < pc_limit)
2417           tty->print("%3.3x", pcs[n->_idx]);
2418         else
2419           tty->print("   ");
2420         tty->print(" %c ", starts_bundle);
2421         starts_bundle = ' ';
2422         tty->print("\t");
2423         delay->format(_regalloc, tty);
2424         tty->print_cr("");
2425         delay = NULL;
2426       }
2427 
2428       // Dump the exception table as well
2429       if( n->is_Catch() && (Verbose || WizardMode) ) {
2430         // Print the exception table for this offset
2431         _handler_table.print_subtable_for(pc);
2432       }
2433     }
2434 
2435     if (pcs && n->_idx < pc_limit)
2436       tty->print_cr("%3.3x", pcs[n->_idx]);
2437     else
2438       tty->print_cr("");
2439 
2440     assert(cut_short || delay == NULL, "no unconditional delay branch");
2441 
2442   } // End of per-block dump
2443   tty->print_cr("");
2444 
2445   if (cut_short)  tty->print_cr("*** disassembly is cut short ***");
2446 }
2447 #endif
2448 
2449 //------------------------------Final_Reshape_Counts---------------------------
2450 // This class defines counters to help identify when a method
2451 // may/must be executed using hardware with only 24-bit precision.
2452 struct Final_Reshape_Counts : public StackObj {
2453   int  _call_count;             // count non-inlined 'common' calls
2454   int  _float_count;            // count float ops requiring 24-bit precision
2455   int  _double_count;           // count double ops requiring more precision
2456   int  _java_call_count;        // count non-inlined 'java' calls
2457   int  _inner_loop_count;       // count loops which need alignment
2458   VectorSet _visited;           // Visitation flags
2459   Node_List _tests;             // Set of IfNodes & PCTableNodes
2460 
2461   Final_Reshape_Counts() :
2462     _call_count(0), _float_count(0), _double_count(0),
2463     _java_call_count(0), _inner_loop_count(0),


3864 }
3865 
3866 void Compile::dump_inlining() {
3867   bool do_print_inlining = print_inlining() || print_intrinsics();
3868   if (do_print_inlining || log() != NULL) {
3869     // Print inlining message for candidates that we couldn't inline
3870     // for lack of space
3871     for (int i = 0; i < _late_inlines.length(); i++) {
3872       CallGenerator* cg = _late_inlines.at(i);
3873       if (!cg->is_mh_late_inline()) {
3874         const char* msg = "live nodes > LiveNodeCountInliningCutoff";
3875         if (do_print_inlining) {
3876           cg->print_inlining_late(msg);
3877         }
3878         log_late_inline_failure(cg, msg);
3879       }
3880     }
3881   }
3882   if (do_print_inlining) {
3883     for (int i = 0; i < _print_inlining_list->length(); i++) {
3884       tty->print(_print_inlining_list->adr_at(i)->ss()->as_string());
3885     }
3886   }
3887 }
3888 
3889 void Compile::log_late_inline(CallGenerator* cg) {
3890   if (log() != NULL) {
3891     log()->head("late_inline method='%d'  inline_id='" JLONG_FORMAT "'", log()->identify(cg->method()),
3892                 cg->unique_id());
3893     JVMState* p = cg->call_node()->jvms();
3894     while (p != NULL) {
3895       log()->elem("jvms bci='%d' method='%d'", p->bci(), log()->identify(p->method()));
3896       p = p->caller();
3897     }
3898     log()->tail("late_inline");
3899   }
3900 }
3901 
3902 void Compile::log_late_inline_failure(CallGenerator* cg, const char* msg) {
3903   log_late_inline(cg);
3904   if (log() != NULL) {




2404         n->format(_regalloc, tty);
2405         tty->cr();
2406       }
2407 
2408       // If we have an instruction with a delay slot, and have seen a delay,
2409       // then back up and print it
2410       if (valid_bundle_info(n) && node_bundling(n)->use_unconditional_delay()) {
2411         assert(delay != NULL, "no unconditional delay instruction");
2412         if (WizardMode) delay->dump();
2413 
2414         if (node_bundling(delay)->starts_bundle())
2415           starts_bundle = '+';
2416         if (pcs && n->_idx < pc_limit)
2417           tty->print("%3.3x", pcs[n->_idx]);
2418         else
2419           tty->print("   ");
2420         tty->print(" %c ", starts_bundle);
2421         starts_bundle = ' ';
2422         tty->print("\t");
2423         delay->format(_regalloc, tty);
2424         tty->cr();
2425         delay = NULL;
2426       }
2427 
2428       // Dump the exception table as well
2429       if( n->is_Catch() && (Verbose || WizardMode) ) {
2430         // Print the exception table for this offset
2431         _handler_table.print_subtable_for(pc);
2432       }
2433     }
2434 
2435     if (pcs && n->_idx < pc_limit)
2436       tty->print_cr("%3.3x", pcs[n->_idx]);
2437     else
2438       tty->cr();
2439 
2440     assert(cut_short || delay == NULL, "no unconditional delay branch");
2441 
2442   } // End of per-block dump
2443   tty->cr();
2444 
2445   if (cut_short)  tty->print_cr("*** disassembly is cut short ***");
2446 }
2447 #endif
2448 
2449 //------------------------------Final_Reshape_Counts---------------------------
2450 // This class defines counters to help identify when a method
2451 // may/must be executed using hardware with only 24-bit precision.
2452 struct Final_Reshape_Counts : public StackObj {
2453   int  _call_count;             // count non-inlined 'common' calls
2454   int  _float_count;            // count float ops requiring 24-bit precision
2455   int  _double_count;           // count double ops requiring more precision
2456   int  _java_call_count;        // count non-inlined 'java' calls
2457   int  _inner_loop_count;       // count loops which need alignment
2458   VectorSet _visited;           // Visitation flags
2459   Node_List _tests;             // Set of IfNodes & PCTableNodes
2460 
2461   Final_Reshape_Counts() :
2462     _call_count(0), _float_count(0), _double_count(0),
2463     _java_call_count(0), _inner_loop_count(0),


3864 }
3865 
3866 void Compile::dump_inlining() {
3867   bool do_print_inlining = print_inlining() || print_intrinsics();
3868   if (do_print_inlining || log() != NULL) {
3869     // Print inlining message for candidates that we couldn't inline
3870     // for lack of space
3871     for (int i = 0; i < _late_inlines.length(); i++) {
3872       CallGenerator* cg = _late_inlines.at(i);
3873       if (!cg->is_mh_late_inline()) {
3874         const char* msg = "live nodes > LiveNodeCountInliningCutoff";
3875         if (do_print_inlining) {
3876           cg->print_inlining_late(msg);
3877         }
3878         log_late_inline_failure(cg, msg);
3879       }
3880     }
3881   }
3882   if (do_print_inlining) {
3883     for (int i = 0; i < _print_inlining_list->length(); i++) {
3884       tty->print_raw(_print_inlining_list->adr_at(i)->ss()->as_string());
3885     }
3886   }
3887 }
3888 
3889 void Compile::log_late_inline(CallGenerator* cg) {
3890   if (log() != NULL) {
3891     log()->head("late_inline method='%d'  inline_id='" JLONG_FORMAT "'", log()->identify(cg->method()),
3892                 cg->unique_id());
3893     JVMState* p = cg->call_node()->jvms();
3894     while (p != NULL) {
3895       log()->elem("jvms bci='%d' method='%d'", p->bci(), log()->identify(p->method()));
3896       p = p->caller();
3897     }
3898     log()->tail("late_inline");
3899   }
3900 }
3901 
3902 void Compile::log_late_inline_failure(CallGenerator* cg, const char* msg) {
3903   log_late_inline(cg);
3904   if (log() != NULL) {


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