* gc.c: disable GC_PROFILE_MORE_DETAIL (fix last commit).

* gc.c (gc_prof_set_malloc_info): fix "objspace->heap.live_num" to
  "objspace_live_num(objspace)". There is no such member variable.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-05-13 16:52:49 +00:00
Родитель 7d0a90e9b4
Коммит b597df707e
2 изменённых файлов: 9 добавлений и 2 удалений

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

@ -1,3 +1,10 @@
Tue May 14 01:50:41 2013 Koichi Sasada <ko1@atdot.net>
* gc.c: disable GC_PROFILE_MORE_DETAIL (fix last commit).
* gc.c (gc_prof_set_malloc_info): fix "objspace->heap.live_num" to
"objspace_live_num(objspace)". There is no such member variable.
Tue May 14 01:25:55 2013 Koichi Sasada <ko1@atdot.net>
* gc.c: refactoring GC::Profiler.

4
gc.c
Просмотреть файл

@ -96,7 +96,7 @@ static ruby_gc_params_t initial_params = {
#define nomem_error GET_VM()->special_exceptions[ruby_error_nomemory]
#ifndef GC_PROFILE_MORE_DETAIL
#define GC_PROFILE_MORE_DETAIL 1
#define GC_PROFILE_MORE_DETAIL 0
#endif
#ifndef GC_ENABLE_LAZY_SWEEP
#define GC_ENABLE_LAZY_SWEEP 1
@ -4037,7 +4037,7 @@ gc_prof_set_malloc_info(rb_objspace_t *objspace)
static inline void
gc_prof_set_heap_info(rb_objspace_t *objspace, gc_profile_record *record)
{
size_t live = objspace->heap.live_num;
size_t live = objspace_live_num(objspace);
size_t total = heaps_used * HEAP_OBJ_LIMIT;
record->heap_total_objects = total;