Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mat-dev] About the API usage

Hi,

On 18.11.2013 10:02, Lijie Xu wrote:
> *2) Is it possible to get the name of the object?*
> For example, suppose a method defines:
> -------------------------------------------------
> String apple = "APPLE";
> String banana = "BANANA";
> List<String> fruits = new ArrayList<String>();
> fruits.add(apple);
> fruits.add(banana);
> -------------------------------------------------
> From the heap dump, we can get "java.util.ArrayList" and "java.lang.String". However, can we know the names of these variables (i.e., apple, banana, fruits)?
> [...]
> *3) Given an object, how to use the api to find its host thread and methods?*
> For example, 
> -------------------------------------------------
> public void foo() {
> String apple = "APPLE";
> }
> public static void main(String[] args) {
> foo();
> }
> -------------------------------------------------
> Given the object apple, I want to know its host methods (i.e., foo() --> main()) and thread (i.e., main thread). Is it possible?

The documentation ( http://www.eclipse.org/mat/ -> Documentation -> Heap Dump [last sentence]) says that neither 2) nor 3) are possible.


Kind regards,

Erik Brangs


Back to the top