* 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
Родитель 9fd08911c0
Коммит 25a973e84b
2 изменённых файлов: 16 добавлений и 6 удалений

Просмотреть файл

@ -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
Просмотреть файл

@ -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;