Home > Language > The MMTk Test Harness

The MMTk Test Harness

at:2008-06-30 13:13:50   Click: 34

Page added by Robin Garner

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).

Standalone

ant mmtk-harness
java -jar target/mmtk/mmtk-harness <script-file> [options...]

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

In eclipse

ant mmtk-harness-eclipse-project

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:



Option


Meaning


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


collectors The number of concurrent collector threads (default: 1)


initHeap Initial heap size in pages (default: 64)


maxHeap Maximum heap size in pages (default: 64)


trace Debugging messages from the MMTk Harness. Trace options include
  • CALL - trace procedure calls
  • ALLOC - trace object allocation
  • OBJECT - trace object mutation events


gcEvery Force frequent GCs. Options are
  • ALLOC - GC after every object allocation
  • SAFEPOINT - GC at every GC safepoint


View Online

0 Vote


Comment
Name: Home: