Skip to content

Commit

Permalink
[dtrace] Probe for nursery fragment creation aka nursery sweep.
Browse files Browse the repository at this point in the history
  • Loading branch information
schani committed Sep 28, 2012
1 parent b6463f1 commit 5d5e182
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/mono.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ provider mono {

probe gc__major__obj__alloc__degraded (void *addr, uintptr_t size, char *class_name);
probe gc__major__obj__alloc__mature (void *addr, uintptr_t size, char *class_name);

probe gc__nursery__sweeped (void *addr, uintptr_t len);
};

#pragma D attributes Evolving/Evolving/Common provider mono provider
Expand Down
1 change: 1 addition & 0 deletions mono/metadata/sgen-nursery-allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ add_nursery_frag (SgenFragmentAllocator *allocator, size_t frag_size, char* frag
{
DEBUG (4, fprintf (gc_debug_file, "Found empty fragment: %p-%p, size: %zd\n", frag_start, frag_end, frag_size));
binary_protocol_empty (frag_start, frag_size);
MONO_GC_NURSERY_SWEEPED (frag_start, frag_end - frag_start);
/* Not worth dealing with smaller fragments: need to tune */
if (frag_size >= SGEN_MAX_NURSERY_WASTE) {
/* memsetting just the first chunk start is bound to provide better cache locality */
Expand Down

0 comments on commit 5d5e182

Please sign in to comment.