RFR: 8080106: Refactor setup of parallel GC threads

Kim Barrett kim.barrett at oracle.com
Wed May 20 21:23:04 UTC 2015


On May 20, 2015, at 3:59 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
> 
> On 2015-05-20 21:19, Kim Barrett wrote:
>> On May 20, 2015, at 1:59 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>>> On 2015-05-20 19:23, Kim Barrett wrote:
>>>> Also, I'd prefer use of UINTX_FORMAT, rather than casting
>>>> ParallelGCThreads.
>>> Fine. It's extremely annoying that ParallelGCThreads is defined as a uintx (64 bits on 64-bit platforms) when we use it as an uint, which can be 32 bits wide.
>>> 
>>> $ grep -r "int) *ParallelGCThreads” src
>>> […]
>> That’s only about 20% of the occurrences of ParallelGCThreads.  (Can’t decide whether to use a smiley or a frowny here.)
> 
> Yeah, but there are other usages as well. For example:
> src/share/vm/gc_implementation/parNew/parNewGeneration.cpp:  for (uint i1 = 0; i1 < ParallelGCThreads; i1++) {

True, that will loop forever if ParallelGCThreads > UINT_MAX.  OTOH, we probably run into problems long before getting there :-)

> I'll go with your suggested changes. The one who get to change the flag to uint will have to look at all usages of ParallelGCThreads.

OK.



More information about the hotspot-gc-dev mailing list