This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] JNI performance improvements


Tom Tromey wrote:

Yes, definitely.  BTW, put something like "Fixes PR libgcj/12957" into
the ChangeLog (and commit message), this will update bugzilla with
info about the commit.

graydon> -#define FRAME_SIZE 32
graydon> +#define FRAME_SIZE 16

I assume this makes a difference when clearing the frames?

yeah.


graydon> +  // Flag to indicate some locals were allocated.
graydon> +  int allocated_p;

'bool' is clearer IMO, assuming it is performance neutral.

ah, forgot we're in C++ here.


graydon> -  // Synchronize while we do the work.  This must match
graydon> -  // synchronization in some other functions that manipulate or use
graydon> -  // the nathash table.
graydon> -  JvSynchronize sync (global_ref_table);

I don't think this is safe.  One thread could be calling
RegisterNatives and updating the method lookup table while another
thread is doing a lookup.

Oops! this part of the patch is actually left over from when I was playing with storing the method table in TLS. Forgot to roll that hunk back.


I'll fix these items and commit to trunk.

-graydon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]