ruby-changes:44300
From: nobu <ko1@a...>
Date: Fri, 7 Oct 2016 20:21:47 +0900 (JST)
Subject: [ruby-changes:44300] nobu:r56373 (trunk): gc.c: fix GC_PROFILE_DETAIL_MEMORY
nobu 2016-10-07 20:21:41 +0900 (Fri, 07 Oct 2016) New Revision: 56373 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56373 Log: gc.c: fix GC_PROFILE_DETAIL_MEMORY * gc.c (gc_prof_setup_new_record): fix the condition to get rusage. * gc.c (gc_profile_dump_major_reason): remove undefined flags. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 56372) +++ ChangeLog (revision 56373) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Oct 7 20:21:39 2016 Nobuyoshi Nakada <nobu@r...> + + * gc.c (gc_prof_setup_new_record): fix the condition to get + rusage. + + * gc.c (gc_profile_dump_major_reason): remove undefined flags. + Fri Oct 7 19:18:33 2016 Masaki Suketa <masaki.suketa@n...> * ext/win32ole/*.c, ext/win32ole/win32ole.h: use RB_INT2FIX instead of Index: gc.c =================================================================== --- gc.c (revision 56372) +++ gc.c (revision 56373) @@ -8593,7 +8593,7 @@ gc_prof_setup_new_record(rb_objspace_t * https://github.com/ruby/ruby/blob/trunk/gc.c#L8593 #if MALLOC_ALLOCATED_SIZE record->allocated_size = malloc_allocated_size; #endif -#if GC_PROFILE_DETAIL_MEMORY +#if GC_PROFILE_MORE_DETAIL && GC_PROFILE_DETAIL_MEMORY #ifdef RUSAGE_SELF { struct rusage usage; @@ -8886,8 +8886,6 @@ gc_profile_dump_major_reason(int flags, https://github.com/ruby/ruby/blob/trunk/gc.c#L8886 C(NOFREE, N); C(OLDGEN, O); C(SHADY, S); - C(RESCAN, R); - C(STRESS, T); #if RGENGC_ESTIMATE_OLDMALLOC C(OLDMALLOC, M); #endif @@ -9006,9 +9004,9 @@ gc_profile_dump_on(VALUE out, VALUE (*ap https://github.com/ruby/ruby/blob/trunk/gc.c#L9004 static VALUE gc_profile_result(void) { - VALUE str = rb_str_buf_new(0); - gc_profile_dump_on(str, rb_str_buf_append); - return str; + VALUE str = rb_str_buf_new(0); + gc_profile_dump_on(str, rb_str_buf_append); + return str; } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/