< prev index next >

src/hotspot/share/utilities/vmError.cpp

Print this page

 306     // clear it again when we're done.
 307     bool has_last_Java_frame = jt->has_last_Java_frame();
 308     if (!has_last_Java_frame)
 309       jt->set_last_Java_frame();
 310     st->print("Java frames:");
 311     st->cr();
 312 
 313     // Print the frames
 314     StackFrameStream sfs(jt, true /* update */, true /* process_frames */);
 315     for(int i = 0; !sfs.is_done(); sfs.next(), i++) {
 316       sfs.current()->zero_print_on_error(i, st, buf, buflen);
 317       st->cr();
 318     }
 319 
 320     // Reset the frame anchor if necessary
 321     if (!has_last_Java_frame)
 322       jt->reset_last_Java_frame();
 323   }
 324 #else
 325   if (jt->has_last_Java_frame()) {
 326     st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)");
 327     for (StackFrameStream sfs(jt, true /* update */, true /* process_frames */); !sfs.is_done(); sfs.next()) {
 328       sfs.current()->print_on_error(st, buf, buflen, verbose);
 329       st->cr();
 330     }
 331   }
 332 #endif // ZERO
 333 }
 334 
 335 const char* VMError::get_filename_only() {
 336   char separator = os::file_separator()[0];
 337   const char* p = strrchr(_filename, separator);
 338   return p ? p + 1 : _filename;
 339 }
 340 
 341 /**
 342  * Adds `value` to `list` iff it's not already present and there is sufficient
 343  * capacity (i.e. length(list) < `list_capacity`). The length of the list
 344  * is the index of the first nullptr entry or `list_capacity` if there are
 345  * no nullptr entries.
 346  *

 306     // clear it again when we're done.
 307     bool has_last_Java_frame = jt->has_last_Java_frame();
 308     if (!has_last_Java_frame)
 309       jt->set_last_Java_frame();
 310     st->print("Java frames:");
 311     st->cr();
 312 
 313     // Print the frames
 314     StackFrameStream sfs(jt, true /* update */, true /* process_frames */);
 315     for(int i = 0; !sfs.is_done(); sfs.next(), i++) {
 316       sfs.current()->zero_print_on_error(i, st, buf, buflen);
 317       st->cr();
 318     }
 319 
 320     // Reset the frame anchor if necessary
 321     if (!has_last_Java_frame)
 322       jt->reset_last_Java_frame();
 323   }
 324 #else
 325   if (jt->has_last_Java_frame()) {
 326     st->print_cr("Java frames: (J=compiled Java code, A=AOT compiled, P=AOT preloaded, j=interpreted, Vv=VM code)");
 327     for (StackFrameStream sfs(jt, true /* update */, true /* process_frames */); !sfs.is_done(); sfs.next()) {
 328       sfs.current()->print_on_error(st, buf, buflen, verbose);
 329       st->cr();
 330     }
 331   }
 332 #endif // ZERO
 333 }
 334 
 335 const char* VMError::get_filename_only() {
 336   char separator = os::file_separator()[0];
 337   const char* p = strrchr(_filename, separator);
 338   return p ? p + 1 : _filename;
 339 }
 340 
 341 /**
 342  * Adds `value` to `list` iff it's not already present and there is sufficient
 343  * capacity (i.e. length(list) < `list_capacity`). The length of the list
 344  * is the index of the first nullptr entry or `list_capacity` if there are
 345  * no nullptr entries.
 346  *
< prev index next >