1.1 --- a/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Thu Jan 23 12:08:28 2014 +0100 1.2 +++ b/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Mon Jan 27 13:14:53 2014 +0100 1.3 @@ -173,6 +173,26 @@ 1.4 return lgrp_spaces()->at(i)->space()->capacity_in_bytes(); 1.5 } 1.6 1.7 +size_t MutableNUMASpace::tlab_used(Thread *thr) const { 1.8 + // Please see the comments for tlab_capacity(). 1.9 + guarantee(thr != NULL, "No thread"); 1.10 + int lgrp_id = thr->lgrp_id(); 1.11 + if (lgrp_id == -1) { 1.12 + if (lgrp_spaces()->length() > 0) { 1.13 + return (used_in_bytes()) / lgrp_spaces()->length(); 1.14 + } else { 1.15 + assert(false, "There should be at least one locality group"); 1.16 + return 0; 1.17 + } 1.18 + } 1.19 + int i = lgrp_spaces()->find(&lgrp_id, LGRPSpace::equals); 1.20 + if (i == -1) { 1.21 + return 0; 1.22 + } 1.23 + return lgrp_spaces()->at(i)->space()->used_in_bytes(); 1.24 +} 1.25 + 1.26 + 1.27 size_t MutableNUMASpace::unsafe_max_tlab_alloc(Thread *thr) const { 1.28 // Please see the comments for tlab_capacity(). 1.29 guarantee(thr != NULL, "No thread");