RFR: JDK-8306672: support offset in dll_address_to_library_name on AIX
Thomas Stuefe
stuefe at openjdk.org
Thu Apr 27 15:56:54 UTC 2023
On Thu, 27 Apr 2023 14:30:18 GMT, JoKern65 <duke at openjdk.org> wrote:
> So far the offset return reference parameter was not supported on AIX, but always set to -1. This could be improved, it was already supported on other OS platforms like Linux.
Hi Joachim,
nice to see you here :-)
Change is mostly good, small nits remain. You may want to adjust copyright years in the file headers. The rule we follow is
- adjust Oracle's copyright year always if needed (changing the last year to 2023)
- adjust SAPs (or whatever company you work for) copyright too
- leave other copyrights alone.
Note: porting_aix has no Oracle copyrights since nothing in that codebase hat been derived from the OpenJDK.
Cheers, Thomas
src/hotspot/os/aix/os_aix.cpp line 1086:
> 1084: }
> 1085: if (offset != nullptr) {
> 1086: *offset = addr - base;
Maybe add a sanity check that addr >= base and <= (base + INT_MAX). If it never should happen, an assert is fine, otherwise handled at runtime.
src/hotspot/os/aix/os_aix.cpp line 1089:
> 1087: }
> 1088:
> 1089: return true;
Style nits:
- no space after (
- for booleans (and only those), the abridged style "if (!xxx)" is preferred
(for this and other things, see https://github.com/openjdk/jdk/blob/a471510d33c3a21c6df4cf868042fa8d822002e7/doc/hotspot-style.md)
And yes, a lot of older existing code does not follow these, but newer additions should.
src/hotspot/os/aix/porting_aix.hpp line 91:
> 89: address pc, // [in] program counter
> 90: char* p_name, size_t namelen, // [out] module name
> 91: address* p_base // [out] module name
comment copy paste error?
-------------
Changes requested by stuefe (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13692#pullrequestreview-1404370887
PR Review Comment: https://git.openjdk.org/jdk/pull/13692#discussion_r1179364386
PR Review Comment: https://git.openjdk.org/jdk/pull/13692#discussion_r1179357293
PR Review Comment: https://git.openjdk.org/jdk/pull/13692#discussion_r1179369935
More information about the hotspot-runtime-dev
mailing list