summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache.h
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2019-08-20 10:34:02 +0100
committer David Srbecky <dsrbecky@google.com> 2019-09-01 21:08:43 +0000
commit87fb032ee1e7ae98df26c646c450ef44e23fc805 (patch)
tree6754b2d2a0e38277885a691d1be6f0d796478cc7 /runtime/jit/jit_code_cache.h
parenta86a5d162e6b59a32e8ea7991e6c8a157aca5a0a (diff)
Fix JIT data dual mapping for apps.
We don't use it now, but it would be nice to make it functional. Mark the read-only memory as const, and fix the compile errors. Test: test.py -b --host --jit Bug: 119800099 Change-Id: Ic1c45072f3c97f560e843f95fb87b95f754c6e03
Diffstat (limited to 'runtime/jit/jit_code_cache.h')
-rw-r--r--runtime/jit/jit_code_cache.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 6aa5f317cf..64607b695e 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -116,7 +116,7 @@ class ZygoteMap {
};
// The map allocated with `region_`.
- ArrayRef<Entry> map_;
+ ArrayRef<const Entry> map_;
// The region in which the map is allocated.
JitMemoryRegion* const region_;
@@ -183,7 +183,7 @@ class JitCodeCache {
size_t code_size,
const uint8_t* stack_map,
size_t stack_map_size,
- uint8_t* roots_data,
+ const uint8_t* roots_data,
const std::vector<Handle<mirror::Object>>& roots,
bool osr,
bool has_should_deoptimize_flag,
@@ -207,17 +207,17 @@ class JitCodeCache {
// Allocate a region of data that will contain a stack map of size `stack_map_size` and
// `number_of_roots` roots accessed by the JIT code.
// Return a pointer to where roots will be stored.
- uint8_t* ReserveData(Thread* self,
- JitMemoryRegion* region,
- size_t stack_map_size,
- size_t number_of_roots,
- ArtMethod* method)
+ const uint8_t* ReserveData(Thread* self,
+ JitMemoryRegion* region,
+ size_t stack_map_size,
+ size_t number_of_roots,
+ ArtMethod* method)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::jit_lock_);
// Clear data from the data portion of the code cache.
void ClearData(
- Thread* self, JitMemoryRegion* region, uint8_t* roots_data)
+ Thread* self, JitMemoryRegion* region, const uint8_t* roots_data)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::jit_lock_);
@@ -351,7 +351,7 @@ class JitCodeCache {
size_t code_size,
const uint8_t* stack_map,
size_t stack_map_size,
- uint8_t* roots_data,
+ const uint8_t* roots_data,
const std::vector<Handle<mirror::Object>>& roots,
bool osr,
bool has_should_deoptimize_flag,