summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authortmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-05 04:26:04 +0000
committertmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-05 04:26:04 +0000
commit393b9e65e91036743609e0d5ed899072b0f2d0a8 (patch)
tree0d8d8c358b852e73e3f9dcd9eeefb057c4cd36bc /gc.c
parentfb29aefc7abe3fe1b2c7794035a73f9ba50e8364 (diff)
gc.c: split GC_END event into GC_END_MARK and GC_END_SWEEP
* include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with two new events: GC_END_MARK and GC_END_SWEEP * gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done * gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark * ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests for new events. * test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj): ditto. * NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample, and will be removed before ruby 2.1. * ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook= git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 61812d051e..f677894583 100644
--- a/gc.c
+++ b/gc.c
@@ -2954,7 +2954,7 @@ gc_after_sweep(rb_objspace_t *objspace)
}
#endif
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END, 0 /* TODO: pass minor/immediate flag? */);
+ gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_SWEEP, 0);
}
static int
@@ -4122,7 +4122,7 @@ gc_marks_body(rb_objspace_t *objspace, int full_mark)
gc_mark_roots(objspace, full_mark, 0);
gc_mark_stacked_objects(objspace);
- /* cleanup */
+ gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_MARK, 0);
rgengc_report(1, objspace, "gc_marks_body: end (%s)\n", full_mark ? "full" : "minor");
}