Skip to content

Implementation of Sapphire garbage collector for JikesRVM

License

Notifications You must be signed in to change notification settings

perlfu/sapphire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1424b48 · Jul 27, 2016
Jul 27, 2016
Jun 10, 2013
Jun 11, 2014
Jun 11, 2014
Aug 28, 2013
Apr 23, 2012
Apr 24, 2009
Jun 11, 2014
Jun 11, 2014
Oct 5, 2013
Jul 27, 2016
Feb 12, 2013
Apr 22, 2013
May 24, 2011
Apr 24, 2009
Aug 26, 2011
Feb 12, 2013
Jun 12, 2014
Jun 11, 2014
Aug 24, 2012

Repository files navigation

Sapphire Garbage Collector for Jikes RVM

This repository contains a copy of Jikes RVM patched with an implement of the Sapphire garbage collection algorithm.

This implementation is the result of research and technical work by:

Please contact Carl Ritson or Richard Jones for more information.

Sapphire is an on-the-fly concurrent copying garbage collector. This means it does not need to stop all user threads to perform garbage collection. Thread stacks are scanned individually. This leading to sub-millisecond pause times during garbage collection.

Sapphire was designed by Richard Hudson and Eliot Moss. It is documented in a journal paper here.

This implementation was performed with permission from Intel who hold patents on Sapphire's design.

The official Jikes RVM website and repository can be found here.

Building

Standard Jikes RVM dependencies apply for building with ant (see here).

To build optimised (adjust host.name appropriately):

ant -Dhost.name=x86_64-osx -Dconfig.name=FastAdaptiveOTFSapphire

To build debug (adjust host.name appropriately):

ant -Dhost.name=x86_64-osx -Dconfig.name=ExtremeAssertionsBaseBaseOTFSapphire

RVM will be in the dist directory.

Run-time Options

The following options can be used to changed Sapphire's run-time behaviour.

ConcurrentCopyMethod

Select the method used for copying concurrent with the mutator, e.g.

-X:gc:concurrentCopyMethod=always-htm2
value description
cas / cas2 default per-word synchronised methods
unsafe / unsafe2 unsynchronised methods
stm / mstm / stmseq / stmseq2 / stmseq2p / stmseq2n software transactional
htm / htm2 / mhtm hardware transactional

All of these options can be prefixed with "always-" to force the method to be used for all collections. Normally stop-the-world collection will default to unsafe2. Methods postfixed with 2 use a more efficient copying order than the same method without the postfix.

ConcurrentCopyTransactionSize

Select the size of transactions for mhtm and mstm concurrent copying methods, e.g.

-X:gc:concurrentCopyTransactionSize=256

ConcurrentTriggerMethod

Select the method used to trigger concurrent collection, i.e. when collection will be started. Interacts with ConcurrentTrigger.

-X:gc:concurrentTriggerMethod=allocation
value description
allocation pages allocated since last collection start
OOGCAllocation pages allocated since last collection end
percentage percentage of the heap allocated
period microseconds since last collection start
time microseconds since last collection end

ConcurrentTrigger

Value used with ConcurrentTriggerMethod may represent pages, time or a percentage.

SapphireSTWPhase

Force one or more Sapphire phases to run stop-the-world, e.g.

-X:gc:SapphireSTWPhase=flip

One or more of the following separated by commas:

  • alloc
  • copy
  • flip
  • root

About

Implementation of Sapphire garbage collector for JikesRVM

Resources

License

Stars

Watchers

Forks

Packages

No packages published