diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-11-25 11:20:28 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-11-25 14:40:18 -0800 |
commit | 3115877616e44b245ecf2c5466d52c749086d3b0 (patch) | |
tree | 720c9ed875e40e527a9e244fe8ef0cf19a494ebe | |
parent | dc00c73d24a46c8522176fbc539f3e39710807c2 (diff) | |
download | art-3115877616e44b245ecf2c5466d52c749086d3b0.zip art-3115877616e44b245ecf2c5466d52c749086d3b0.tar.gz art-3115877616e44b245ecf2c5466d52c749086d3b0.tar.bz2 |
Fix oatwriter code deduping
Now that the GC maps are part of the oat method header they need
to be checked in CodeOffsetsKeyComparator.
Bug: 18523556
Change-Id: I539a6e7216166342b22515c1e2cf831dad32e41e
(cherry picked from commit 4cdf4508903d13fd0f9fba5690aeac1b368db81b)
-rw-r--r-- | compiler/oat_writer.h | 3 | ||||
-rw-r--r-- | runtime/oat.cc | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/oat_writer.h b/compiler/oat_writer.h index 5b61f21..b3ac7ff 100644 --- a/compiler/oat_writer.h +++ b/compiler/oat_writer.h @@ -353,6 +353,9 @@ class OatWriter { if (UNLIKELY(&lhs->GetVmapTable() != &rhs->GetVmapTable())) { return &lhs->GetVmapTable() < &rhs->GetVmapTable(); } + if (UNLIKELY(lhs->GetGcMap() != rhs->GetGcMap())) { + return lhs->GetGcMap() < rhs->GetGcMap(); + } const auto& lhs_patches = lhs->GetPatches(); const auto& rhs_patches = rhs->GetPatches(); if (UNLIKELY(lhs_patches.size() != rhs_patches.size())) { diff --git a/runtime/oat.cc b/runtime/oat.cc index 6455783..8a595ac 100644 --- a/runtime/oat.cc +++ b/runtime/oat.cc @@ -25,7 +25,7 @@ namespace art { const uint8_t OatHeader::kOatMagic[] = { 'o', 'a', 't', '\n' }; -const uint8_t OatHeader::kOatVersion[] = { '0', '4', '9', '\0' }; +const uint8_t OatHeader::kOatVersion[] = { '0', '5', '0', '\0' }; static size_t ComputeOatHeaderSize(const SafeMap<std::string, std::string>* variable_data) { size_t estimate = 0U; |