Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


The MMTk harness is a debugging tool. It allows you to run MMTk with a simple client, explicitly allocating objects and creating and deleting references. This allows MMTk to be run and debugged stand-alone, without the entire VM, greatly simplifying initial debugging and reducing the edit-debug turnaround time.

The MMTk test harness allows you to run MMTk as a user-level application, step through it in a debugger and do any of the other standard Java debugging procedures that being the memory manager of JikesRVM prevents you from doing.  The test harness incorporates a simple interpreted scripting language with just enough features to build interesting data structures, perform GCs and assert properties of them.

The test harness is a recent development.  Please don't expect it to be 100% bug-free just yet.

Running the test harness

The harness can be run standalone or via Eclipse (or other IDE).


There is a collection of sample scripts in the MMTk/harness/test-scripts directory.

In eclipse

Define a new run configuration with main class org.mmtk.harness.Main

Test harness options

Options are passed to the test harness as 'keyword=value' pairs.  The standard MMTk options that are available through JikesRVM are accepted (leave off the "-X:gc:"), as well as the following harness-specific options:




The MMTk plan class.  Defaults to org.mmtk.plan.marksweep.MS


The number of concurrent collector threads (default: 1)


Initial heap size in pages (default: 64)


Maximum heap size in pages (default: 64)


Debugging messages from the MMTk Harness.  Trace options include

  • CALL - trace procedure calls
  • ALLOC - trace object allocation
  • OBJECT - trace object mutation events


Force frequent GCs.  Options are

  • ALLOC - GC after every object allocation 
  • SAFEPOINT - GC at every GC safepoint

  • No labels