summaryrefslogtreecommitdiffstats
path: root/compiler/oat_writer.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-08-09 22:05:32 -0700
committerIan Rogers <irogers@google.com>2013-08-09 22:23:50 -0700
commit1809a72a66d245ae598582d658b93a24ac3bf01e (patch)
treef864ff869185b2873637ca70584c66fd6a1e899d /compiler/oat_writer.cc
parenta9a50926963b5093fb851ed966d201f3e95f72d3 (diff)
downloadandroid_art-1809a72a66d245ae598582d658b93a24ac3bf01e.tar.gz
android_art-1809a72a66d245ae598582d658b93a24ac3bf01e.tar.bz2
android_art-1809a72a66d245ae598582d658b93a24ac3bf01e.zip
Uleb128 compression of vmap and mapping table.
Bug 9437697. Change-Id: I30bcb97d12cd8b46d3b2cdcbdd358f08fbb9947a
Diffstat (limited to 'compiler/oat_writer.cc')
-rw-r--r--compiler/oat_writer.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/oat_writer.cc b/compiler/oat_writer.cc
index 21c5317b69..ce88cf6dd6 100644
--- a/compiler/oat_writer.cc
+++ b/compiler/oat_writer.cc
@@ -322,12 +322,12 @@ size_t OatWriter::InitOatCodeMethod(size_t offset, size_t oat_class_index,
core_spill_mask = compiled_method->GetCoreSpillMask();
fp_spill_mask = compiled_method->GetFpSpillMask();
- const std::vector<uint32_t>& mapping_table = compiled_method->GetMappingTable();
+ const std::vector<uint8_t>& mapping_table = compiled_method->GetMappingTable();
size_t mapping_table_size = mapping_table.size() * sizeof(mapping_table[0]);
mapping_table_offset = (mapping_table_size == 0) ? 0 : offset;
// Deduplicate mapping tables
- SafeMap<const std::vector<uint32_t>*, uint32_t>::iterator mapping_iter =
+ SafeMap<const std::vector<uint8_t>*, uint32_t>::iterator mapping_iter =
mapping_table_offsets_.find(&mapping_table);
if (mapping_iter != mapping_table_offsets_.end()) {
mapping_table_offset = mapping_iter->second;
@@ -337,12 +337,12 @@ size_t OatWriter::InitOatCodeMethod(size_t offset, size_t oat_class_index,
oat_header_->UpdateChecksum(&mapping_table[0], mapping_table_size);
}
- const std::vector<uint16_t>& vmap_table = compiled_method->GetVmapTable();
+ const std::vector<uint8_t>& vmap_table = compiled_method->GetVmapTable();
size_t vmap_table_size = vmap_table.size() * sizeof(vmap_table[0]);
vmap_table_offset = (vmap_table_size == 0) ? 0 : offset;
// Deduplicate vmap tables
- SafeMap<const std::vector<uint16_t>*, uint32_t>::iterator vmap_iter =
+ SafeMap<const std::vector<uint8_t>*, uint32_t>::iterator vmap_iter =
vmap_table_offsets_.find(&vmap_table);
if (vmap_iter != vmap_table_offsets_.end()) {
vmap_table_offset = vmap_iter->second;
@@ -717,11 +717,11 @@ size_t OatWriter::WriteCodeMethod(OutputStream& out, const size_t file_offset,
DCHECK_OFFSET();
#endif
- const std::vector<uint32_t>& mapping_table = compiled_method->GetMappingTable();
+ const std::vector<uint8_t>& mapping_table = compiled_method->GetMappingTable();
size_t mapping_table_size = mapping_table.size() * sizeof(mapping_table[0]);
// Deduplicate mapping tables
- SafeMap<const std::vector<uint32_t>*, uint32_t>::iterator mapping_iter =
+ SafeMap<const std::vector<uint8_t>*, uint32_t>::iterator mapping_iter =
mapping_table_offsets_.find(&mapping_table);
if (mapping_iter != mapping_table_offsets_.end() &&
relative_offset != method_offsets.mapping_table_offset_) {
@@ -741,11 +741,11 @@ size_t OatWriter::WriteCodeMethod(OutputStream& out, const size_t file_offset,
}
DCHECK_OFFSET();
- const std::vector<uint16_t>& vmap_table = compiled_method->GetVmapTable();
+ const std::vector<uint8_t>& vmap_table = compiled_method->GetVmapTable();
size_t vmap_table_size = vmap_table.size() * sizeof(vmap_table[0]);
// Deduplicate vmap tables
- SafeMap<const std::vector<uint16_t>*, uint32_t>::iterator vmap_iter =
+ SafeMap<const std::vector<uint8_t>*, uint32_t>::iterator vmap_iter =
vmap_table_offsets_.find(&vmap_table);
if (vmap_iter != vmap_table_offsets_.end() &&
relative_offset != method_offsets.vmap_table_offset_) {