comparison src/share/vm/prims/jvmtiEnvBase.cpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents d2a62e0f25eb
children e522a00b91aa 070d523b96a7
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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.
586 // utilities: JNI objects 586 // utilities: JNI objects
587 // 587 //
588 588
589 589
590 jclass 590 jclass
591 JvmtiEnvBase::get_jni_class_non_null(klassOop k) { 591 JvmtiEnvBase::get_jni_class_non_null(Klass* k) {
592 assert(k != NULL, "k != NULL"); 592 assert(k != NULL, "k != NULL");
593 return (jclass)jni_reference(Klass::cast(k)->java_mirror()); 593 return (jclass)jni_reference(Klass::cast(k)->java_mirror());
594 } 594 }
595 595
596 #ifndef JVMTI_KERNEL 596 #ifndef JVMTI_KERNEL
598 // 598 //
599 // Field Information 599 // Field Information
600 // 600 //
601 601
602 bool 602 bool
603 JvmtiEnvBase::get_field_descriptor(klassOop k, jfieldID field, fieldDescriptor* fd) { 603 JvmtiEnvBase::get_field_descriptor(Klass* k, jfieldID field, fieldDescriptor* fd) {
604 if (!jfieldIDWorkaround::is_valid_jfieldID(k, field)) { 604 if (!jfieldIDWorkaround::is_valid_jfieldID(k, field)) {
605 return false; 605 return false;
606 } 606 }
607 bool found = false; 607 bool found = false;
608 if (jfieldIDWorkaround::is_static_jfieldID(field)) { 608 if (jfieldIDWorkaround::is_static_jfieldID(field)) {
609 JNIid* id = jfieldIDWorkaround::from_static_jfieldID(field); 609 JNIid* id = jfieldIDWorkaround::from_static_jfieldID(field);
610 found = id->find_local_field(fd); 610 found = id->find_local_field(fd);
611 } else { 611 } else {
612 // Non-static field. The fieldID is really the offset of the field within the object. 612 // Non-static field. The fieldID is really the offset of the field within the object.
613 int offset = jfieldIDWorkaround::from_instance_jfieldID(k, field); 613 int offset = jfieldIDWorkaround::from_instance_jfieldID(k, field);
614 found = instanceKlass::cast(k)->find_field_from_offset(offset, false, fd); 614 found = InstanceKlass::cast(k)->find_field_from_offset(offset, false, fd);
615 } 615 }
616 return found; 616 return found;
617 } 617 }
618 618
619 // 619 //
928 } 928 }
929 #endif 929 #endif
930 930
931 HandleMark hm(current_thread); 931 HandleMark hm(current_thread);
932 javaVFrame *jvf = javaVFrame::cast(vf); 932 javaVFrame *jvf = javaVFrame::cast(vf);
933 methodOop method = jvf->method(); 933 Method* method = jvf->method();
934 if (method->is_native()) { 934 if (method->is_native()) {
935 *location_ptr = -1; 935 *location_ptr = -1;
936 } else { 936 } else {
937 *location_ptr = jvf->bci(); 937 *location_ptr = jvf->bci();
938 } 938 }