diff options
author | 2016-12-01 14:21:11 -0800 | |
---|---|---|
committer | 2016-12-06 11:01:52 -0800 | |
commit | 58c3f6a0d15a4340c0a11ab7fbc8c4b990c64b77 (patch) | |
tree | 18788ed5f6ffb44679acaee8faff9a5caf237f13 /patchoat/patchoat.cc | |
parent | e4cdd4dbcbc75e373917d22214cd431643cd3610 (diff) |
Reduce calls to DescriptorEquals
Store the low 3 bits of the descriptor hash inside of class set
entries. Compare these bits before comparing descriptors.
Simpleperf interpret-only compile of facebook:
mirror::Class::DescriptorEquals(char const*): 3.66% -> 1.03%
Bug: 32641252
Test: test-art-host
Change-Id: I8d898d4ac7c95383c49401fbcd85bfde226e026c
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r-- | patchoat/patchoat.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index db28a3f494..cb5a79068a 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -605,8 +605,7 @@ void PatchOat::PatchClassTable(const ImageHeader* image_header) { ClassTable temp_table; temp_table.ReadFromMemory(image_->Begin() + section.Offset()); FixupRootVisitor visitor(this); - BufferedRootVisitor<kDefaultBufferedRootCount> buffered_visitor(&visitor, RootInfo(kRootUnknown)); - temp_table.VisitRoots(buffered_visitor); + temp_table.VisitRoots(UnbufferedRootVisitor(&visitor, RootInfo(kRootUnknown))); } |