diff options
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: |