< prev index next >

src/hotspot/share/utilities/vmError.cpp

Print this page

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

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