[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnu.java.nio.channels.FileChannelImpl
From: |
Michael Koch |
Subject: |
Re: gnu.java.nio.channels.FileChannelImpl |
Date: |
Tue, 11 May 2004 00:11:32 +0200 |
User-agent: |
KMail/1.5.4 |
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
- gnu.java.nio.channels.FileChannelImpl, David P Grove, 2004/05/10
- Re: gnu.java.nio.channels.FileChannelImpl,
Michael Koch <=
- Re: [Jikesrvm-core] Re: gnu.java.nio.channels.FileChannelImpl, Steven Augart, 2004/05/11
- Re: [Jikesrvm-core] Re: gnu.java.nio.channels.FileChannelImpl, Anthony Green, 2004/05/12
- Re: [Jikesrvm-core] Re: gnu.java.nio.channels.FileChannelImpl, Steven Augart, 2004/05/12
- Re: [Jikesrvm-core] Re: gnu.java.nio.channels.FileChannelImpl, Anthony Green, 2004/05/12
- Re: [Jikesrvm-core] Re: gnu.java.nio.channels.FileChannelImpl, Steven Augart, 2004/05/12
- Re: [Jikesrvm-core] Re: gnu.java.nio.channels.FileChannelImpl, Per Bothner, 2004/05/12