Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » Group by attribute
Group by attribute [message #1746529] Mon, 31 October 2016 18:06 Go to next message
Mario Marinato is currently offline Mario MarinatoFriend
Messages: 38
Registered: March 2011
Location: Brazil
Member
I'm analyzing our software's memory consumption. I want to get some info but I don't know how.

Here's my case: using Memory Analyzer I discovered that all the instances of one specific class of ours consumes around 56 megabytes. Given that this class has eight attributes, I'd like to sum how much each field consumes.

I'd expect to get a report where I could see that attribute A consumes 10 MB, attribute B consumes 30 MB, etc.

Is it possible to be done using Memory Analyzer?

----
Mario Marinato, from Brazil


Mário Marinato
From Brazil
Re: Group by attribute [message #1752189 is a reply to message #1746529] Thu, 19 January 2017 15:22 Go to previous message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 205
Registered: July 2009
Senior Member
You could try viewing the objects in the Histogram view (Group by class) then for each attribute (= field name) run the
Java Basics > References > Reference Statistics
on all the objects with 'referent_attribute' as the field name you wish to consider.

Histogram of referent objects
This shows the objects directly referred to by the field. You could do a calculated retained size or show retained set of these objects - but consider what the meaning is if those referent objects are reachable from elsewhere.

Only retained by referents
This shows the objects which are only retained via the field, so if that field were cleared those objects could be freed.

Referents strongly retained by references
Probably not useful to you, but these are the direct referents via the field which are also reachable from the base object via another route. This is useful for weak hashmaps where some referents happen to be reachable from say the key field so can't be freed.
Previous Topic:Memory Analyzer 1.6.1 Released
Next Topic:Row colors make rows unreadable
Goto Forum:
  


Current Time: Fri Apr 26 05:20:04 GMT 2024

Powered by FUDForum. Page generated in 0.02708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top