75 class DepChange; |
75 class DepChange; |
76 |
76 |
77 class CodeCache : AllStatic { |
77 class CodeCache : AllStatic { |
78 friend class VMStructs; |
78 friend class VMStructs; |
79 friend class NMethodIterator; |
79 friend class NMethodIterator; |
|
80 friend class WhiteBox; |
80 private: |
81 private: |
81 // CodeHeaps of the cache |
82 // CodeHeaps of the cache |
82 static GrowableArray<CodeHeap*>* _heaps; |
83 static GrowableArray<CodeHeap*>* _heaps; |
83 |
84 |
84 static address _low_bound; // Lower bound of CodeHeap addresses |
85 static address _low_bound; // Lower bound of CodeHeap addresses |
96 |
97 |
97 // CodeHeap management |
98 // CodeHeap management |
98 static void initialize_heaps(); // Initializes the CodeHeaps |
99 static void initialize_heaps(); // Initializes the CodeHeaps |
99 // Creates a new heap with the given name and size, containing CodeBlobs of the given type |
100 // Creates a new heap with the given name and size, containing CodeBlobs of the given type |
100 static void add_heap(ReservedSpace rs, const char* name, size_t size_initial, int code_blob_type); |
101 static void add_heap(ReservedSpace rs, const char* name, size_t size_initial, int code_blob_type); |
101 static CodeHeap* get_code_heap(CodeBlob* cb); // Returns the CodeHeap for the given CodeBlob |
102 static CodeHeap* get_code_heap(const CodeBlob* cb); // Returns the CodeHeap for the given CodeBlob |
102 static CodeHeap* get_code_heap(int code_blob_type); // Returns the CodeHeap for the given CodeBlobType |
103 static CodeHeap* get_code_heap(int code_blob_type); // Returns the CodeHeap for the given CodeBlobType |
103 // Returns the name of the VM option to set the size of the corresponding CodeHeap |
104 // Returns the name of the VM option to set the size of the corresponding CodeHeap |
104 static const char* get_code_heap_flag_name(int code_blob_type); |
105 static const char* get_code_heap_flag_name(int code_blob_type); |
105 static bool heap_available(int code_blob_type); // Returns true if an own CodeHeap for the given CodeBlobType is available |
106 static bool heap_available(int code_blob_type); // Returns true if an own CodeHeap for the given CodeBlobType is available |
106 static ReservedCodeSpace reserve_heap_memory(size_t size); // Reserves one continuous chunk of memory for the CodeHeaps |
107 static ReservedCodeSpace reserve_heap_memory(size_t size); // Reserves one continuous chunk of memory for the CodeHeaps |