mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5dd01af28f
commit
d94ea30a57
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Oct 7 20:21:39 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/*.c, ext/win32ole/win32ole.h: use RB_INT2FIX instead of
|
||||
|
|
10
gc.c
10
gc.c
|
@ -8593,7 +8593,7 @@ gc_prof_setup_new_record(rb_objspace_t *objspace, int reason)
|
|||
#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, char *buff)
|
|||
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 (*append)(VALUE, VALUE))
|
|||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue