[PTLsim-devel] Problems with Java

Matt T. Yourst
Fri Jul 20 14:52:44 EDT 2007


On Friday 20 July 2007 10:30, Bashar M. Gharaibeh wrote:
> Hi all,
>
> First of all, thanks to the team of PTLsim for this simulator.
>
> I'm trying to run Java virtual machine within PTLsim/Xen. Until now, I
> have tried Sun JDK and JikesRVM. However, both of them fails when
> simulated using any core (i.e. smt, ooo or seq), while they run without
> problems if executed natively. Sun JDK fails with a SEGFAULT, while Jikes
> exits with an illegal instruction message.
>
> I'll try to provide more details about this problem. Anyway, did anyone
> successfully simulated Java applications?
>

What version of PTLsim are you using? You can use "svn rev" or just run ptlsim 
and it will print this out as "Revision XXX". We recently added microcode for 
some SSE3 and other instructions, which is what it might be trying to use.

For the segfault and invalid opcode, make sure you try this first in 
sequential mode, using "-core seq", to isolate the problem. If there's a bug 
in our microcode, this will help isolate it.

Make sure PTLsim is generating a log file with the
"-logfile ptlsim.log -loglevel 4" options. For the illegal instruction, there 
wlll a message like this:

  translate: invalid opcode at iteration X: 0x123 commits 1234 (at ripstart    
    0xXXX, rip 0xXXX); may be speculative
  [vcpu 0] Exception ... (x86 invalid opcode) at rip [0xXXXXXX]: ...

If you search for this in the log file, you'll see where the problem 
originates. The opcode 0x123 is the instruction it doesn't support. You can 
also use objdump on the Java binary (or shared library, if the rip is in that 
range) to see the code in question.

- Matt Yourst

-------------------------------------------------------
 Matt T. Yourst                    yourst at peptidal.com
 Peptidal Research Inc., Co-Founder and Lead Architect
-------------------------------------------------------


More information about the PTLsim-devel mailing list