< prev index next >

src/hotspot/share/classfile/javaClasses.cpp

Print this page
rev 55090 : secret-sfac


2510 #endif
2511 
2512     // the format of the stacktrace will be:
2513     // - 1 or more fillInStackTrace frames for the exception class (skipped)
2514     // - 0 or more <init> methods for the exception class (skipped)
2515     // - rest of the stack
2516 
2517     if (!skip_fillInStackTrace_check) {
2518       if (method->name() == vmSymbols::fillInStackTrace_name() &&
2519           throwable->is_a(method->method_holder())) {
2520         continue;
2521       }
2522       else {
2523         skip_fillInStackTrace_check = true; // gone past them all
2524       }
2525     }
2526     if (!skip_throwableInit_check) {
2527       assert(skip_fillInStackTrace_check, "logic error in backtrace filtering");
2528 
2529       // skip <init> methods of the exception class and superclasses
2530       // This is simlar to classic VM.
2531       if (method->name() == vmSymbols::object_initializer_name() &&
2532           throwable->is_a(method->method_holder())) {
2533         continue;
2534       } else {
2535         // there are none or we've seen them all - either way stop checking
2536         skip_throwableInit_check = true;
2537       }
2538     }
2539     if (method->is_hidden()) {
2540       if (skip_hidden)  continue;
2541     }
2542     bt.push(method, bci, CHECK);
2543     total_count++;
2544   }
2545 
2546   log_info(stacktrace)("%s, %d", throwable->klass()->external_name(), total_count);
2547 
2548   // Put completed stack trace into throwable object
2549   set_backtrace(throwable(), bt.backtrace());
2550   set_depth(throwable(), total_count);
2551 }




2510 #endif
2511 
2512     // the format of the stacktrace will be:
2513     // - 1 or more fillInStackTrace frames for the exception class (skipped)
2514     // - 0 or more <init> methods for the exception class (skipped)
2515     // - rest of the stack
2516 
2517     if (!skip_fillInStackTrace_check) {
2518       if (method->name() == vmSymbols::fillInStackTrace_name() &&
2519           throwable->is_a(method->method_holder())) {
2520         continue;
2521       }
2522       else {
2523         skip_fillInStackTrace_check = true; // gone past them all
2524       }
2525     }
2526     if (!skip_throwableInit_check) {
2527       assert(skip_fillInStackTrace_check, "logic error in backtrace filtering");
2528 
2529       // skip <init> methods of the exception class and superclasses
2530       // This is similar to classic VM (before HotSpot).
2531       if (method->is_object_constructor() &&
2532           throwable->is_a(method->method_holder())) {
2533         continue;
2534       } else {
2535         // there are none or we've seen them all - either way stop checking
2536         skip_throwableInit_check = true;
2537       }
2538     }
2539     if (method->is_hidden()) {
2540       if (skip_hidden)  continue;
2541     }
2542     bt.push(method, bci, CHECK);
2543     total_count++;
2544   }
2545 
2546   log_info(stacktrace)("%s, %d", throwable->klass()->external_name(), total_count);
2547 
2548   // Put completed stack trace into throwable object
2549   set_backtrace(throwable(), bt.backtrace());
2550   set_depth(throwable(), total_count);
2551 }


< prev index next >