memprof 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/memprof.c +8 -3
- data/ext/util.h +0 -1
- data/memprof.gemspec +1 -1
- metadata +2 -2
data/ext/memprof.c
CHANGED
@@ -35,8 +35,15 @@ static st_table *objs = NULL;
|
|
35
35
|
/*
|
36
36
|
* stuff needed for heap dumping
|
37
37
|
*/
|
38
|
+
static double
|
39
|
+
rb_timeofday()
|
40
|
+
{
|
41
|
+
struct timeval tv;
|
42
|
+
gettimeofday(&tv, NULL);
|
43
|
+
return (double)tv.tv_sec + (double)tv.tv_usec * 1e-6;
|
44
|
+
}
|
45
|
+
|
38
46
|
static VALUE (*rb_classname)(VALUE);
|
39
|
-
static double (*rb_timeofday)();
|
40
47
|
static RUBY_DATA_FUNC *rb_bm_mark;
|
41
48
|
static RUBY_DATA_FUNC *rb_blk_free;
|
42
49
|
static RUBY_DATA_FUNC *rb_thread_mark;
|
@@ -1619,7 +1626,6 @@ init_memprof_config_extended() {
|
|
1619
1626
|
}
|
1620
1627
|
|
1621
1628
|
memprof_config.classname = bin_find_symbol("classname", NULL, 0);
|
1622
|
-
memprof_config.timeofday = bin_find_symbol("timeofday", NULL, 0);
|
1623
1629
|
memprof_config.bm_mark = bin_find_symbol("bm_mark", NULL, 0);
|
1624
1630
|
memprof_config.blk_free = bin_find_symbol("blk_free", NULL, 0);
|
1625
1631
|
memprof_config.thread_mark = bin_find_symbol("thread_mark", NULL, 0);
|
@@ -1833,7 +1839,6 @@ Init_memprof()
|
|
1833
1839
|
|
1834
1840
|
rb_classname = memprof_config.classname;
|
1835
1841
|
rb_add_freelist = memprof_config.add_freelist;
|
1836
|
-
rb_timeofday = memprof_config.timeofday;
|
1837
1842
|
rb_bm_mark = memprof_config.bm_mark;
|
1838
1843
|
rb_blk_free = memprof_config.blk_free;
|
1839
1844
|
rb_thread_mark = memprof_config.thread_mark;
|
data/ext/util.h
CHANGED
data/memprof.gemspec
CHANGED