mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-13 06:59:38 +00:00
8208186: SetHeapSamplingInterval handles 1 explicitly
Explicitly test for the 0 case (sample everything) Reviewed-by: amenkov, sspitsyn
This commit is contained in:
parent
5d1d4eb155
commit
bd5f1aba05
@ -104,8 +104,10 @@ void ThreadHeapSampler::pick_next_geometric_sample() {
|
||||
}
|
||||
|
||||
void ThreadHeapSampler::pick_next_sample(size_t overflowed_bytes) {
|
||||
if (get_sampling_interval() == 1) {
|
||||
_bytes_until_sample = 1;
|
||||
// Explicitly test if the sampling interval is 0, return 0 to sample every
|
||||
// allocation.
|
||||
if (get_sampling_interval() == 0) {
|
||||
_bytes_until_sample = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user