Hi all,
we found the problem at last. It seems like I am also instrument the objects in bootImage, which in other words would not be scanned if we don't make our extra header words as reference type. I just bypass the bootImage objects to make it work.
cheers,
Xinwei
Xinwei Xie wrote:
I follow the steps below to implement Goldilocks(PLDI'07) which requires to attach every *fieldInfo* structure that each object header points to, and test the dacapo benchmark. All tests based on BaseBaseMarkSweep and x86_64-linux configuration.
1. add the extra header words. (pass)
2. add the baseline compile my instrumentation and call an empty method. (pass).
3. add enqueuing synch list, RVMThread support(tid, join, lockset). (pass, but I have to increase hsqldb and xalan heap size)
4. add object to the header word, make GC traces (modify Scanning.specializedScanObject) it properly. However, it failed to pass the benchmarks. All the symptom looks like:
Goldilocks assertion failure
infoSetObject address is 0x7002b108
infoSetObject is instance of Lorg/jikesrvm/goldilocks/Cell;
infoSet Object contents: Cell: tid: 3 action: 3 info: 1917482220
Monitored object is instance of java.lang.Class
object space boot
infoSet space non-moving
Goldilocks fatal error
Thread #4
-- Stack --
at [0x70d2cd64, 0x643244bf] Lorg/jikesrvm/VM; sysFail(Ljava/lang/String;)V at line 2278
at [0x70d2cd98, 0x70862658] Lorg/jikesrvm/goldilocks/Goldilocks; handleAction(Ljava/lang/Object;II)V at line 160
at [0x70d2cde0, 0x7086928b] Ldacapo/antlr/AntlrHarness; iterate(Ljava/lang/String;)V at line 70
at [0x70d2ce10, 0x7086bc8c] Ldacapo/Benchmark; run(Ldacapo/Callback;Ljava/lang/String;Z)Z at line 126
at [0x70d2ce5c, 0x70847cad] Ldacapo/TestHarness; runBenchmark(Ljava/io/File;Ljava/lang/String;Ldacapo/TestHarness;)V at line 302
at [0x70d2ce98, 0x70834212] Ldacapo/TestHarness; main([Ljava/lang/String;)V at line 242
at [0x70d2ceb4, 0x642d9ace] LHarness; main([Ljava/lang/String;)V at line 5
at [0x70d2cecc, 0x6426c0d8] <invisible method>
at [0x70d2cf40, 0x6426c544] Lorg/jikesrvm/runtime/Reflection; outOfLineInvoke(Lorg/jikesrvm/classloader/RVMMethod;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 194
at [0x70d2cf78, 0x641b90ae] Lorg/jikesrvm/runtime/Reflection; invoke(Lorg/jikesrvm/classloader/RVMMethod;Lorg/jikesrvm/runtime/ReflectionBase;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 76
at [0x70d2cfb8, 0x642a2000] Lorg/jikesrvm/scheduler/MainThread; run()V at line 201
at [0x70d2cfe0, 0x6432200d] Lorg/jikesrvm/scheduler/RVMThread; run()V at line 2521
at [0x70d2d000, 0x0804f685] Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 2565
The error appears in this statement of handleAction in Goldilocks class.
Object infoSetObject = Magic.getObjectAtOffset(o, GOLDILOCKS_OFFSET_0);
It is quite weird, as if the header word points to an Cell object. I didn't install it.:(
Is there anyone who is familiar with such issue? Thanks for your further reply.
BTW, I don't trace the objects in boot image, as I am using such condition to filter out in BaselineCompilerImpl.java:
if(org.jikesrvm.goldilocks.Goldilocks.fullyBooted && !method.getDeclaringClass().getDescriptor().isNotApplicationDescriptor()){
//insert my instrumentation code
}
Regards,
Xinwei