src/hotspot/share/runtime/vmOperations.cpp
changeset 59325 3636bab5e81e
parent 58226 408c445d04e8
equal deleted inserted replaced
59324:5e8f9713e343 59325:3636bab5e81e
    71     print_on_error(&ls);
    71     print_on_error(&ls);
    72     ls.cr();
    72     ls.cr();
    73   }
    73   }
    74 }
    74 }
    75 
    75 
    76 const char* VM_Operation::mode_to_string(Mode mode) {
       
    77   switch(mode) {
       
    78     case _safepoint      : return "safepoint";
       
    79     case _no_safepoint   : return "no safepoint";
       
    80     case _concurrent     : return "concurrent";
       
    81     case _async_safepoint: return "async safepoint";
       
    82     default              : return "unknown";
       
    83   }
       
    84 }
       
    85 // Called by fatal error handler.
    76 // Called by fatal error handler.
    86 void VM_Operation::print_on_error(outputStream* st) const {
    77 void VM_Operation::print_on_error(outputStream* st) const {
    87   st->print("VM_Operation (" PTR_FORMAT "): ", p2i(this));
    78   st->print("VM_Operation (" PTR_FORMAT "): ", p2i(this));
    88   st->print("%s", name());
    79   st->print("%s", name());
    89 
    80 
    90   const char* mode = mode_to_string(evaluation_mode());
    81   st->print(", mode: %s", evaluate_at_safepoint() ? "safepoint" : "no safepoint");
    91   st->print(", mode: %s", mode);
       
    92 
    82 
    93   if (calling_thread()) {
    83   if (calling_thread()) {
    94     st->print(", requested by thread " PTR_FORMAT, p2i(calling_thread()));
    84     st->print(", requested by thread " PTR_FORMAT, p2i(calling_thread()));
    95   }
    85   }
    96 }
    86 }