equal
deleted
inserted
replaced
5423 uint stride = MIN2(MAX2(_n_workers, 1U), limit); |
5423 uint stride = MIN2(MAX2(_n_workers, 1U), limit); |
5424 |
5424 |
5425 // limit is set using max_num_q() - which was set using ParallelGCThreads. |
5425 // limit is set using max_num_q() - which was set using ParallelGCThreads. |
5426 // So this must be true - but assert just in case someone decides to |
5426 // So this must be true - but assert just in case someone decides to |
5427 // change the worker ids. |
5427 // change the worker ids. |
5428 assert(0 <= worker_id && worker_id < limit, "sanity"); |
5428 assert(worker_id < limit, "sanity"); |
5429 assert(!rp->discovery_is_atomic(), "check this code"); |
5429 assert(!rp->discovery_is_atomic(), "check this code"); |
5430 |
5430 |
5431 // Select discovered lists [i, i+stride, i+2*stride,...,limit) |
5431 // Select discovered lists [i, i+stride, i+2*stride,...,limit) |
5432 for (uint idx = worker_id; idx < limit; idx += stride) { |
5432 for (uint idx = worker_id; idx < limit; idx += stride) { |
5433 DiscoveredList& ref_list = rp->discovered_refs()[idx]; |
5433 DiscoveredList& ref_list = rp->discovered_refs()[idx]; |