< prev index next >

src/hotspot/share/utilities/vmError.cpp

Print this page

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

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