summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2015-03-13 13:54:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-13 13:54:27 +0000
commitcc22e3946baf035c8732e9417ab132bfe663aa45 (patch)
tree7f99657bd4f8591f7cf463c1a197e1a7575abab6 /compiler
parent63346f57e2327894ce6c1e28e3d00342177538a6 (diff)
parentede7bf8a5cef965974e7c1edcf46a41fbe50a49d (diff)
downloadandroid_art-cc22e3946baf035c8732e9417ab132bfe663aa45.tar.gz
android_art-cc22e3946baf035c8732e9417ab132bfe663aa45.tar.bz2
android_art-cc22e3946baf035c8732e9417ab132bfe663aa45.zip
Merge "Align CodeInfo regions instead of their inner subregions."
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/stack_map_stream.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index 8fb58d19a9..863bab29ac 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -99,10 +99,12 @@ class StackMapStream : public ValueObject {
}
size_t ComputeNeededSize() const {
- return CodeInfo::kFixedSize
+ size_t size = CodeInfo::kFixedSize
+ ComputeStackMapsSize()
+ ComputeDexRegisterMapsSize()
+ ComputeInlineInfoSize();
+ // On ARM, CodeInfo data must be 4-byte aligned.
+ return RoundUp(size, kWordAlignment);
}
size_t ComputeStackMaskSize() const {
@@ -110,7 +112,7 @@ class StackMapStream : public ValueObject {
}
size_t ComputeStackMapsSize() const {
- return stack_maps_.Size() * StackMap::ComputeAlignedStackMapSize(ComputeStackMaskSize());
+ return stack_maps_.Size() * StackMap::ComputeStackMapSize(ComputeStackMaskSize());
}
// Compute the size of the Dex register map of `entry`.
@@ -133,8 +135,7 @@ class StackMapStream : public ValueObject {
DexRegisterLocation entry = dex_register_maps_.Get(i);
size += DexRegisterMap::EntrySize(entry);
}
- // On ARM, the Dex register maps must be 4-byte aligned.
- return RoundUp(size, kWordAlignment);
+ return size;
}
// Compute the size of all the inline information pieces.