diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-08 17:06:55 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-08 17:06:55 +0000 |
commit | d0d6e2ecfaf1cbf0b6c6095a1118ad375b2a0659 (patch) | |
tree | a98d7eaadb59e2bc67dba9b4cb2eb5210f194532 /ext/objspace/objspace.c | |
parent | 6edaaf15e3fdcff35d3ec901a01969d575036ba9 (diff) |
* ext/objspace/object_tracing.c: Add experimental methods to dump
objectspace as json: ObjectSpace.dump_all and ObjectSpace.dump(obj).
These methods are useful for debugging reference leaks and memory growth
in large ruby applications. [Bug #9026] [ruby-core:57893] [Fixes GH-423]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/objspace/objspace.c')
-rw-r--r-- | ext/objspace/objspace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index 82a743ba5c..6de5d222ac 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -719,6 +719,7 @@ reachable_objects_from_root(VALUE self) void Init_object_tracing(VALUE rb_mObjSpace); void Init_gc_hook(VALUE rb_mObjSpace); +void Init_objspace_dump(VALUE rb_mObjSpace); /* * Document-module: ObjectSpace @@ -770,4 +771,5 @@ Init_objspace(void) Init_object_tracing(rb_mObjSpace); Init_gc_hook(rb_mObjSpace); + Init_objspace_dump(rb_mObjSpace); } |