gc_tracer 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/gc_tracer/gc_logging.c +12 -4
- data/lib/gc_tracer/version.rb +1 -1
- data/lib/gc_tracer.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 477d54ed3c9678407cf4cdb090080222048716f6
|
4
|
+
data.tar.gz: 1c45e0a9ae7ff7f95c5d670835d784c5bef79328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff98def642484926e33a0116e12a1bec60cb06daccafd798505ac14f17918662c3ffa0f19d6d87fc28e8974b4077b7482d04969e0bbcbd5c54da4ffa14a67cf3
|
7
|
+
data.tar.gz: f9108f5902479a5d559ed40b16b074036b29f6b65abcc62816046060978aec449307bc424d611637ed1e7ebb1058c5706e09d93e54ac74819b5920f082df8f4f
|
data/README.md
CHANGED
@@ -96,7 +96,7 @@ setting is "gc_stat: true, gc_latest_gc_info: true, rusage: false".
|
|
96
96
|
|
97
97
|
You can specify tick (time stamp) type with keyword parameter
|
98
98
|
"tick_type". You can choose one of the tick type in :hw_counter, :time
|
99
|
-
and :nano_time.
|
99
|
+
and :nano_time (if platform supports clock_gettime()).
|
100
100
|
|
101
101
|
See lib/gc_tracer.rb for more details.
|
102
102
|
|
data/ext/gc_tracer/gc_logging.c
CHANGED
@@ -179,6 +179,7 @@ out_time_time(FILE *out)
|
|
179
179
|
}
|
180
180
|
}
|
181
181
|
|
182
|
+
#ifdef HAVE_CLOCK_GETTIME
|
182
183
|
static void
|
183
184
|
out_time_nano_time(FILE *out)
|
184
185
|
{
|
@@ -192,6 +193,7 @@ out_time_nano_time(FILE *out)
|
|
192
193
|
fprintf(out, "%lu\t", (unsigned long)ts.tv_nsec);
|
193
194
|
}
|
194
195
|
}
|
196
|
+
#endif
|
195
197
|
|
196
198
|
static void
|
197
199
|
out_obj(FILE *out, VALUE obj)
|
@@ -456,18 +458,24 @@ gc_tracer_setup_logging_tick_type(VALUE self, VALUE sym)
|
|
456
458
|
static const char *names[] = {
|
457
459
|
"none",
|
458
460
|
"hw_counter",
|
459
|
-
"time"
|
461
|
+
"time"
|
462
|
+
#ifdef HAVE_CLOCK_GETTIME
|
463
|
+
,
|
460
464
|
"nano_time"
|
465
|
+
#endif
|
461
466
|
};
|
462
467
|
static const out_time_func_t funcs[] = {
|
463
468
|
out_time_none,
|
464
469
|
out_time_hw_counter,
|
465
|
-
out_time_time
|
470
|
+
out_time_time
|
471
|
+
#ifdef HAVE_CLOCK_GETTIME
|
472
|
+
,
|
466
473
|
out_time_nano_time
|
474
|
+
#endif
|
467
475
|
};
|
468
476
|
int i;
|
469
477
|
|
470
|
-
for (i=0; i<
|
478
|
+
for (i=0; i<(int)(sizeof(funcs)/sizeof(out_time_func_t)); i++) {
|
471
479
|
if (sym == ID2SYM(rb_intern(names[i]))) {
|
472
480
|
logging->config.out_time_func = funcs[i];
|
473
481
|
return self;
|
@@ -582,5 +590,5 @@ Init_gc_tracer_logging(VALUE mod)
|
|
582
590
|
gc_tracer_setup_logging_gc_stat(Qnil, Qtrue);
|
583
591
|
gc_tracer_setup_logging_gc_latest_gc_info(Qnil, Qtrue);
|
584
592
|
gc_tracer_setup_logging_rusage(Qnil, Qfalse);
|
585
|
-
trace_logging.config.out_time_func =
|
593
|
+
trace_logging.config.out_time_func = out_time_time;
|
586
594
|
}
|
data/lib/gc_tracer/version.rb
CHANGED
data/lib/gc_tracer.rb
CHANGED