--- a/src/hotspot/share/runtime/compilationPolicy.cpp Fri Dec 22 22:01:53 2017 -0800
+++ b/src/hotspot/share/runtime/compilationPolicy.cpp Fri Dec 22 22:06:54 2017 -0800
@@ -470,8 +470,12 @@
if (bci != InvocationEntryBci) {
MethodData* mdo = m->method_data();
if (mdo != NULL) {
- int count = mdo->bci_to_data(branch_bci)->as_JumpData()->taken();
- tty->print_cr("back branch count = %d", count);
+ ProfileData *pd = mdo->bci_to_data(branch_bci);
+ if (pd == NULL) {
+ tty->print_cr("back branch count = N/A (missing ProfileData)");
+ } else {
+ tty->print_cr("back branch count = %d", pd->as_JumpData()->taken());
+ }
}
}
}