8258459: Decouple gc_globals.hpp from globals.hpp

Reviewed-by: lfoltan, coleenp
This commit is contained in:
Ioi Lam 2021-01-05 05:57:08 +00:00
parent 2499ac3db5
commit 5ea960728c
127 changed files with 375 additions and 192 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
#include "gc/shared/tlab_globals.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
@ -58,6 +59,10 @@ ThreadLocalAllocBuffer::ThreadLocalAllocBuffer() :
// do nothing. TLABs must be inited by initialize() calls
}
size_t ThreadLocalAllocBuffer::initial_refill_waste_limit() { return desired_size() / TLABRefillWasteFraction; }
size_t ThreadLocalAllocBuffer::min_size() { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); }
size_t ThreadLocalAllocBuffer::refill_waste_limit_increment() { return TLABWasteIncrement; }
size_t ThreadLocalAllocBuffer::remaining() {
if (end() == NULL) {
return 0;