equal
deleted
inserted
replaced
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(); |