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.h | |
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.h')
-rw-r--r-- | ext/objspace/objspace.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/objspace/objspace.h b/ext/objspace/objspace.h new file mode 100644 index 0000000000..95b84d6c1e --- /dev/null +++ b/ext/objspace/objspace.h @@ -0,0 +1,20 @@ +#ifndef OBJSPACE_H +#define OBJSPACE_H 1 + +/* object_tracing.c */ +struct allocation_info { + /* all of information don't need marking. */ + int living; + VALUE flags; + VALUE klass; + + /* allocation info */ + const char *path; + unsigned long line; + const char *class_path; + VALUE mid; + size_t generation; +}; +struct allocation_info *objspace_lookup_allocation_info(VALUE obj); + +#endif |