RFR: JDK-8321266: Add diagnostic RSS threshold [v2]
Thomas Stuefe
stuefe at openjdk.org
Tue Dec 5 10:41:17 UTC 2023
On Tue, 5 Dec 2023 05:49:58 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Hi Thomas,
>
> I've taken a first pass through this and it seems okay in principle. A number of initial comments/suggestions below.
>
> Thanks.
Thanks a lot, David!
Makes me happy to see this finds acceptance at least in principle.
I changed:
- get_rss to get_RSS
- removed the "0 means off" text, since I assume passing 0 would be likely a user error. Instead, I also added an error check for percentage = 0.0.
- added a warning if the OS does not support this feature
> src/hotspot/share/runtime/globals.hpp line 1378:
>
>> 1376: "If RssLimit is set, interval, in ms, at which the JVM will " \
>> 1377: "check the process resident set size." \
>> 1378: range(10, UINT_MAX)) \
>
> Can we actually handle enrolling a periodic task with a UINT_MAX interval?
No, we can't; I'll correct the limit.
> src/hotspot/share/runtime/threads.cpp line 775:
>
>> 773: if (RssLimit != nullptr) {
>> 774: RssWatcher::initialize(RssLimit);
>> 775: }
>
> So I think if we are on AIX or regular BSD then we should at least give a warning that the flag will be ignored, and actually ignore it.
Done
> src/hotspot/share/services/rsswatch.hpp line 41:
>
>> 39: };
>> 40:
>> 41: #endif // OS_LINUX_RSSWATCH_HPP
>
> Comment is wrong
fixed
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16938#issuecomment-1840480839
PR Review Comment: https://git.openjdk.org/jdk/pull/16938#discussion_r1415325628
PR Review Comment: https://git.openjdk.org/jdk/pull/16938#discussion_r1415331131
PR Review Comment: https://git.openjdk.org/jdk/pull/16938#discussion_r1415330645
More information about the hotspot-dev
mailing list