7090654: nightly failures after 7086585

Wed, 14 Sep 2011 13:57:32 -0700

author
never
date
Wed, 14 Sep 2011 13:57:32 -0700
changeset 3143
35c656d0b685
parent 3142
393f4b789fd0
child 3144
8ed53447f690

7090654: nightly failures after 7086585
Reviewed-by: kvn

agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java file | annotate | diff | comparison | revisions
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java file | annotate | diff | comparison | revisions
src/share/vm/prims/jvmtiClassFileReconstituter.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java	Wed Sep 14 16:28:39 2011 +0200
     1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java	Wed Sep 14 13:57:32 2011 -0700
     1.3 @@ -513,10 +513,9 @@
     1.4    void iterateStaticFieldsInternal(OopVisitor visitor) {
     1.5      TypeArray fields = getFields();
     1.6      int length = getJavaFieldsCount();
     1.7 -    for (int index = 0; index < length; index += FIELD_SLOTS) {
     1.8 -      short accessFlags    = fields.getShortAt(index + ACCESS_FLAGS_OFFSET);
     1.9 -      short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
    1.10 -      FieldType   type   = new FieldType(getConstants().getSymbolAt(signatureIndex));
    1.11 +    for (int index = 0; index < length; index++) {
    1.12 +      short accessFlags    = getFieldAccessFlags(index);
    1.13 +      FieldType   type   = new FieldType(getFieldSignature(index));
    1.14        AccessFlags access = new AccessFlags(accessFlags);
    1.15        if (access.isStatic()) {
    1.16          visitField(visitor, type, index);
    1.17 @@ -545,11 +544,9 @@
    1.18      TypeArray fields = getFields();
    1.19  
    1.20      int length = getJavaFieldsCount();
    1.21 -    for (int index = 0; index < length; index += FIELD_SLOTS) {
    1.22 -      short accessFlags    = fields.getShortAt(index + ACCESS_FLAGS_OFFSET);
    1.23 -      short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
    1.24 -
    1.25 -      FieldType   type   = new FieldType(getConstants().getSymbolAt(signatureIndex));
    1.26 +    for (int index = 0; index < length; index++) {
    1.27 +      short accessFlags    = getFieldAccessFlags(index);
    1.28 +      FieldType   type   = new FieldType(getFieldSignature(index));
    1.29        AccessFlags access = new AccessFlags(accessFlags);
    1.30        if (!access.isStatic()) {
    1.31          visitField(visitor, type, index);
    1.32 @@ -562,11 +559,9 @@
    1.33      TypeArray fields = getFields();
    1.34      int length = (int) fields.getLength();
    1.35      ConstantPool cp = getConstants();
    1.36 -    for (int i = 0; i < length; i += FIELD_SLOTS) {
    1.37 -      int nameIndex = fields.getShortAt(i + NAME_INDEX_OFFSET);
    1.38 -      int sigIndex  = fields.getShortAt(i + SIGNATURE_INDEX_OFFSET);
    1.39 -      Symbol f_name = cp.getSymbolAt(nameIndex);
    1.40 -      Symbol f_sig  = cp.getSymbolAt(sigIndex);
    1.41 +    for (int i = 0; i < length; i++) {
    1.42 +      Symbol f_name = getFieldName(i);
    1.43 +      Symbol f_sig  = getFieldSignature(i);
    1.44        if (name.equals(f_name) && sig.equals(f_sig)) {
    1.45          return newField(i);
    1.46        }
    1.47 @@ -641,8 +636,8 @@
    1.48  
    1.49    /** Get field by its index in the fields array. Only designed for
    1.50        use in a debugging system. */
    1.51 -  public Field getFieldByIndex(int fieldArrayIndex) {
    1.52 -    return newField(fieldArrayIndex);
    1.53 +  public Field getFieldByIndex(int fieldIndex) {
    1.54 +    return newField(fieldIndex);
    1.55    }
    1.56  
    1.57  
    1.58 @@ -657,7 +652,7 @@
    1.59  
    1.60          int length = getJavaFieldsCount();
    1.61          List immediateFields = new ArrayList(length);
    1.62 -        for (int index = 0; index < length; index += FIELD_SLOTS) {
    1.63 +        for (int index = 0; index < length; index++) {
    1.64              immediateFields.add(getFieldByIndex(index));
    1.65          }
    1.66  
    1.67 @@ -845,8 +840,7 @@
    1.68    // Creates new field from index in fields TypeArray
    1.69    private Field newField(int index) {
    1.70      TypeArray fields = getFields();
    1.71 -    short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
    1.72 -    FieldType type = new FieldType(getConstants().getSymbolAt(signatureIndex));
    1.73 +    FieldType type = new FieldType(getFieldSignature(index));
    1.74      if (type.isOop()) {
    1.75       if (VM.getVM().isCompressedOopsEnabled()) {
    1.76          return new NarrowOopField(this, index);
     2.1 --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Sep 14 16:28:39 2011 +0200
     2.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Sep 14 13:57:32 2011 -0700
     2.3 @@ -310,7 +310,7 @@
     2.4          usingServerCompiler = false;
     2.5        } else {
     2.6          // Determine whether C2 is present
     2.7 -        if (type.getField("_interpreter_invocation_count", false, false) != null) {
     2.8 +        if (db.lookupType("Matcher", false) != null) {
     2.9            usingServerCompiler = true;
    2.10          } else {
    2.11            usingClientCompiler = true;
     3.1 --- a/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Wed Sep 14 16:28:39 2011 +0200
     3.2 +++ b/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Wed Sep 14 13:57:32 2011 -0700
     3.3 @@ -58,7 +58,7 @@
     3.4    // Compute the real number of Java fields
     3.5    int java_fields = ikh()->java_fields_count();
     3.6  
     3.7 -  write_u2(java_fields * FieldInfo::field_slots);
     3.8 +  write_u2(java_fields);
     3.9    for (JavaFieldStream fs(ikh()); !fs.done(); fs.next()) {
    3.10      AccessFlags access_flags = fs.access_flags();
    3.11      int name_index = fs.name_index();

mercurial