On Tue, 16 Apr 2024 19:45:12 GMT, Alex Menkov <amen...@openjdk.org> wrote:

>> src/hotspot/share/services/heapDumper.hpp line 63:
>> 
>>> 61:   // additional info is written to out if not null.
>>> 62:   // compression >= 0 creates a gzipped file with the given compression 
>>> level.
>>> 63:   // parallel_thread_num >= 0 indicates thread numbers of parallel 
>>> object dump, -1 means "auto select".
>> 
>> I don't understand why you need to add `-1` to mean "auto-select" instead of 
>> just setting the default parameter to be `default_num_of_dump_threads()`?
>
> I think it makes the code more flexible - it allows to distinguish between 
> "use default value" and "I don't care" cases.

I'm not sure it is a worthwhile distinction. Not passing an actual parameter 
means "I don't care - take the default".

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18748#discussion_r1568350751

Reply via email to