RFR(M): 8031997: PPC64: Make the various POLL constants system dependant

Volker Simonis volker.simonis at gmail.com
Fri Jan 17 14:04:42 UTC 2014

On Fri, Jan 17, 2014 at 2:23 PM, Florian Weimer <fweimer at redhat.com> wrote:
> On 01/17/2014 12:25 PM, Volker Simonis wrote:
>> To avoid a mapping of the Java constants to the native ones every time
>> we go from Java to Native and back, this change replaces the currently
>> used constants with a single instance of constants which is placed in
>> src/share/classes/sun/nio/ch/Net.java and which are dynamically
>> initialized from native methods with the correct, platfrom-specific
>> values.
> Previously, the constants where inlined at the class file level.  Is there a
> downside to not doing this?

Hi Florian,

I already thought about this. From a performance perspective, I don't
think it will have any impact considering that these constants will be
used for doing native system calls anyway.

It could be of course a problem on AIX (and only there) if third-party
code had previously inlined these constants. But as these are internal
classes (i.e. sun.nio.ch) which should be only used by the JDK itself,
 I hope there's not too such much code outside there.


> --
> Florian Weimer / Red Hat Product Security Team

More information about the core-libs-dev mailing list