summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-23 20:40:19 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-23 20:40:19 +0000
commit62c2b2e80a03c6f4e5a304bcf113e6f3a9d6cbee (patch)
tree4ca97274e59370b2b8e980da0436e7e7f0ba96d6 /gc.c
parent4180eb5d8398446b4409e1daf59291dfd2155b32 (diff)
* gc.c (gc_mark_roots): fox to work PRINT_ROOT_TICKS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index 6b8cd7e0e9..f91d1e3c7a 100644
--- a/gc.c
+++ b/gc.c
@@ -154,7 +154,7 @@ rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val)
#define PRINT_ROOT_TICKS 0
#endif
-#define USE_TICK_T (PRINT_ENTER_EXIT_TICK || PRINT_MEASURE_LINE)
+#define USE_TICK_T (PRINT_ENTER_EXIT_TICK || PRINT_MEASURE_LINE || PRINT_ROOT_TICKS)
#define TICK_TYPE 1
typedef struct {
@@ -4471,11 +4471,6 @@ gc_mark_roots(rb_objspace_t *objspace, const char **categoryp)
{
struct gc_list *list;
rb_thread_t *th = GET_THREAD();
- if (categoryp) *categoryp = "xxx";
-
-#if USE_RGENGC
- objspace->rgengc.parent_object = Qfalse;
-#endif
#if PRINT_ROOT_TICKS
tick_t start_tick = tick();
@@ -4487,6 +4482,12 @@ gc_mark_roots(rb_objspace_t *objspace, const char **categoryp)
}
#endif
+ if (categoryp) *categoryp = "xxx";
+
+#if USE_RGENGC
+ objspace->rgengc.parent_object = Qfalse;
+#endif
+
#if PRINT_ROOT_TICKS
#define MARK_CHECKPOINT_PRINT_TICK(category) do { \
if (prev_category) { \