aspose file tools*
The moose likes Performance and the fly likes profiler not able to find object creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "profiler not able to find object creation " Watch "profiler not able to find object creation " New topic
Author

profiler not able to find object creation

raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
HI
I am using TPTP eclipse plugin as profiler to find the memory leak.I have written one small program to profile my first program but profiler is not able to find the object creation .Here is my program:-



Profiler is only showing one object created in main method .But it not able to find the object creation in the run method.Am i doing anything wrong here?This is my first program which i am running using profiler.

Thanks,
Raj
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

String objects which cannot be referenced once the 'for loop' executes are very likely garbage collected, which is why the profiler is unable to show them.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285

String objects which cannot be referenced once the 'for loop' executes are very likely garbage collected, which is why the profiler is unable to show them.


No i am adding all the objects to list using addObj method, so all the strings should not be garbage collectible.Also if I increase the for loop limit to 200000000000000 from current 2000, I will get out of memory exception. Profiler should be able to catch it as it is a memory leak. Is this behavior specific to this profiler only or is common in all the profilers?

Thanks,
Raj
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Any profiler can determine that there are many String objects when the line "System.out.println(list);" is up for execution. I do not have the profiler in question, so I am not sure what is wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: profiler not able to find object creation
 
Similar Threads
Code review
wild card
Scanner question about hasNext() and next()
Row Selection problems with JTable
Socket is not receiving the first request after long Ideal time