ruby-changes:28826
From: ko1 <ko1@a...>
Date: Tue, 21 May 2013 17:22:09 +0900 (JST)
Subject: [ruby-changes:28826] ko1:r40878 (trunk): * gc.c: remove gc_profile_record::is_marked. always true.
ko1 2013-05-21 17:21:59 +0900 (Tue, 21 May 2013) New Revision: 40878 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40878 Log: * gc.c: remove gc_profile_record::is_marked. always true. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40877) +++ ChangeLog (revision 40878) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue May 21 17:21:12 2013 Koichi Sasada <ko1@a...> + + * gc.c: remove gc_profile_record::is_marked. always true. + Tue May 21 17:13:40 2013 Koichi Sasada <ko1@a...> * gc.c: fix to collect additional information for GC::Profiler. Index: gc.c =================================================================== --- gc.c (revision 40877) +++ gc.c (revision 40878) @@ -170,8 +170,6 @@ typedef struct gc_profile_record { https://github.com/ruby/ruby/blob/trunk/gc.c#L170 size_t heap_use_size; size_t heap_total_size; - int is_marked; - #if GC_PROFILE_MORE_DETAIL double gc_mark_time; double gc_sweep_time; @@ -460,7 +458,7 @@ static void gc_mark_stacked_objects(rb_o https://github.com/ruby/ruby/blob/trunk/gc.c#L458 static double getrusage_time(void); static inline void gc_prof_timer_start(rb_objspace_t *, int reason); -static inline void gc_prof_timer_stop(rb_objspace_t *, int); +static inline void gc_prof_timer_stop(rb_objspace_t *); static inline void gc_prof_mark_timer_start(rb_objspace_t *); static inline void gc_prof_mark_timer_stop(rb_objspace_t *); static inline void gc_prof_sweep_slot_timer_start(rb_objspace_t *); @@ -2362,7 +2360,7 @@ gc_prepare_free_objects(rb_objspace_t *o https://github.com/ruby/ruby/blob/trunk/gc.c#L2360 } } } - gc_prof_timer_stop(objspace, Qtrue); + gc_prof_timer_stop(objspace); return res; } @@ -3710,7 +3708,7 @@ garbage_collect(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L3708 gc_marks(objspace, FALSE); gc_sweep(objspace); } - gc_prof_timer_stop(objspace, Qtrue); + gc_prof_timer_stop(objspace); if (GC_NOTIFY) printf("end garbage_collect()\n"); return TRUE; @@ -4690,7 +4688,7 @@ gc_prof_timer_start(rb_objspace_t *objsp https://github.com/ruby/ruby/blob/trunk/gc.c#L4688 } static inline void -gc_prof_timer_stop(rb_objspace_t *objspace, int marked) +gc_prof_timer_stop(rb_objspace_t *objspace) { if (objspace->profile.run) { double gc_time = 0; @@ -4700,7 +4698,6 @@ gc_prof_timer_stop(rb_objspace_t *objspa https://github.com/ruby/ruby/blob/trunk/gc.c#L4698 if (gc_time < 0) gc_time = 0; record->gc_time = gc_time; - record->is_marked = !!(marked); gc_prof_set_heap_info(objspace, record); } } @@ -4948,7 +4945,7 @@ gc_profile_record_get(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L4945 rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_USE_SIZE")), SIZET2NUM(objspace->profile.record[i].heap_use_size)); rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_SIZE")), SIZET2NUM(objspace->profile.record[i].heap_total_size)); rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_OBJECTS")), SIZET2NUM(objspace->profile.record[i].heap_total_objects)); - rb_hash_aset(prof, ID2SYM(rb_intern("GC_IS_MARKED")), objspace->profile.record[i].is_marked); + rb_hash_aset(prof, ID2SYM(rb_intern("GC_IS_MARKED")), Qtrue); #if GC_PROFILE_MORE_DETAIL rb_hash_aset(prof, ID2SYM(rb_intern("GC_MARK_TIME")), DBL2NUM(objspace->profile.record[i].gc_mark_time)); rb_hash_aset(prof, ID2SYM(rb_intern("GC_SWEEP_TIME")), DBL2NUM(objspace->profile.record[i].gc_sweep_time)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/