RFR: JDK-8320383: refresh libraries cache on AIX in VMError::report [v3]

Thomas Stuefe stuefe at openjdk.org
Wed Nov 29 07:38:17 UTC 2023


On Wed, 29 Nov 2023 07:20:32 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > Note that back in the day we carried a lot of Solaris-specific coding hiding behind abstractions that only ever were implemented on Solaris. We do this still today for Windows (e.g. the os::vm_allocation_granularity() <-> os::vm_page_size() duality only exists because of Windows). That seemed to have been no problem. Why is it a problem when we do the same for AIX?
> 
> Two wrongs don't make a right. The legacy we had with Solaris and how the original three OS ports were developed was just something we've had to deal with. And when macOS/BSD came along we started to make inroads to cleaning up a lot of the mess (adding os_posix for example). An abstraction that only needs a non-empty implementation on one platform is not an abstraction it is a platform-specific requirement. Our goal is to try and minimise platform-specific code in shared code - hence the ifdefs here looked excessive, but converting to a not-really-an-abstraction API isn't better IMO. It's a balancing act for sure.

I understand that. That is why I looked for patterns in other platforms. In this case, doing things ad-hoc on demand (e.g. allocating when printing the first line of a stack trace) is inferior to my eyes than a clean setup at a definitive point (e.g. a hook for platforms to run code right before error handling).

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

PR Comment: https://git.openjdk.org/jdk/pull/16730#issuecomment-1831362410


More information about the hotspot-dev mailing list