Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » View object values in a View
View object values in a View [message #651981] Wed, 02 February 2011 11:00 Go to next message
Iulian Dragos is currently offline Iulian DragosFriend
Messages: 23
Registered: July 2009
Junior Member
Is there a way to see the specific value of the selected object in a different view? For instance, one could provide an extension to print the contents of an array. Currently the resolved value is printed next to the object address, in the table view. That's usually very crowded.

The inspector is not better. First of all, it does not show the resolved value of the inspected object anywhere. It does show the resolved values for each field, but it does so instead of the actual class name of the field, and I think both informations are important.

It would be nice to have a view for showing the resolved value of the selected object, and also show it in the inspector. This way you can have a compact view in the table, and a detailed view in another pane. This also seems to be the way YourKit works.

What do you think? Sorry if there was such a view and I missed it!

iulian
Re: View object values in a View [message #652056 is a reply to message #651981] Wed, 02 February 2011 14:39 Go to previous messageGo to next message
Jonathan Lawrence is currently offline Jonathan LawrenceFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Iulian

I'm not clear exactly what you mean by the resolved value of an object because surely that is just the fields which comprise the object, with their values. In general that is as much as can be displayed for an object, except for some special cases where the tool will display internal values (eg java.lang.String).

If I select an object in (for example) a tree view, the inspector shows details of the object including its fields, under the "Attributes" tab. If the object is an array it shows the values of each element in the array, with its Java object type where applicable. The exception is where further resolution has occurred as above, when the type is not displayed.

Is your request to show the Java type of fields which have been resolved in this way?

Could you give more details of exactly what you would hope to see in the Inspector, maybe with an example, or possibly raise a suggestion as an Eclipse bugzilla?

Jonathan.

Re: View object values in a View [message #652189 is a reply to message #651981] Wed, 02 February 2011 23:12 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 123
Registered: July 2009
Senior Member
You can copy the value (Context Menu on the object, copy, value)
and paste it into the notes view.

You can also copy a selection e.g. ctrl-C and paste it (that gives the table headings too).

You can save a value to disk - that for huge arrays that gives the full value rather than a value truncated at approximately 1024 characters.

You can also do 'Java Basics' 'Group by Value' to see the value in a table.

These suggestions aren't dynamic though, so don't follow the selected objects.

We could modify the inspector view - either another row in the top part of the split pane or another tab at the bottom. We don't want to clutter the screen too much more however.
Re: View object values in a View [message #652237 is a reply to message #652056] Thu, 03 February 2011 10:06 Go to previous messageGo to next message
Iulian Dragos is currently offline Iulian DragosFriend
Messages: 23
Registered: July 2009
Junior Member
Jonathan Lawrence wrote on Wed, 02 February 2011 09:39
Hi Iulian

I'm not clear exactly what you mean by the resolved value of an object because surely that is just the fields which comprise the object, with their values. In general that is as much as can be displayed for an object, except for some special cases where the tool will display internal values (eg java.lang.String).



That's exactly what I meant. I wrote a couple of name resolvers for my types (for instance, in my app we intern strings in a custom char array), so I need to see the resolved value. Sometimes this can be a long string, for instance for lists or maps.

Quote:

If I select an object in (for example) a tree view, the inspector shows details of the object including its fields, under the "Attributes" tab. If the object is an array it shows the values of each element in the array, with its Java object type where applicable. The exception is where further resolution has occurred as above, when the type is not displayed.



Yes, the field view is nice, but in the pane above the field table it would be good to display the resolved value as well.
Re: View object values in a View [message #652238 is a reply to message #652189] Thu, 03 February 2011 10:12 Go to previous messageGo to next message
Iulian Dragos is currently offline Iulian DragosFriend
Messages: 23
Registered: July 2009
Junior Member
Andrew Johnson wrote on Wed, 02 February 2011 18:12
You can copy the value (Context Menu on the object, copy, value)
and paste it into the notes view.

You can also copy a selection e.g. ctrl-C and paste it (that gives the table headings too).

You can save a value to disk - that for huge arrays that gives the full value rather than a value truncated at approximately 1024 characters.



Yes, that's what I do sometimes.

Quote:

We could modify the inspector view - either another row in the top part of the split pane or another tab at the bottom. We don't want to clutter the screen too much more however.



I would go for another row, for completeness. I think it's important, and if you're worried about clutter you can remove the super class (that is usually easy to find) or the string 'no GC root', which could instead be turned into another visual indicator, like a special icon next to the object address.

Regardless, I think the view is a good idea because it can be closed, or placed anywhere. Is there an extension point for that? I'd be happy to contribute a prototype (I'm not familiar with the code base though)

thanks!
Re: View object values in a View [message #652438 is a reply to message #652238] Thu, 03 February 2011 22:16 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 123
Registered: July 2009
Senior Member
I've tried an extra row in the top - it then produces scroll bars, so the top would need to be bigger. I don't think removing items is right either. Also I like the inspector view on the left hand side as a narrow column, and the details are not then any more visible than in the main query table. Hover text does appear, but that's not great.

A text view tab with line wrapping would have plenty of space - it is just harder to program. It also might allow better selection/copying.

Re: View object values in a View [message #653092 is a reply to message #652438] Tue, 08 February 2011 13:22 Go to previous messageGo to next message
Iulian Dragos is currently offline Iulian DragosFriend
Messages: 23
Registered: July 2009
Junior Member
Andrew Johnson wrote on Thu, 03 February 2011 17:16
I've tried an extra row in the top - it then produces scroll bars, so the top would need to be bigger. I don't think removing items is right either. Also I like the inspector view on the left hand side as a narrow column, and the details are not then any more visible than in the main query table. Hover text does appear, but that's not great.


Fair enough. I am still convinced that not showing the user-defined string for a type mostly defeats the purpose of having these extensions points.
Quote:

A text view tab with line wrapping would have plenty of space - it is just harder to program. It also might allow better selection/copying.


Agreed, spacing, selection and copying are very important. I reiterate my offer to help with this view, but I need a bit of guidance. Is there an extension point I can target? I'd need a notification of the currently selected object (similar to how the Inspector panel operates)
Re: View object values in a View [message #654421 is a reply to message #653092] Tue, 15 February 2011 17:08 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 123
Registered: July 2009
Senior Member
>Agreed, spacing, selection and copying are very important. I reiterate my offer to help with this view, but I need a bit of guidance. Is there an extension point I can target? I'd need a notification of the currently selected object (similar to how the Inspector panel operates)

Thank you for your offer. There isn't an extension point - please take a look at:

/org.eclipse.mat.ui/src/org/eclipse/mat/ui/snapshot/views/in spector/InspectorView.java

I was suggesting an extra tab as well as Statics, Attributes, and Class Hierarchy.

I'm not sure a new extension point is necessary - unless we had a more general text/image/composite object name/description resolver and put that into the tab. At the moment RGB and Images appear in a box at the bottom of the Inspector view. This could be generalized to the tab.
Re: View object values in a View [message #654638 is a reply to message #654421] Wed, 16 February 2011 14:38 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 123
Registered: July 2009
Senior Member
This is a bit easier than I thought.

Here is a Bugzilla entry for the enhancement: https://bugs.eclipse.org/bugs/show_bug.cgi?id=337314

Here is how it could look:
https://bugs.eclipse.org/bugs/attachment.cgi?id=189095

The window doesn't have scroll bars - though you can scroll if required by moving the cursor. Normally the window is big enough (with the 1024 character limit of String values) and added scroll bars look a bit ugly.
Re: View object values in a View [message #657744 is a reply to message #654638] Thu, 03 March 2011 19:33 Go to previous messageGo to next message
Iulian Dragos is currently offline Iulian DragosFriend
Messages: 23
Registered: July 2009
Junior Member
Thank you, it looks good.

I don't know if this is the right place to discuss this, but I'd like to tutor a Google Summer of Code project for adding scripting support to MAT OQL. I think there's a reasonable chance this will be approved, last year we had quite a nice crop of projects:

http://www.scala-lang.org/gsoc2010

I'd be interested in using Scala as the scripting language, so I see it as an alternative next to OQL support. I think it could be developed as a separate plugin, but it would be nice to collaborate and maybe find other areas where a motivated student can help. Anyone interested in the MAT team?

thanks
Re: View object values in a View [message #658742 is a reply to message #657744] Wed, 09 March 2011 16:22 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 123
Registered: July 2009
Senior Member
You had a discussion of scripting here: http://www.eclipse.org/forums/index.php?t=msg&th=203727 or there is your bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=335943 or you could have a new discussion. This is not the right topic as people won't find it from the title 'View object values in a View'

It sound interesting, though I don't know how many users are ready to write in Scala. Perhaps a division of work is to ensure MAT is dynamic aware for additional/removal of extensions, and then have Scala, Javascript scripting modules use the extensions etc. Unfortunately I don't have much spare time at the moment.

One aspect to consider are the licensing requirements. Any code in the Memory Analyzer project needing Scala would at least need a CQ 'Works with' dependency http:// www.eclipse.org/org/documents/Eclipse_Policy_and_Procedure_f or_3rd_Party_Dependencies_Final.pdf so the license for Scala would need to be suitable.
Re: View object values in a View [message #658929 is a reply to message #657744] Thu, 10 March 2011 13:35 Go to previous messageGo to next message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 149
Registered: July 2009
Senior Member
Quote:
I don't know if this is the right place to discuss this, but I'd like to tutor a Google Summer of Code project for adding scripting support to MAT OQL


I also think its better to post this in a separate thread with a different title.

Quote:
Anyone interested in the MAT team?


This sounds interesting, but I'm afraid I also can't find the time for it.

I'll post a link to this message on our dev mailing list. I guess there could be people following the list which can be interested in the idea.
Re: View object values in a View [message #659921 is a reply to message #658929] Wed, 16 March 2011 07:18 Go to previous messageGo to next message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 149
Registered: July 2009
Senior Member
A colleague from SAP posted a comment about this on the mat-dev list:
http://dev.eclipse.org/mhonarc/lists/mat-dev/msg00240.html
Re: View object values in a View [message #660468 is a reply to message #659921] Fri, 18 March 2011 14:44 Go to previous message
Iulian Dragos is currently offline Iulian DragosFriend
Messages: 23
Registered: July 2009
Junior Member
Krum Tsvetkov wrote on Wed, 16 March 2011 03:18
A colleague from SAP posted a comment about this on the mat-dev list:
http://dev.eclipse.org/mhonarc/lists/mat-dev/msg00240.html


Thanks, I subscribed to the mailing list so I hope I'll be able to contribute to the discussion there (I find the forum interface harder to use than simple email).
Previous Topic:How to find what is pinning the app classloader with MAT?
Next Topic:Huge heap dump, but no content?
Goto Forum:
  


Current Time: Thu Dec 18 23:58:11 GMT 2014

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

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