heap_dump 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -1
- data/ext/heap_dump/heap_dump.c +47 -2
- data/lib/heap_dump/version.rb +1 -1
- metadata +7 -7
data/Rakefile
CHANGED
@@ -12,6 +12,7 @@ task :test => :compile do
|
|
12
12
|
|
13
13
|
def some_meth
|
14
14
|
fiber_var = :some_fiber_var2
|
15
|
+
e = [1,2,3].each # makes enumerator, which references fiber
|
15
16
|
Fiber.yield
|
16
17
|
aaa
|
17
18
|
end
|
@@ -19,7 +20,7 @@ task :test => :compile do
|
|
19
20
|
Fiber.new{
|
20
21
|
fiber_var = :some_fiber_var
|
21
22
|
some_meth
|
22
|
-
Fiber.yield
|
23
|
+
Fiber.yield e
|
23
24
|
fiber_var = :some_fiber_var3
|
24
25
|
}.resume
|
25
26
|
puts "Dumping..."
|
data/ext/heap_dump/heap_dump.c
CHANGED
@@ -725,8 +725,8 @@ static void dump_data_if_known(VALUE obj, walk_ctx_t *ctx){
|
|
725
725
|
int i = 0;
|
726
726
|
yg_cstring("env");
|
727
727
|
yajl_gen_array_open(ctx->yajl);
|
728
|
-
for(; i < env->env_size; i++)
|
729
|
-
|
728
|
+
//for(; i < env->env_size; i++) yg_id(env->env[i]);
|
729
|
+
dump_locations(env->env, env->env_size, ctx);
|
730
730
|
yajl_gen_array_close(ctx->yajl);
|
731
731
|
|
732
732
|
ygh_int("local_size", env->local_size);
|
@@ -739,6 +739,51 @@ static void dump_data_if_known(VALUE obj, walk_ctx_t *ctx){
|
|
739
739
|
return;
|
740
740
|
}
|
741
741
|
|
742
|
+
//FIXME: autogen this:
|
743
|
+
struct enumerator {
|
744
|
+
VALUE obj;
|
745
|
+
ID meth;
|
746
|
+
VALUE args;
|
747
|
+
VALUE fib;
|
748
|
+
VALUE dst;
|
749
|
+
VALUE lookahead;
|
750
|
+
VALUE feedvalue;
|
751
|
+
VALUE stop_exc;
|
752
|
+
};
|
753
|
+
|
754
|
+
struct generator {
|
755
|
+
VALUE proc;
|
756
|
+
};
|
757
|
+
|
758
|
+
struct yielder {
|
759
|
+
VALUE proc;
|
760
|
+
};
|
761
|
+
// end of fixme
|
762
|
+
|
763
|
+
if(!strcmp("enumerator", typename)){
|
764
|
+
struct enumerator *ptr = RTYPEDDATA_DATA(obj);
|
765
|
+
ygh_id("obj", ptr->obj);
|
766
|
+
ygh_id("args", ptr->args);
|
767
|
+
ygh_id("fib", ptr->fib);
|
768
|
+
ygh_id("dst", ptr->dst);
|
769
|
+
ygh_id("lookahead", ptr->lookahead);
|
770
|
+
ygh_id("feedvalue", ptr->feedvalue);
|
771
|
+
ygh_id("stop_exc", ptr->stop_exc);
|
772
|
+
return;
|
773
|
+
}
|
774
|
+
|
775
|
+
if(!strcmp("generator", typename)){
|
776
|
+
struct generator *ptr = RTYPEDDATA_DATA(obj);
|
777
|
+
ygh_id("proc", ptr->proc);
|
778
|
+
return;
|
779
|
+
}
|
780
|
+
|
781
|
+
if(!strcmp("yielder", typename)){
|
782
|
+
struct yielder *ptr = RTYPEDDATA_DATA(obj);
|
783
|
+
ygh_id("proc", ptr->proc);
|
784
|
+
return;
|
785
|
+
}
|
786
|
+
|
742
787
|
if(!strcmp("VM", typename)){
|
743
788
|
const rb_vm_t *vm = RTYPEDDATA_DATA(obj);
|
744
789
|
|
data/lib/heap_dump/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heap_dump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-12 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-internal
|
16
|
-
requirement: &
|
16
|
+
requirement: &70275430454300 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.8.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70275430454300
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: yajl-ruby
|
27
|
-
requirement: &
|
27
|
+
requirement: &70275430452160 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.1'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70275430452160
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake-compiler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70275430451100 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70275430451100
|
47
47
|
description: dump ruby 1.9 heap contents
|
48
48
|
email:
|
49
49
|
- vasilyfedoseyev@gmail.com
|