Get list of class with most instances and size

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Get list of class with most instances and size

GLASS mailing list
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).


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Get list of class with most instances and size

GLASS mailing list
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). 

James

On Jul 1, 2015, at 6:19 PM, Mariano Martinez Peck via Glass <[hidden email]> 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).

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Get list of class with most instances and size

GLASS mailing list


On Thu, Jul 2, 2015 at 1:20 AM, James Foster <[hidden email]> 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 <[hidden email]> 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).

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Get list of class with most instances and size

GLASS mailing list
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].

cheers
Johan

On 02 Jul 2015, at 06:59, Mariano Martinez Peck via Glass <[hidden email]> wrote:



On Thu, Jul 2, 2015 at 1:20 AM, James Foster <[hidden email]> 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 <[hidden email]> 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).

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




-- 
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Get list of class with most instances and size

GLASS mailing list


On Thu, Jul 2, 2015 at 5:48 AM, Johan Brichau via Glass <[hidden email]> 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 <[hidden email]> wrote:



On Thu, Jul 2, 2015 at 1:20 AM, James Foster <[hidden email]> 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 <[hidden email]> 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).

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




-- 
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass