mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8030177: G1: Enable TLAB resizing
Reviewed-by: tschatzl, stefank, jmasa
This commit is contained in:
parent
81ba2e32c0
commit
9b29efeb63
20 changed files with 141 additions and 74 deletions
|
@ -173,6 +173,26 @@ size_t MutableNUMASpace::tlab_capacity(Thread *thr) const {
|
|||
return lgrp_spaces()->at(i)->space()->capacity_in_bytes();
|
||||
}
|
||||
|
||||
size_t MutableNUMASpace::tlab_used(Thread *thr) const {
|
||||
// Please see the comments for tlab_capacity().
|
||||
guarantee(thr != NULL, "No thread");
|
||||
int lgrp_id = thr->lgrp_id();
|
||||
if (lgrp_id == -1) {
|
||||
if (lgrp_spaces()->length() > 0) {
|
||||
return (used_in_bytes()) / lgrp_spaces()->length();
|
||||
} else {
|
||||
assert(false, "There should be at least one locality group");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
int i = lgrp_spaces()->find(&lgrp_id, LGRPSpace::equals);
|
||||
if (i == -1) {
|
||||
return 0;
|
||||
}
|
||||
return lgrp_spaces()->at(i)->space()->used_in_bytes();
|
||||
}
|
||||
|
||||
|
||||
size_t MutableNUMASpace::unsafe_max_tlab_alloc(Thread *thr) const {
|
||||
// Please see the comments for tlab_capacity().
|
||||
guarantee(thr != NULL, "No thread");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue