comparison src/share/vm/runtime/vframe.cpp @ 1162:d749b1813f40

Merge
author trims
date Fri, 15 Jan 2010 14:25:44 -0800
parents cd37471eaecc
children 2338d41fbd81
comparison
equal deleted inserted replaced
1130:1bc68593a110 1162:d749b1813f40
1 /* 1 /*
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
122 } 122 }
123 123
124 static void print_locked_object_class_name(outputStream* st, Handle obj, const char* lock_state) { 124 static void print_locked_object_class_name(outputStream* st, Handle obj, const char* lock_state) {
125 if (obj.not_null()) { 125 if (obj.not_null()) {
126 st->print("\t- %s <" INTPTR_FORMAT "> ", lock_state, (address)obj()); 126 st->print("\t- %s <" INTPTR_FORMAT "> ", lock_state, (address)obj());
127 if (obj->klass() == SystemDictionary::class_klass()) { 127 if (obj->klass() == SystemDictionary::Class_klass()) {
128 klassOop target_klass = java_lang_Class::as_klassOop(obj()); 128 klassOop target_klass = java_lang_Class::as_klassOop(obj());
129 st->print_cr("(a java.lang.Class for %s)", instanceKlass::cast(target_klass)->external_name()); 129 st->print_cr("(a java.lang.Class for %s)", instanceKlass::cast(target_klass)->external_name());
130 } else { 130 } else {
131 Klass* k = Klass::cast(obj->klass()); 131 Klass* k = Klass::cast(obj->klass());
132 st->print_cr("(a %s)", k->external_name()); 132 st->print_cr("(a %s)", k->external_name());
428 while (!at_end()) { 428 while (!at_end()) {
429 if (Universe::reflect_invoke_cache()->is_same_method(method())) { 429 if (Universe::reflect_invoke_cache()->is_same_method(method())) {
430 // This is Method.invoke() -- skip it 430 // This is Method.invoke() -- skip it
431 } else if (use_new_reflection && 431 } else if (use_new_reflection &&
432 Klass::cast(method()->method_holder()) 432 Klass::cast(method()->method_holder())
433 ->is_subclass_of(SystemDictionary::reflect_method_accessor_klass())) { 433 ->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass())) {
434 // This is an auxilary frame -- skip it 434 // This is an auxilary frame -- skip it
435 } else if (method()->is_method_handle_adapter()) {
436 // This is an internal adapter frame from the MethodHandleCompiler -- skip it
435 } else { 437 } else {
436 // This is non-excluded frame, we need to count it against the depth 438 // This is non-excluded frame, we need to count it against the depth
437 if (depth-- <= 0) { 439 if (depth-- <= 0) {
438 // we have reached the desired depth, we are done 440 // we have reached the desired depth, we are done
439 break; 441 break;
488 490
489 491
490 void vframeStreamCommon::skip_reflection_related_frames() { 492 void vframeStreamCommon::skip_reflection_related_frames() {
491 while (!at_end() && 493 while (!at_end() &&
492 (JDK_Version::is_gte_jdk14x_version() && UseNewReflection && 494 (JDK_Version::is_gte_jdk14x_version() && UseNewReflection &&
493 (Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_method_accessor_klass()) || 495 (Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass()) ||
494 Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_constructor_accessor_klass())))) { 496 Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_ConstructorAccessorImpl_klass())))) {
495 next(); 497 next();
496 } 498 }
497 } 499 }
498 500
499 501