equal
deleted
inserted
replaced
5404 uint stride = MIN2(MAX2(_n_workers, 1U), limit); |
5404 uint stride = MIN2(MAX2(_n_workers, 1U), limit); |
5405 |
5405 |
5406 // limit is set using max_num_q() - which was set using ParallelGCThreads. |
5406 // limit is set using max_num_q() - which was set using ParallelGCThreads. |
5407 // So this must be true - but assert just in case someone decides to |
5407 // So this must be true - but assert just in case someone decides to |
5408 // change the worker ids. |
5408 // change the worker ids. |
5409 assert(0 <= worker_id && worker_id < limit, "sanity"); |
5409 assert(worker_id < limit, "sanity"); |
5410 assert(!rp->discovery_is_atomic(), "check this code"); |
5410 assert(!rp->discovery_is_atomic(), "check this code"); |
5411 |
5411 |
5412 // Select discovered lists [i, i+stride, i+2*stride,...,limit) |
5412 // Select discovered lists [i, i+stride, i+2*stride,...,limit) |
5413 for (uint idx = worker_id; idx < limit; idx += stride) { |
5413 for (uint idx = worker_id; idx < limit; idx += stride) { |
5414 DiscoveredList& ref_list = rp->discovered_refs()[idx]; |
5414 DiscoveredList& ref_list = rp->discovered_refs()[idx]; |