[Glass] Get list of class with most instances and size

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Thu Jul 2 06:02:55 PDT 2015


On Thu, Jul 2, 2015 at 5:48 AM, Johan Brichau via Glass <
glass at lists.gemtalksystems.com> wrote:

> Hi Mariano,
>
> The following piece of code gives you the list of classes loaded into gem
> memory with their number of instances (and sorted on most instances first).
> Don’t search for a meaning, the ' _vmInstanceCounts: 2 ‘ is something I
> got from Dale :)
>
> instanceCounts := (System _vmInstanceCounts: 2) sorted:[:a :b | b value
> first <= a value first].
>
>

Thanks Johan!

hahahahahah  better don't ask ;)
btw...second element of the array is the memory ?


Thanks James too for the ScanBackup too.

Cheers,



> cheers
> Johan
>
> On 02 Jul 2015, at 06:59, Mariano Martinez Peck via Glass <
> glass at lists.gemtalksystems.com> wrote:
>
>
>
> On Thu, Jul 2, 2015 at 1:20 AM, James Foster <
> james.foster at gemtalksystems.com> wrote:
>
>> ScanBackup gives a report of all the objects in the on-disk repository
>> while an out-of-memory error gives a report of all the objects in the Gem
>> (an individual VM session that has a subset of the repository in RAM).
>>
>>
> Ohhh good difference!
> So....OK, I will wait to see if that URL has latest ScanBackup.
> And do you know where I can get the one of the gem?
>
>
>
>
>> James
>>
>> On Jul 1, 2015, at 6:19 PM, Mariano Martinez Peck via Glass <
>> glass at lists.gemtalksystems.com> wrote:
>>
>> Dale,
>>
>> Is this https://programminggems.wordpress.com/2009/05/14/scanbackup/  still
>> the last available code to get that? I think it is not, because sometimes
>> when I get a gem crash with an out of memory I get that table written into
>> the log, therefore, I should have such code somewhere in my gemstone. But I
>> do not have ScanBackup class.
>>
>> So...yes, I want to print a little table with the classes with most
>> instances, and hopefully the size and occupied memory (SpaceTally in Pharo).
>>
>> Best,
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150702/d80913a8/attachment-0001.html>


More information about the Glass mailing list