mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
We only need one sweep time measurement without lazy sweep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fdf7b4586f
commit
d03912898e
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Oct 26 13:25:45 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
|
||||
We only need one sweep time measurement without lazy sweep.
|
||||
|
||||
Sat Oct 26 11:59:13 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* addr2line.c: Include ELF header after system headers (especially
|
||||
|
|
10
gc.c
10
gc.c
|
@ -2601,7 +2601,9 @@ gc_heap_lazy_sweep(rb_objspace_t *objspace, rb_heap_t *heap)
|
|||
|
||||
if (page == NULL) return FALSE;
|
||||
|
||||
#if GC_ENABLE_LAZY_SWEEP
|
||||
gc_prof_sweep_timer_start(objspace);
|
||||
#endif
|
||||
|
||||
while (page) {
|
||||
heap->sweep_pages = next = page->next;
|
||||
|
@ -2618,7 +2620,9 @@ gc_heap_lazy_sweep(rb_objspace_t *objspace, rb_heap_t *heap)
|
|||
page = next;
|
||||
}
|
||||
|
||||
#if GC_ENABLE_LAZY_SWEEP
|
||||
gc_prof_sweep_timer_stop(objspace);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -2646,12 +2650,14 @@ static void
|
|||
gc_sweep(rb_objspace_t *objspace, int immediate_sweep)
|
||||
{
|
||||
if (immediate_sweep) {
|
||||
#if !GC_ENABLE_LAZY_SWEEP
|
||||
gc_prof_sweep_timer_start(objspace);
|
||||
#endif
|
||||
gc_before_sweep(objspace);
|
||||
|
||||
gc_heap_rest_sweep(objspace, heap_eden);
|
||||
|
||||
#if !GC_ENABLE_LAZY_SWEEP
|
||||
gc_prof_sweep_timer_stop(objspace);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
gc_before_sweep(objspace);
|
||||
|
|
Loading…
Add table
Reference in a new issue