Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 26
Registered: ‎07-14-2008
My Device: Not Specified
Accepted Solution

How to Profilling Memory Usage in BB java application?

Hi ALL,

 

I want to know is there possible to profile a application (process) memory usage in The BB java program. I want to check that memory usages of my application in my code.

 

Can any one help me?

 

Thanks for your help.

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to Profiling Memory Usage in BB java application?

The JDE has a built-in profile tooling that I am sure will do what you need it to do.  You will find it documented in the JDE, in the Debugging BlackBerry Java Applications.  The general process (or at least, how I generally use it) is to put a break point at the start and end of the code I want to analyze.  When I hit the breakpoint at the start, I reset the stats, let it go to the end, and then spot the differences!
New Developer
Posts: 96
Registered: ‎07-26-2008
My Device: Not Specified

Re: How to Profiling Memory Usage in BB java application?

Peter - this method would give you a general idea since other apps may also be running in the background at the time with fluctuating memory ?
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to Profiling Memory Usage in BB java application?

Interesting point.

 

I've only ever used the profiler when profiling a section of my code.  The code I was profiling was contiguous (I'm sorry, I can't think of the right word, the code didn't give up control), in other words, it run in the one Thread, with no Sleeps or blocking points.  In this scenario, in the profiling output, I only saw code and object usage associated with my application. 

 

I've never profiled across distinct parts of my application, like having my first break point in one Thread and the second in another.  I'm not sure how valid that would be.  Might be interesting to try.