public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* very slow jni code callbacks
@ 2009-09-27 13:23 Herman ten Brugge
  2009-09-28 12:03 ` Andrew Haley
  0 siblings, 1 reply; 8+ messages in thread
From: Herman ten Brugge @ 2009-09-27 13:23 UTC (permalink / raw)
  To: java

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

I have a problem with jni code callbacks.
I have attached some code that shows the problem.
The result of this code is:

# results on fedora 11
#  gcc/gcj 4.4.1
#  kernel 2.6.30.5-43.fc11.x86_64
#  openjdk fedora-29.b16.fc11-x86_64
#
#                       open jdk        gcj
# no_jni                 1.48               7.46        (  5 times slower)
# jni                   66.70           17140.00        (257 times slower)

So when not using jni in this case gcj is 5 times slower.
I suspect the jit compiler does a good for this small sample.

The code with jni calls is however 257 timer slower. I really
did not expect that. I also tried other java vm and they all
have much better performance. So I expect a problem in the
gcj library.

When I use oprofile I see at lot of calls to execute_cfa_program
and _Unwind_IteratePhdrCallback.

[-- Attachment #2: tst.tar --]
[-- Type: application/x-tar, Size: 20480 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-28 20:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-27 13:23 very slow jni code callbacks Herman ten Brugge
2009-09-28 12:03 ` Andrew Haley
2009-09-28 12:10   ` Bryce McKinlay
2009-09-28 12:13     ` Andrew Haley
2009-09-28 19:01     ` Tom Tromey
2009-09-28 19:01   ` Tom Tromey
2009-09-28 19:47     ` Herman ten Brugge
2009-09-28 20:13       ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).