comparison src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp @ 14310:1e1c8d358b52

8030177: G1: Enable TLAB resizing Reviewed-by: tschatzl, stefank, jmasa
author brutisso
date Mon, 27 Jan 2014 13:14:53 +0100
parents 63a4eb8bcd23
children e5d78f318aec
comparison
equal deleted inserted replaced
14309:63a4eb8bcd23 14310:1e1c8d358b52
170 if (i == -1) { 170 if (i == -1) {
171 return 0; 171 return 0;
172 } 172 }
173 return lgrp_spaces()->at(i)->space()->capacity_in_bytes(); 173 return lgrp_spaces()->at(i)->space()->capacity_in_bytes();
174 } 174 }
175
176 size_t MutableNUMASpace::tlab_used(Thread *thr) const {
177 // Please see the comments for tlab_capacity().
178 guarantee(thr != NULL, "No thread");
179 int lgrp_id = thr->lgrp_id();
180 if (lgrp_id == -1) {
181 if (lgrp_spaces()->length() > 0) {
182 return (used_in_bytes()) / lgrp_spaces()->length();
183 } else {
184 assert(false, "There should be at least one locality group");
185 return 0;
186 }
187 }
188 int i = lgrp_spaces()->find(&lgrp_id, LGRPSpace::equals);
189 if (i == -1) {
190 return 0;
191 }
192 return lgrp_spaces()->at(i)->space()->used_in_bytes();
193 }
194
175 195
176 size_t MutableNUMASpace::unsafe_max_tlab_alloc(Thread *thr) const { 196 size_t MutableNUMASpace::unsafe_max_tlab_alloc(Thread *thr) const {
177 // Please see the comments for tlab_capacity(). 197 // Please see the comments for tlab_capacity().
178 guarantee(thr != NULL, "No thread"); 198 guarantee(thr != NULL, "No thread");
179 int lgrp_id = thr->lgrp_id(); 199 int lgrp_id = thr->lgrp_id();