diff options
| author | 2019-06-18 11:18:08 +0100 | |
|---|---|---|
| committer | 2019-06-18 21:47:58 +0000 | |
| commit | 8eefb246019019f8081d11ba932bbabc04ca428b (patch) | |
| tree | 091a6e416471c1e0a89486f22b2c9ec3a28eb487 /runtime/jit/jit_code_cache.h | |
| parent | fb5eba3545b0c083ceead9b139c0759a9252bf84 (diff) | |
For 32-bit ARM devices align method headers and code to 64-byte
boundaries.
For other architectures, move back to instruction set alignment.
Rename kJitCodeCacheAlignment to kJitCodeAccountingBytes since it's
now only used for accounting rather than alignment.
Bug: 132205399
Test: manual (described in bug)
Merged-In: I88f5f39381bf0331ce8540a929c6a68b3b5e0c75
Change-Id: I88f5f39381bf0331ce8540a929c6a68b3b5e0c75
Diffstat (limited to 'runtime/jit/jit_code_cache.h')
| -rw-r--r-- | runtime/jit/jit_code_cache.h | 15 | 
1 files changed, 7 insertions, 8 deletions
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h index a3e10c75af..df58f19722 100644 --- a/runtime/jit/jit_code_cache.h +++ b/runtime/jit/jit_code_cache.h @@ -74,14 +74,13 @@ namespace jit {  class MarkCodeClosure;  class ScopedCodeCacheWrite; -// Alignment in bytes that will suit all architectures for JIT code cache allocations.  The -// allocated block is used for method header followed by generated code. Allocations should be -// aligned to avoid sharing cache lines between different allocations. The alignment should be -// determined from the hardware, but this isn't readily exposed in userland plus some hardware -// misreports. -static constexpr int kJitCodeAlignment = 64; - -using CodeCacheBitmap = gc::accounting::MemoryRangeBitmap<kJitCodeAlignment>; +// Number of bytes represented by a bit in the CodeCacheBitmap. Value is reasonable for all +// architectures. +static constexpr int kJitCodeAccountingBytes = 16; + +// Type of bitmap used for tracking live functions in the JIT code cache for the purposes +// of garbage collecting code. +using CodeCacheBitmap = gc::accounting::MemoryRangeBitmap<kJitCodeAccountingBytes>;  class JitCodeCache {   public:  |