RFR: 8313306: More sensible reservation logging [v10]

Coleen Phillimore coleenp at openjdk.org
Wed Feb 14 17:10:57 UTC 2024


On Wed, 14 Feb 2024 06:47:21 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> assert will only fire on debug builds whereas fatal will fire on all builds. I assume the intent is to catch this during testing but only log in production ??
>
> Let's use assert here. 
> 
> I think the assert vs guarantee/fatal question in these sources is a bit messy and could do with a do-over, but in a different PR and done by people that can test on AIX (neither I nor Sonia can).
> 
> Most of this code was done by me, 20 years ago. When we did the AIX port, initially things were broken left and right, and some AIX sysV APIs failed intermittently too, so I often used guarantee to make sure we noticed when this happened, even at a customer site. That said, all issues OS- and JVM-wise are long ironed out today, so assert is more appropiate.

Ok. yes. then I assume this could be:

assert(false, "Failed to set page size (need " UINTX_FORMAT
                       " 64K pages) - shmctl failed. (errno=%s).",
                       size / (64 * K),
                       os::strerror(ep.saved_errno());

Or just leave it if you can't use fatal.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17356#discussion_r1489800286


More information about the hotspot-runtime-dev mailing list