[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-hotspot-gc-dev
Subject: Re: RFR: 8080877: Don't use workers()->total_workers() when walking G1CollectedHeap::_task_queues
From: Stefan Karlsson <stefan.karlsson () oracle ! com>
Date: 2015-05-25 6:59:49
Message-ID: 5562C865.1000004 () oracle ! com
[Download RAW message or body]
On 22/05/15 21:00, Derek White wrote:
> Looks good to me!
Thanks.
StefanK
>
> - Derek
>
> On 5/22/15 8:17 AM, Stefan Karlsson wrote:
>> Hi all,
>>
>> The _task_queues are initialized to contain ParallelGCThreads number
>> of queues:
>>
>> int n_queues = (int)ParallelGCThreads;
>> _task_queues = new RefToScanQueueSet(n_queues);
>>
>> When iterating over the queues we use workers()->total_workers() to
>> determine the number of queues in the set:
>>
>> const uint n = workers()->total_workers();
>> for (uint i = 0; i < n; ++i) {
>> task_queue(i)->stats.reset();
>> }
>>
>> which gives the same result, since the workers are also initialized
>> with ParallelGCThreads:
>>
>> _workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
>> /* are_GC_task_threads */true,
>> /* are_ConcurrentGC_threads */false);
>> _workers->initialize_workers();
>>
>> I propose that we change the iteration code to ask the task queue set
>> how many task queues it contain:
>>
>> - const uint n = workers()->total_workers();
>> + const uint n = num_task_queues();
>> for (uint i = 0; i < n; ++i) {
>> task_queue(i)->stats.reset();
>> }
>>
>> I also removed the unnecessary forward declarations of OopTaskQueue
>> and OopTaskQueueSet. This isn't strictly needed for this patch, but
>> was causing problems while I was prototyping this and other patches.
>>
>> http://cr.openjdk.java.net/~stefank/8080877/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8080877
>>
>> Thanks,
>> StefanK
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic