Skip navigation.
Home
The QNX Community Portal

View topic - CPU Hogging

CPU Hogging

Discussion about the QNX6 OS.

CPU Hogging

Postby punwawa » Mon May 30, 2011 11:30 am

Hello,

I have an application running on QNX RTOS and ARM-Le Cortex.
Some thread in the application hoggs the CPU and the CPU consumption reaches upto 90%. After the CPU load reaches 90% every thing stops responding.
My questions are: -
How to resolve this issue?? Through kernel trace, I was able to find the Thread which is hogging the CPU but how to find which function in
the thread is hogging the CPU?? :roll:
punwawa
New Member
 
Posts: 2
Joined: Mon May 30, 2011 11:19 am

RE: CPU Hogging

Postby maschoen » Mon May 30, 2011 2:40 pm

Do you have the source code? There is a profiling feature in Momentics (which I've never used). Do you know what the thread is doing? I would think that some careful reflection on your part would make the answer obvious.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

RE: CPU Hogging

Postby Thunderblade » Tue May 31, 2011 8:22 am

Yes right QNX has the Application Profiler which you can use to find out the function that is hogging your CPU. Let us know if you succeed.
Thunderblade
Senior Member
 
Posts: 487
Joined: Thu Apr 07, 2005 11:52 am

Postby punwawa » Tue May 31, 2011 9:38 am

Hello All,

Thank you for responding.

Actually, I explored the option of QNX application profiler but that
seems to be more complex because I do not have even "qconn" running
on the target.

Is there any other way to find which function in the thread
is actully hogging the CPU using core dump or something??
punwawa
New Member
 
Posts: 2
Joined: Mon May 30, 2011 11:19 am

Postby mario » Tue May 31, 2011 2:30 pm

Is dumper running, is there a core dump generated?

You say that everything stops responding but you manage to get a kernel trace, how is that possible?

If you can run sloginfo, if the program did a SIGSEGV it will show up in the sloginfo output. It will show the address where it crashed, then if you have a map file for the executable you might be able to figure out in which fonction it happened.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby maschoen » Tue May 31, 2011 3:35 pm

punwawa wrote:Hello All,

Thank you for responding.

Actually, I explored the option of QNX application profiler but that
seems to be more complex because I do not have even "qconn" running
on the target.

Is there any other way to find which function in the thread
is actully hogging the CPU using core dump or something??


You might want to ask yourself, how can I watch my TV without plugging it in?

There are ways to find out what you want, but they involve doing something.
If you can't put "qconn" on the target, then you don't have enough control to fix the problem.

Here is a more programatic way that I assume you also can't do.

At the beginning of every routine, set a global variable with a unique number. In a separate thread, loop with a sleep. Increment counts in a table with the global variable as your index. After a while, check the table and see who's hogging.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron