12-05-2009 12:01 PM
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?
Solved! Go to Solution.
12-11-2009 02:13 PM
Are you stopped at a break point when you attempt to refresh the profiler window? This is a requiment for the window to populate.
12-14-2009 02:32 PM
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.
12-15-2009 07:36 PM
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.