diff options
author | 2019-12-03 14:36:42 +0000 | |
---|---|---|
committer | 2019-12-04 12:04:36 +0000 | |
commit | a00b54b74bee06c006b8bebfbef85e2801de293c (patch) | |
tree | 6edb2a96c1f89ae913e6b5f190b117cb290239e8 /runtime/interpreter/interpreter_cache.h | |
parent | e571a283b73fb4621c401811f523503b3266564b (diff) |
Helpers and refactorings to prepare for interpreter optimizations (x64)
- Add data structure offsets that will be used in assembly code.
- Be explicit about a stack overflow in a fault handler.
- Move assembly helper code in asm_support so interpreter can use it.
- Support putting literals in InterpreterCache.
- Fix artHandleFillArrayDataFromCode for x64.
Bug: 119800099
Test: test.py
Change-Id: I2729f87fe5d09c04ae2e7081636f0cd89ac14c21
Diffstat (limited to 'runtime/interpreter/interpreter_cache.h')
-rw-r--r-- | runtime/interpreter/interpreter_cache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/interpreter/interpreter_cache.h b/runtime/interpreter/interpreter_cache.h index 003ea6c8d3..0ada562438 100644 --- a/runtime/interpreter/interpreter_cache.h +++ b/runtime/interpreter/interpreter_cache.h @@ -45,10 +45,10 @@ class Thread; // Aligned to 16-bytes to make it easier to get the address of the cache // from assembly (it ensures that the offset is valid immediate value). class ALIGNED(16) InterpreterCache { + public: // Aligned since we load the whole entry in single assembly instruction. typedef std::pair<const void*, size_t> Entry ALIGNED(2 * sizeof(size_t)); - public: // 2x size increase/decrease corresponds to ~0.5% interpreter performance change. // Value of 256 has around 75% cache hit rate. static constexpr size_t kSize = 256; @@ -77,6 +77,10 @@ class ALIGNED(16) InterpreterCache { data_[IndexOf(key)] = Entry{key, value}; } + std::array<Entry, kSize>& GetArray() { + return data_; + } + private: bool IsCalledFromOwningThread(); |