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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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 ?
Highlighted
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.