Am Montag, 10. Mai 2004 23:31 schrieb David P Grove:
> I haven't taken a deep look at this code, but I have one suggestion
> based on the performance profiling of Jikes RVM and classpath 0.09 I
> was doing the end of last week.
>
> Would it be possible to change the native methods to take the file
> descriptor as an additional argument? In the current Java/native
> breakdown the very first thing most native methods do is callback via
> JNI to acquire the fd. This is much less efficient (at least on
> Jikes RVM, and I suspect on most JNI-based VMs) then loading the fd
> in the Java code and then passing it as an argument to the native
> methods that need it. You might need to add a wrapper method in some
> cases if the native method is called by other classes, for example:
>
> public native int read();
>
> becomes
>
> public int read() {
> return readImpl(fd);
> }
> private native int readImpl(int fd);
Which leads us to the discussion again what type a file descriptor
should have. Is an int (4 byte) enought for 64 bit archs ? What about
128 bit archs in the future ? From the last discussions fd should be at
least long when. I know that GNU classpath currently uses int but when
we change it we can try to do it right.
Michael
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath