Skip to content

Commit

Permalink
[sgen] Option to disable lazy sweep in MONO_GC_PARAMS.
Browse files Browse the repository at this point in the history
  • Loading branch information
schani committed Dec 9, 2012
1 parent c27e6ad commit 7f1fe0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions man/mono.1
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,12 @@ less than this percentage, it will do a copying collection for that block
type in the next major collection, thereby restoring occupancy to close
to 100 percent. A value of 0 turns evacuation off.
.TP
\fB(no-)lazy-sweep\fR
Enables or disables lazy sweep for the Mark&Sweep collector. If
enabled, the sweep phase of the garbage collection is done piecemeal
whenever the need arises, typically during nursery collections. Lazy
sweeping is enabled by default.
.TP
\fBstack-mark=\fImark-mode\fR
Specifies how application threads should be scanned. Options are
`precise` and `conservative`. Precise marking allow the collector
Expand Down
7 changes: 7 additions & 0 deletions mono/metadata/sgen-marksweep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,12 @@ major_handle_gc_param (const char *opt)
}
evacuation_threshold = (float)percentage / 100.0;
return TRUE;
} else if (!strcmp (opt, "lazy-sweep")) {
lazy_sweep = TRUE;
return TRUE;
} else if (!strcmp (opt, "no-lazy-sweep")) {
lazy_sweep = FALSE;
return TRUE;
}

return FALSE;
Expand All @@ -1884,6 +1890,7 @@ major_print_gc_param_usage (void)
" major-heap-size=N (where N is an integer, possibly with a k, m or a g suffix)\n"
#endif
" evacuation-threshold=P (where P is a percentage, an integer in 0-100)\n"
" (no-)lazy-sweep\n"
);
}

Expand Down

0 comments on commit 7f1fe0a

Please sign in to comment.