From: Richard J. <R.E...@ke...> - 2004-03-30 17:10:28
|
We have made some changes to the jikes compliers and runtime in order to track the identities of methods performing allocation. Unfortunately, we have been getting some fairly non-deterministic errors. Surprisingly, these only arose with _213_javac (consistently) and mtrt (sometimes ran ok, somethings failed); other jvm98 benchmarks seemed to run ok. We *believe* that the cause lies with tracing from roots - semiSpace.Plan.traceObject reports an address in an UNUSED_SPACE; we altered semiSpace.Plan.traceObject to tell us whether we were tracing from roots or not. We suspect that this is because we don't understand the GC maps sufficiently. We'd be grateful for any pointers, or indeed any suggestions on how best to hunt this bug other than insert sysWrite calls (which change the error reported!). We are building and running on x86/linux. Here's a typical error message: Caching Off Speed = 100 ======= _213_javac Starting ======= Run 0 start. Total memory=157286400 free memory=147648512 Javac benchmark starting... Plan.traceObject spaceFailure from root Plan.traceObject(): obj 0x9278febc or addr 0x9278fea8 of page 599951 is in unknown space 127 Type = Ljava/lang/String; : unknown space -- Stack -- Lcom/ibm/JikesRVM/VM; sysFail(Ljava/lang/String;)V at line 959 Lcom/ibm/JikesRVM/memoryManagers/vmInterface/VM_Interface; sysFail(Ljava/lang/String;)V at line 1083 Lcom/ibm/JikesRVM/memoryManagers/JMTk/BasePlan; spaceFailure(Lcom/ibm/JikesRVM/VM_Address;BLjava/lang/String;)V at line 877 Lcom/ibm/JikesRVM/memoryManagers/JMTk/Plan; traceObject(Lcom/ibm/JikesRVM/VM_ Address;Z)Lcom/ibm/JikesRVM/VM_Address; at line 617 Lcom/ibm/JikesRVM/memoryManagers/JMTk/BasePlan; traceObjectLocation(Lcom/ibm/JikesRVM/VM_Address;Z)V at line 291 Lcom/ibm/JikesRVM/memoryManagers/JMTk/StopTheWorldGC; processAllWork()V at line 411 Lcom/ibm/JikesRVM/memoryManagers/JMTk/StopTheWorldGC; collect()V at line 193 Lcom/ibm/JikesRVM/memoryManagers/vmInterface/VM_CollectorThread; run()V at line 334 Lcom/ibm/JikesRVM/VM_Thread; startoff()V at line 779 JikesRVM: exit 124 Here's a list of files we've modified and a brief indication of the changes made. One key change is that we push an extra integer in the code to allocate an object in rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java, and ditto in the Call.mutateX calls in compilers/optimizing/ir/conversions/hir2lir/O PT_ExpandRuntimeServices.java. rvm/src/tools/bootImageRunner/sys.C - Added C code to output the actual trace. rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java - Added extra "aid" argument to: emit_resolved_new emit_unresolved_new emit_resolved_newarray emit_unresolved_newarray emit_multianewarray - Modified genMagic to pass a hardcoded aid to emit_resolved_newarray rvm/src/vm/arch/intel/compilers/baseline/VM_MultianewarrayHelper.java - Added extra "aid" argument to newArrayArray and pass it though to VM_Runtime.buildMultiDimensionalArray rvm/src/vm/VM_Configuration.java - Added a boolean MemTrace flag rvm/src/vm/classLoader/VM_Array.java - Modified slowArrayCopy to pass an aid to VM_Runtime.resolvedNewArray rvm/src/vm/compilers/baseline/VM_BaselineCompiler.java - Modified genCode case statement that handles JBC_new to pass an "aid" to emit_resolved_new and emit_unresolved_new - Modified genCode case statement that handles JBC_newarray to pass an "aid" to emit_resolved_newarray - Modified genCode case statement that handles JBC_anewarray to pass an "aid" to emit_resolved_newarray and emit_unresolved_newarray - Modified genCode case statement that handles JBC_multianewarray to pass an "aid" to emit_multianewarray - Added "aid" argument to the abstract methods: emit_resolved_new emit_unresolved_new emit_resolved_newarray emit_unresolved_newarray emit_multianewarray rvm/src/vm/compilers/optimizing/ir/conversions/hir2lir/OPT_ExpandRuntimeServices .java - Modified "perform" : NEW_opcode to pass "aid" to VM_Entrypoints.resolvedNewScalarMethod NEW_UNRESOLVED_opcode to pass "aid" to VM_Entrypoints.unresolvedNewScalarMe thod NEWARRAY_opcode to pass "aid" to VM_Entrypoints.resolvedNewArrayMethod NEWARRAY_UNRESOLVED_opcode to pass "aid" to VM_Entrypoints.unresolvedNewArr ayMethod NEWOBJMULTIARRAY_opcode to pass "aid" to VM_Entrypoints.optNewArrayArrayMet hod rvm/src/vm/compilers/optimizing/ir/instruction/InstructionFormatList.dat - Changed "Call" to generate code for upto 8 parameters instead of 7 rvm/src/vm/compilers/optimizing/vmInterface/services/VM_OptLinker.java - Added "aid" argument to newArrayArray, passes it to VM_Runtime.buildMultiDimensionalArray rvm/src/vm/jni/VM_JNIFunctions.java - Modified AllocObject method to pass an "aid" to VM_Runtime.resolvedNewScalar - Modified NewObjectArray method to pass an "aid" to VM_Runtime.resolvedNewArray rvm/src/vm/libSupport/java/lang/Class.java - Modified newInstance to pass "aid" to VM_Runtime.resolvedNewScalar rvm/src/vm/libSupport/java/lang/reflect/Constructor.java - Modified newInstance to pass "aid" to VM_Runtime.resolvedNewScalar rvm/src/vm/memoryManagers/JMTk/gcspy/drivers/SemiSpaceTraceDriver.java - Modifed "boot" to call VM_SysCall.memTraceBoot - Added "emitAlloc" method - Added "emitDeath" method rvm/src/vm/memoryManagers/JMTk/plan/BasePlan.java - Added a MEM_TRACE flag rvm/src/vm/memoryManagers/JMTk/utility/AllocAdvice.java - All new rvm/src/vm/memoryManagers/JMTk/utility/CallSite.java - All new rvm/src/vm/memoryManagers/JMTk/vmInterface/MM_Interface.java - Added "aid" argument to allocateScalar, passed to VM_ObjectModel.initializeScalar - Added "aid" argument to allocateArray, passed to VM_ObjectModel.initializeArray - Modified cloneArray to pass an "aid" to allocateArray - Modified newStack to pass an "aid" to VM_ObjectModel.initializeArray - Modified newTIB to pass an "aid" to allocateArray rvm/src/vm/memoryManagers/JMTk/vmInterface/VM_Interface.java - Added a "MemTrace" flag. rvm/src/vm/objectModel/VM_MiscHeader.java - Added extra fields - Added an "aid" argument to initializeHeader, and the code to set the new fields of the header. Ditto for the boot image version of initializeHeader rvm/src/vm/objectModel/VM_ObjectModel.java - Added an "aid" argument to initializeScalar, passed on to VM_MiscHeader.initializeHeader - Modified allocateScalar to pass an "aid" to VM_MiscHeader.initializeHeader - Added an "aid" argument to initializeArray, passed on to VM_MiscHeader.initializeHeader - Modified allocateArray to pass an "aid" to VM_MiscHeader.initializeHeader rvm/src/vm/runtime/VM_BootRecord.java - Added hooks to C functions for output traces: memTraceBootIP memTraceBirthIP memTraceDeathIP memTraceTraceCommentIP memTraceMapIP memTraceMapCommentIP rvm/src/vm/runtime/VM_Entrypoints.java - Added extra "aid" arguments to signatures of entrypoints: resolvedNewScalarMethod unresolvedNewScalarMethod unresolvedNewArrayMethod resolvedNewArrayMethod newArrayArrayMethod optNewArrayArrayMethod rvm/src/vm/runtime/VM_Runtime.java - Added "aid" argument to unresolvedNewScalar, passed to resolvedNewScalar - Added "aid" argument to resolvedNewScalar, passed to resolvedNewScalar - Added "aid" argument to resolvedNewScalar, passed to MM_Interface.allocateScalar - Added "aid" argument to unresolvedNewArray, passed to resolvedNewArray - Added "aid" argument to resolvedNewArray, passed to resolvedNewArray - Added "aid" argument to resolvedNewArray, passed to MM_Interface.allocateArray - Modified clone to pass an "aid" to resolvedNewArray and resolvedNewScalar - Added "aid" argument to buildMultiDimensionalArray, passed to buildMDAHelper - Added "aid" argument to buildMDAHelper, passed to buildMDAHelper rvm/src/vm/runtime/VM_SysCall.java - Added static method stubs for memTraceBoot memTraceBirth memTraceDeath memTraceTraceComment memTraceMap memTraceMapComment rvm/src/tools/bootImageWriter/BootImageWriterConstants.java - Increased IMAGE_SIZE from 60 * 1024 * 1024 to 100 * 1024 * 1024 Richard Jones Chris Ryder |