On Wed, Dec 14, 2011 at 7:47 AM, Chuck Remes <cremes.devlist / mac.com> wrote:
> Okay, so I should look for lines where I execute "Class.new {}" in my code. Off the top of my head, it is *rare* that I call Class.new directly; it's almost always via an actual class constant name.

They'll look something like this:

    4  1.57% 42.08%    159840  999    159840   999 325078 org.jruby.MetaClass
    5  1.57% 43.64%    159840  999    159840   999 325074 org.jruby.RubyClass

The MetaClass is the class's metaclass, and RubyClass is the class itself.

- Charlie

>
>>> I'll take a shot at reducing my object allocation. More information on how many of each type of object is being allocated would be a wonderful statistic to have. Also, if there were a way to trace that allocation back to a particular file and line number (for those cases where the same object isallocated in multiple places), that would be a killer profiling feature. <hint, hint>
>>
>> Indeed it would. Luckily, the JVM already provides it.
>> [snip]
>> If you find this information useful, perhaps you can reformat it for a
>> JRuby wiki page :)
>
> I find it *very* useful and I *will* add it to the wiki. Thanks for taking the time to post this!
>
> cr
>
>