Always inline some methods related to StackMap.
This significantly speeds up stack walking on Pmd in Dacapo (10-30%).
Test: test-art-host
Change-Id: I79513b0b3d611e591c44e252062abf6a4f902797
diff --git a/runtime/memory_region.h b/runtime/memory_region.h
index f018c1f..fe3f917 100644
--- a/runtime/memory_region.h
+++ b/runtime/memory_region.h
@@ -148,14 +148,14 @@
void CopyFrom(size_t offset, const MemoryRegion& from) const;
// Compute a sub memory region based on an existing one.
- MemoryRegion Subregion(uintptr_t offset, uintptr_t size_in) const {
+ ALWAYS_INLINE MemoryRegion Subregion(uintptr_t offset, uintptr_t size_in) const {
CHECK_GE(this->size(), size_in);
CHECK_LE(offset, this->size() - size_in);
return MemoryRegion(reinterpret_cast<void*>(start() + offset), size_in);
}
// Compute an extended memory region based on an existing one.
- void Extend(const MemoryRegion& region, uintptr_t extra) {
+ ALWAYS_INLINE void Extend(const MemoryRegion& region, uintptr_t extra) {
pointer_ = region.pointer();
size_ = (region.size() + extra);
}