diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2016-11-10 10:38:11 +0000 |
|---|---|---|
| committer | Nicolas Geoffray <ngeoffray@google.com> | 2016-11-11 13:18:24 +0000 |
| commit | 75afcdd3503a8a8518e5b23d21b6e73306ce39ce (patch) | |
| tree | b49afc4772fa72319475f96ed66d744bb03e803c /runtime/jit/jit_code_cache.h | |
| parent | ee48b0f11df812d98de5c989e1f6d95a21515564 (diff) | |
| download | art-75afcdd3503a8a8518e5b23d21b6e73306ce39ce.tar.gz art-75afcdd3503a8a8518e5b23d21b6e73306ce39ce.tar.bz2 art-75afcdd3503a8a8518e5b23d21b6e73306ce39ce.zip | |
Revert "Revert "JIT root tables.""
Also contains Revert "Support kJitTableAddress in x86/arm/arm64."
This reverts commit 4acd03638fcdb4e5d1666f8eec7eb3bf6d6be035.
This reverts commit 997d1217830c0a18b70faeabd53c04700a87d7d9.
Test: ART_USE_READ_BARRIER=true/false test-art-host test-art-target
Change-Id: I77cb1e9bf8f1b4c58b72d3cf5ca31ced2aaa1ea3
Diffstat (limited to 'runtime/jit/jit_code_cache.h')
| -rw-r--r-- | runtime/jit/jit_code_cache.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h index e15c93a448..a97ef683f7 100644 --- a/runtime/jit/jit_code_cache.h +++ b/runtime/jit/jit_code_cache.h @@ -92,13 +92,15 @@ class JitCodeCache { // Allocate and write code and its metadata to the code cache. uint8_t* CommitCode(Thread* self, ArtMethod* method, - const uint8_t* vmap_table, + uint8_t* stack_map, + uint8_t* roots_data, size_t frame_size_in_bytes, size_t core_spill_mask, size_t fp_spill_mask, const uint8_t* code, size_t code_size, - bool osr) + bool osr, + Handle<mirror::ObjectArray<mirror::Object>> roots) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_); @@ -108,8 +110,14 @@ class JitCodeCache { // Return true if the code cache contains this method. bool ContainsMethod(ArtMethod* method) REQUIRES(!lock_); - // Reserve a region of data of size at least "size". Returns null if there is no more room. - uint8_t* ReserveData(Thread* self, size_t size, ArtMethod* method) + // Allocate a region of data that contain `size` bytes, and potentially space + // for storing `number_of_roots` roots. Returns null if there is no more room. + void ReserveData(Thread* self, + size_t size, + size_t number_of_roots, + ArtMethod* method, + uint8_t** stack_map_data, + uint8_t** roots_data) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_); @@ -188,6 +196,10 @@ class JitCodeCache { bool IsOsrCompiled(ArtMethod* method) REQUIRES(!lock_); + void SweepRootTables(IsMarkedVisitor* visitor) + REQUIRES(!lock_) + REQUIRES_SHARED(Locks::mutator_lock_); + private: // Take ownership of maps. JitCodeCache(MemMap* code_map, @@ -201,13 +213,15 @@ class JitCodeCache { // allocation fails. Return null if the allocation fails. uint8_t* CommitCodeInternal(Thread* self, ArtMethod* method, - const uint8_t* vmap_table, + uint8_t* stack_map, + uint8_t* roots_data, size_t frame_size_in_bytes, size_t core_spill_mask, size_t fp_spill_mask, const uint8_t* code, size_t code_size, - bool osr) + bool osr, + Handle<mirror::ObjectArray<mirror::Object>> roots) REQUIRES(!lock_) REQUIRES_SHARED(Locks::mutator_lock_); |
