Hi Yumin,
I just built hsdis with the new patch and dropped it into JDK7u5, and
it's still missing newlines. Anyway, it not that bad, at least the
disassembly contents are correct.
PrintInterpreter log on JDK7u5 ends with:
Old hsdis:
0x00007f8ae0e058d9: jmpq *(%r10,%rbx,8)
0x00007f8ae0e058dd: data32 xchg %ax,%ax
----------------------------------------------------------------------
New hsdis:
0x00007f26150208d9: jmpq *(%r10,%rbx,8)
0x00007f26150208dd: data32 xchg
%ax,%ax----------------------------------------------------------------------
That's the only place that bothers me (a bit, but not that much).
Besides that I'm okay with this patch.
And I'm fine with the fact that SA couldn't use old hsdis to do disassembly.
Thanks for fixing this!
Kris
On 11/02/2012 02:06 AM, yumin...@oracle.com wrote:
Hi, John and all
Please have a look for new webrev
http://cr.openjdk.java.net/~minqi/8000489
The new code works fine: new vm with new hsdis and old hsdis, old
vm with new hsdis and old hsdis.
(Kris, I tested both with -XX:+PrintInterpreter and
-XX:+PrintAssembly separately, the output is OK, please let me know if
you find new problem with output format)
One problem is that SA could not work with old hsdis, the reason is
when decode an address, old hsdis read byte from the address. In fact,
when SA attached to process or core file, the address is from target
process or core file, not an address in SA process itself. When hsdis
read memory from this address --- it reads from SA process itself,
could not reach out to target space, so the output is wrong. With new
hsdis, we copy the bytes from target and pass into hsdis as a buffer,
and hsdis read byte from this buffer, but the address value itself is
only for print out. With old version hsdis, it will read from SA process.
For VM disassemble output, using old version hsdis has no problem,
since the address hsdis read is from the process itself as expected.
I will file a bug to log this problem but no fix for it since the
interface has no more param for this.
Thanks
Yumin
On 10/29/2012 10:47 AM, John Rose wrote:
On Oct 29, 2012, at 10:35 AM, Yumin Qi wrote:
I haven't considered new JVM work with old hsdis. Will change
disassemble.cpp to check:
Perfect! Thanks, — John