diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-06-05 17:42:53 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-06-06 13:12:17 -0700 |
commit | 61c5ebc6aee2cac1c363de6fbdac25ada1697fdb (patch) | |
tree | 444936c3e3718b692ba7f1981b863190f26b4ed7 /runtime/hprof | |
parent | 25c4f6a25b3de9b9d7ca5162f1629753a0b7f003 (diff) | |
download | art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.zip art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.tar.gz art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.tar.bz2 |
Change FieldHelper to use a handle.
Fixed compaction bugs related to FieldHelper::GetType in:
artSet32InstanceFromCode
SetFieldValueImpl
CheckReceiver
Field_set
interpreter::DoFieldPut
MethodVerifier::VerifyISGet
MethodVerifier::VerifyISPut
MethodVerifier::VerifyIGetQuick
Bug: 13077697
Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72
Diffstat (limited to 'runtime/hprof')
-rw-r--r-- | runtime/hprof/hprof.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc index 91f1718..33339f8 100644 --- a/runtime/hprof/hprof.cc +++ b/runtime/hprof/hprof.cc @@ -919,8 +919,6 @@ int Hprof::DumpHeapObject(mirror::Object* obj) { rec->AddU2(0); // empty const pool - FieldHelper fh; - // Static fields if (sFieldCount == 0) { rec->AddU2((uint16_t)0); @@ -932,11 +930,10 @@ int Hprof::DumpHeapObject(mirror::Object* obj) { for (size_t i = 0; i < sFieldCount; ++i) { mirror::ArtField* f = thisClass->GetStaticField(i); - fh.ChangeField(f); size_t size; - HprofBasicType t = SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), &size); - rec->AddStringId(LookupStringId(fh.GetName())); + HprofBasicType t = SignatureToBasicTypeAndSize(f->GetTypeDescriptor(), &size); + rec->AddStringId(LookupStringId(f->GetName())); rec->AddU1(t); if (size == 1) { rec->AddU1(static_cast<uint8_t>(f->Get32(thisClass))); @@ -957,9 +954,8 @@ int Hprof::DumpHeapObject(mirror::Object* obj) { rec->AddU2((uint16_t)iFieldCount); for (int i = 0; i < iFieldCount; ++i) { mirror::ArtField* f = thisClass->GetInstanceField(i); - fh.ChangeField(f); - HprofBasicType t = SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), NULL); - rec->AddStringId(LookupStringId(fh.GetName())); + HprofBasicType t = SignatureToBasicTypeAndSize(f->GetTypeDescriptor(), NULL); + rec->AddStringId(LookupStringId(f->GetName())); rec->AddU1(t); } } else if (c->IsArrayClass()) { @@ -1015,14 +1011,12 @@ int Hprof::DumpHeapObject(mirror::Object* obj) { // Write the instance data; fields for this class, followed by super class fields, // and so on. Don't write the klass or monitor fields of Object.class. mirror::Class* sclass = c; - FieldHelper fh; while (!sclass->IsObjectClass()) { int ifieldCount = sclass->NumInstanceFields(); for (int i = 0; i < ifieldCount; ++i) { mirror::ArtField* f = sclass->GetInstanceField(i); - fh.ChangeField(f); size_t size; - SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), &size); + SignatureToBasicTypeAndSize(f->GetTypeDescriptor(), &size); if (size == 1) { rec->AddU1(f->Get32(obj)); } else if (size == 2) { |