1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (gc_profile_record): don't define unused variables when

GC_PROFILE_MORE_DETAIL is 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nari 2012-10-31 09:22:37 +00:00
parent 9fd08911c0
commit 25a973e84b
2 changed files with 16 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Wed Oct 31 18:17:38 2012 Narihiro Nakamura <authornari@gmail.com>
* gc.c (gc_profile_record): don't define unused variables when
GC_PROFILE_MORE_DETAIL is 0.
Wed Oct 31 18:10:53 2012 Narihiro Nakamura <authornari@gmail.com>
* gc.c (gc_prof_mark_timer_stop): count is not initialized.

17
gc.c
View file

@ -118,22 +118,27 @@ static ruby_gc_params_t initial_params = {
typedef struct gc_profile_record {
double gc_time;
double gc_mark_time;
double gc_sweep_time;
double gc_invoke_time;
size_t heap_use_slots;
size_t heap_live_objects;
size_t heap_free_objects;
size_t heap_total_objects;
size_t heap_use_size;
size_t heap_total_size;
int have_finalize;
int is_marked;
#if GC_PROFILE_MORE_DETAIL
double gc_mark_time;
double gc_sweep_time;
size_t heap_use_slots;
size_t heap_live_objects;
size_t heap_free_objects;
int have_finalize;
size_t allocate_increase;
size_t allocate_limit;
#endif
} gc_profile_record;