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
ptys
Posts: 21
Registered: ‎01-08-2009
My Device: Not Specified
Accepted Solution

CPU profiling on a physical device

Is it possible to do CPU profiling on a real device?

 

I'm using JDE 4.7 on a tour from Verizon. I read somewhere on this board that I need a simulator with the same OS version installed, and I do right now. I attach to the device, I can do memory profiling (listing objects, their sizes, etc), but the profile window is always empty. When I click Clear or Refresh something is happening, CPU spikes, but then nothing.

 

Has anyone managed to get it to work? Is it even possible?

Thanks.

Developer
ptys
Posts: 21
Registered: ‎01-08-2009
My Device: Not Specified

Re: CPU profiling on a physical device

Anyone?

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: CPU profiling on a physical device

Are you stopped at a break point when you attempt to refresh the profiler window?  This is a requiment for the window to populate.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
ptys
Posts: 21
Registered: ‎01-08-2009
My Device: Not Specified

Re: CPU profiling on a physical device

I break by pressing the Break Now button with a little red dot. Breaking this way works for memory profiling.

Developer
ptys
Posts: 21
Registered: ‎01-08-2009
My Device: Not Specified

Re: CPU profiling on a physical device

I also tried regular breakpoints with the same result. The CPU profiling window never populates with any data.

 

It does work fine with the simulator, but the simulator profiling isn't of much use. It behaves completely different than real hardware and the timings are unreliable. For example, on the simulator multiplication is faster than byte shifting, accessing an instance variable is faster than a local one, etc. It's the complete opposite of the real device.

Developer
ptys
Posts: 21
Registered: ‎01-08-2009
My Device: Not Specified

Re: CPU profiling on a physical device

Ok I solved my own problem. Yes, CPU profiling on a physical device is possible.

 

It turns out that the profiling is disabled by default, even when the Profile window is opened. Profiling has to be explicitly enabled by going to Options on the Profile window, and on the General tab “What to profile” has to be changed from Disabled.