Details
-
Type:
Wish
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Extensions
-
Labels:None
-
Number of attachments :
Description
A memprof-like feature for JRuby to debug memory leaks, by telling the amount of live objects grouped by file and line-number from where they were created in the code. Could be enabled by giving an argument like "--memory-profiling" to JRuby, since it would properly eat some performance.
In memprof-mode JRuby saves the file and line number from allocated objects in a hash with a counter. Possibly with a hook into "Class.new" or something on the Java-side? When an object is freed the counter counts down (could possibly be hacked by using weak references if this is not possible otherwise?).
When a static method like "JRuby::Memprof.stats" is called or the application ends, the contents of this hash should be printed. It should then tell the amount of live objects from which file and line-number to debug memory leaks in the Ruby-side of the source code.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Won't Fix [ 2 ] | |
| Assignee | Charles Oliver Nutter [ headius ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
There are several JVM tools that can provide this information, and when the Ruby application is compiled-on-load (-X+C, for example) the actual Ruby line numbers will be provided. Not sure there's more we need to do here.