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

Native Development

New Contributor
Posts: 2
Registered: ‎01-05-2012
My Device: Playbook
My Carrier: NA

Playbook multi core program

I've tried searching but have not been able to find answers to the following:


1) Is there a way to monitor CPU usage on playbook - Process monitor?


2) I'm trying to make use of both CPU cores and have created a thread to do processing and update my screen in the main thread but can not seem to get any extra performance by threading.  I've event tried setting the thread afinities for the main app and processing thread to seperate cores but with no success.  Does anyone know how to properly make use of the second cpu core?



Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Playbook multi core program

[ Edited ]

If rooted, the "pidin" command could work for you.  (Edit: but Elena clearly has a better idea, see below.)

And sorry, I can't help with the basic question other than to suggest an experiment involving splitting your code across two apps to explore whether even that seems to let them use separate cores effectively.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Playbook multi core program

There is a System Information tool in IDE that shows real time statistics about appilcation include usage of cpu, memory, etc.

New Contributor
Posts: 2
Registered: ‎01-05-2012
My Device: Playbook
My Carrier: NA

Re: Playbook multi core program

Thanks for the info, I gave the IDE real time statistics a look.  Unfortunately it does not give me the information I was looking for.  So I did the following:


1) Added a call to ClockCycles() before and after the Render loop, and before and after the Update loop with the update loop running as a seperate thread.

2) Compared ClockCycles before / after each loop call.


From this information I could determine when each loop was running and for how long.  Without creating a thread all updates were sequential as expected.  Running with a thread the ClockCycles overlapped each other.  From this I can infer that the thread must be running in the other core (maybe).  I will need to do some more analysis of the timestamps and cycle times to be sure that the thread isn't just being interrupted on the same core.


With enough samples I should be able to determine the total run time both with and without threading to prove that I am getting increased performance.  It is likely that I am, just not as much as I was hoping for.


Thanks for all the help