« Return to Thread: [rvm-research] A bug in GenCopyMutator

[rvm-research] A bug in GenCopyMutator

by Dingwen Yuan :: Rate this Message:

Reply to Author | View in Thread

Hello All,

I think I found a bug in GenCopyMutator. The original collectionPhase() in this class is:

public void collectionPhase(short phaseId, boolean primary) {
    if (global().traceFullHeap()) {
      if (phaseId == GenCopy.PREPARE) {
        super.collectionPhase(phaseId, primary);
        if (global().gcFullHeap) mature.rebind(GenCopy.toSpace());
        return;
      }
    }

    super.collectionPhase(phaseId, primary);
  }

I think the line "if (global().gcFullHeap) mature.rebind(GenCopy.toSpace());" should be moved to the phase RELEASE. Because the PREPARE of mutator comes before the PREPARE of GenCopy, at that time the toSpace is not yet toggled, so we will premature into the old space which is wrong.

The original pretenure code made the dacapo benchmarks fail(I've tried antlr, fop, pmd). But they can pass with the modified code.

BTW, I worked with version 2.9.2, and I think the bug also exists in later versions.

cheers,

Dingwen

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

 « Return to Thread: [rvm-research] A bug in GenCopyMutator