mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8210753: Make ThreadLocalAllocBuffer::resize() public
Reviewed-by: eosterlund, jcbeyler
This commit is contained in:
parent
a3931a76f6
commit
4aa926a9eb
3 changed files with 9 additions and 19 deletions
|
@ -506,12 +506,13 @@ void CollectedHeap::accumulate_statistics_all_tlabs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectedHeap::resize_all_tlabs() {
|
void CollectedHeap::resize_all_tlabs() {
|
||||||
if (UseTLAB) {
|
assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
|
||||||
assert(SafepointSynchronize::is_at_safepoint() ||
|
"Should only resize tlabs at safepoint");
|
||||||
!is_init_completed(),
|
|
||||||
"should only resize tlabs at safepoint");
|
|
||||||
|
|
||||||
ThreadLocalAllocBuffer::resize_all_tlabs();
|
if (UseTLAB && ResizeTLAB) {
|
||||||
|
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
|
||||||
|
thread->tlab().resize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,14 +138,6 @@ void ThreadLocalAllocBuffer::make_parsable(bool retire, bool zap) {
|
||||||
"TLAB must be reset");
|
"TLAB must be reset");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadLocalAllocBuffer::resize_all_tlabs() {
|
|
||||||
if (ResizeTLAB) {
|
|
||||||
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
|
|
||||||
thread->tlab().resize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ThreadLocalAllocBuffer::resize() {
|
void ThreadLocalAllocBuffer::resize() {
|
||||||
// Compute the next tlab size using expected allocation amount
|
// Compute the next tlab size using expected allocation amount
|
||||||
assert(ResizeTLAB, "Should not call this otherwise");
|
assert(ResizeTLAB, "Should not call this otherwise");
|
||||||
|
|
|
@ -92,9 +92,6 @@ private:
|
||||||
// Make parsable and release it.
|
// Make parsable and release it.
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
// Resize based on amount of allocation, etc.
|
|
||||||
void resize();
|
|
||||||
|
|
||||||
void invariants() const { assert(top() >= start() && top() <= end(), "invalid tlab"); }
|
void invariants() const { assert(top() >= start() && top() <= end(), "invalid tlab"); }
|
||||||
|
|
||||||
void initialize(HeapWord* start, HeapWord* top, HeapWord* end);
|
void initialize(HeapWord* start, HeapWord* top, HeapWord* end);
|
||||||
|
@ -168,12 +165,12 @@ public:
|
||||||
// Retire in-use tlab before allocation of a new tlab
|
// Retire in-use tlab before allocation of a new tlab
|
||||||
void clear_before_allocation();
|
void clear_before_allocation();
|
||||||
|
|
||||||
|
// Resize based on amount of allocation, etc.
|
||||||
|
void resize();
|
||||||
|
|
||||||
// Accumulate statistics across all tlabs before gc
|
// Accumulate statistics across all tlabs before gc
|
||||||
static void accumulate_statistics_before_gc();
|
static void accumulate_statistics_before_gc();
|
||||||
|
|
||||||
// Resize tlabs for all threads
|
|
||||||
static void resize_all_tlabs();
|
|
||||||
|
|
||||||
void fill(HeapWord* start, HeapWord* top, size_t new_size);
|
void fill(HeapWord* start, HeapWord* top, size_t new_size);
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue