heap_dump 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -866,6 +866,19 @@ static void dump_data_if_known(VALUE obj, walk_ctx_t *ctx){
866
866
  return;
867
867
  }
868
868
 
869
+ if(!strcmp("time", typename)){
870
+ // struct time_object *tobj = RTYPEDDATA_DATA(obj);
871
+ // if (!tobj) return;
872
+ // if (!FIXWV_P(tobj->timew))
873
+ // rb_gc_mark(w2v(tobj->timew));
874
+ // rb_gc_mark(tobj->vtm.year);
875
+ // rb_gc_mark(tobj->vtm.subsecx);
876
+ // rb_gc_mark(tobj->vtm.utc_offset);
877
+ VALUE flt = rb_funcall(obj, rb_intern("to_f"), 0);
878
+ if(BUILTIN_TYPE(flt) == T_FLOAT){ ygh_double("val", RFLOAT_VALUE(flt)); }
879
+ return;
880
+ }
881
+
869
882
  //FIXME: autogen this from ruby (this copied from 1.9.2p290)
870
883
  struct thgroup {
871
884
  int enclosed;
@@ -1717,6 +1730,20 @@ static int dump_iv_entry1(ID key, rb_const_entry_t* ce/*st_data_t val*/, walk_ct
1717
1730
  return ST_CONTINUE;
1718
1731
  }
1719
1732
 
1733
+ // static void try_dump_generic_ivars(walk_ctx_t* ctx){
1734
+ // //very nasty hack:
1735
+ // #if defined(__x86_64__) && defined(__GNUC__) && !defined(__native_client__)
1736
+ // printf("Trying generic ivars\n");
1737
+ // //TODO: config to turn this off in case this will not work
1738
+
1739
+ // VALUE stack_end1, stack_end2;
1740
+ // rb_gc_set_stack_end(&stack_end1);
1741
+ // st_table* tbl = rb_generic_ivar_table();
1742
+ // rb_gc_set_stack_end(&stack_end2);
1743
+
1744
+ // #endif
1745
+ // }
1746
+
1720
1747
 
1721
1748
  //public symbol, can be used from GDB
1722
1749
  void heapdump_dump(const char* filename){
@@ -1758,6 +1785,8 @@ void heapdump_dump(const char* filename){
1758
1785
  yajl_gen_array_close(ctx->yajl);
1759
1786
  flush_yajl(ctx);
1760
1787
 
1788
+ //try_dump_generic_ivars();
1789
+
1761
1790
  //TODO: other gc entry points - symbols, encodings, etc.
1762
1791
 
1763
1792
  yajl_gen_map_close(ctx->yajl); //id:roots
data/heap_dump.gemspec CHANGED
@@ -4,9 +4,9 @@ require File.expand_path('../lib/heap_dump/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Vasily Fedoseyev"]
6
6
  gem.email = ["vasilyfedoseyev@gmail.com"]
7
- gem.description = %q{dump ruby 1.9 heap contents}
8
- gem.summary = %q{dump heap to track reference leaks etc}
9
- gem.homepage = ""
7
+ gem.description = %q{Ruby 1.9 heap contents dumper}
8
+ gem.summary = %q{Allows to dump heap to track reference leaks, including leaks in proc contexts and fibers}
9
+ gem.homepage = "https://github.com/Vasfed/heap_dump"
10
10
 
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
12
  gem.files = `git ls-files`.split("\n")
@@ -1,3 +1,3 @@
1
1
  module HeapDump
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
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.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-12 00:00:00.000000000Z
12
+ date: 2012-06-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-internal
16
- requirement: &70313207862660 !ruby/object:Gem::Requirement
16
+ requirement: &70094219359320 !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: *70313207862660
24
+ version_requirements: *70094219359320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: yajl-ruby
27
- requirement: &70313207862200 !ruby/object:Gem::Requirement
27
+ requirement: &70094219358420 !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: *70313207862200
35
+ version_requirements: *70094219358420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake-compiler
38
- requirement: &70313207861800 !ruby/object:Gem::Requirement
38
+ requirement: &70094219358020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,8 +43,8 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70313207861800
47
- description: dump ruby 1.9 heap contents
46
+ version_requirements: *70094219358020
47
+ description: Ruby 1.9 heap contents dumper
48
48
  email:
49
49
  - vasilyfedoseyev@gmail.com
50
50
  executables: []
@@ -63,7 +63,7 @@ files:
63
63
  - heap_dump.gemspec
64
64
  - lib/heap_dump.rb
65
65
  - lib/heap_dump/version.rb
66
- homepage: ''
66
+ homepage: https://github.com/Vasfed/heap_dump
67
67
  licenses: []
68
68
  post_install_message:
69
69
  rdoc_options: []
@@ -86,6 +86,7 @@ rubyforge_project:
86
86
  rubygems_version: 1.8.15
87
87
  signing_key:
88
88
  specification_version: 3
89
- summary: dump heap to track reference leaks etc
89
+ summary: Allows to dump heap to track reference leaks, including leaks in proc contexts
90
+ and fibers
90
91
  test_files: []
91
92
  has_rdoc: