mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-26 10:10:19 +00:00
8254744: Clean-up CodeBlob::align_code_offset
Reviewed-by: mdoerr, eosterlund
This commit is contained in:
parent
f71e8a6198
commit
738effade4
@ -55,9 +55,8 @@ const char* CodeBlob::compiler_name() const {
|
||||
|
||||
unsigned int CodeBlob::align_code_offset(int offset) {
|
||||
// align the size to CodeEntryAlignment
|
||||
return
|
||||
((offset + (int)CodeHeap::header_size() + (CodeEntryAlignment-1)) & ~(CodeEntryAlignment-1))
|
||||
- (int)CodeHeap::header_size();
|
||||
int header_size = (int)CodeHeap::header_size();
|
||||
return align_up(offset + header_size, CodeEntryAlignment) - header_size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -30,11 +30,6 @@
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
size_t CodeHeap::header_size() {
|
||||
return sizeof(HeapBlock);
|
||||
}
|
||||
|
||||
|
||||
// Implementation of Heap
|
||||
|
||||
CodeHeap::CodeHeap(const char* name, const int code_blob_type)
|
||||
|
||||
@ -187,7 +187,7 @@ class CodeHeap : public CHeapObj<mtCode> {
|
||||
virtual CodeBlob* find_blob_unsafe(void* start) const;
|
||||
size_t alignment_unit() const; // alignment of any block
|
||||
size_t alignment_offset() const; // offset of first byte of any block, within the enclosing alignment unit
|
||||
static size_t header_size(); // returns the header size for each heap block
|
||||
static size_t header_size() { return sizeof(HeapBlock); } // returns the header size for each heap block
|
||||
|
||||
size_t segment_size() const { return _segment_size; } // for CodeHeapState
|
||||
HeapBlock* first_block() const; // for CodeHeapState
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user