RFR: 8080106: Refactor setup of parallel GC threads
Stefan Karlsson
stefan.karlsson at oracle.com
Wed May 20 19:59:45 UTC 2015
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++) {
>
> The frequency of casts to signed int is also disturbing.
>
> Perhaps globals.hpp and friends needs another round of enhancements, to support more types. But probably not until after the value checking work is finished.
Yes, I agree.
>
> Feel free to ignore that suggestion if it’s too annoying; leaving the cast *would* make it easier to find as part of a later cleanup.
>
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.
StefanK
More information about the hotspot-gc-dev
mailing list