This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CPU Load doesn't match expected value

Other Parts Discussed in Thread: SYSBIOS

Hello,


i am trying to measure the CPU load of my application on a TMDXEVM6678L Board.

There is only 1 task, which is waiting (blocking) for input data (MessageQ_get()), process it, and waits for the next amount of data in a loop.

I am acquiring data with following options in my .cfg file:

LoggingSetup.sysbiosTaskLogging = false;
LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
LoggingSetup.mainLoggingRuntimeControl = false;
LoggingSetup.mainLogging = false;
LoggingSetup.sysbiosLoggerSize = 0;
LoggingSetup.mainLoggerSize = 0;
Load.swiEnabled = false;
Load.taskEnabled = true;
Load.windowInMs = 10;
LoggingSetup.loadLoggerSize = 16384;
LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE;

So i suppose the CPU Load to be something around 100% when processing data, and something around 0% when waiting for data.
The task load of that task is in line with my assumptions, but the CPU load seems to be around 55% when the task is waiting for new data (see attached picture).

Is the high CPU load in Idle time related to the blocking waiting for new data or what could be the reason for that?

Best Regards,

Florian Grützmacher


  • What's going on with the interrupts? Can you enable Swi and Hwi logging to get the complete picture?

    Todd

  • Which information do you need to see? The Execution graph?


    I have attached three pics.

    Regards,

    Florian

  • Sorry, this fell through the cracks. Did this get resolved?

    If not, it looks like the task's load is going to zero. Do you have any idle functions plugged in? You can see all the idle functions in Tools->ROV->Idle. You'll need to pause the core to allow ROV to read the target.

    Todd
  • Nope, this hasn't got resolved by now.

    Right, the task load is going to zero at some recurring points in time, like expected. I would also expect the CPU load going near zero at this points in time, but its about 55% like you can see in the pictures posted above.

    I have not used any special Idle functions, since i suppose a default idle function to be executed automatically which does nothing, when no other task or thread is scheduled.
    Anyway, is it possible to get this information live via System Analyzer, instead of stoping the cores?

    Florian

  • Can you enable load for the Swi and Hwi modules. Set the following in the .cfg file.
    LoggingSetup.loadTaskLogging = true;
    LoggingSetup.loadSwiLogging = true;
    LoggingSetup.loadHwiLogging = true;

    Also, remove the following Load lines. LoggingSetup does this for you.
    Load.swiEnabled = false;
    Load.taskEnabled = true;

    With new settings, what does the CPU graph look like?

    Do you really want CPU numbers every 10ms? The faster you get the information, the greater the overhead on the system.

    Todd
  • Hello Todd,

    thanks for helping me so far.

    your suggestion leads to a runtime error:
    XDC runtime error: ti.uia.sysbios.LoggingSetup: no element named 'loadTaskLogging'

    I'am using SYS/BIOS 6.34.2.18 and UIA 1.1.1.14, maybe its too old?

    I thought 'Load.windowInMs = 10;' means the averaging period of the load values, not the period of acquiring the values from the board.
    I though the values are acquired when the LoggerBuffer is full? Isn't it?

    Florian

  • I was looking at a newer version. Just set
    LoggingSetup.loadLogging=true;

    And make sure the following are set
    Load.hwiEnabled= true;
    Load.swiEnabled = true;
    Load.taskEnabled = true;
  • Hello Todd,


    somehow the effect disappeared, i don't know what exactly caused this behavior.

    Now the CPU load seems to equal the task load of my only implemented function.
    But i am wondering, why it is a saw like signal, as the task load should be at approx. 96% for 2-3 seconds.

    Instead i get this saw like signal, is it somehow related to Load.windowInMs option?

    Best Regards,

    Florian

  • The Load.windowInMs period determines the minimum elapsed time between updates of the load statistics in the idle loop. If you set it too big, you might be saw-like signals. If you make it too small, you impact performance of the system. That's why we default it to 500ms.

    Please confirm you are clocking at the correct rate. Look at the clockTick in ROV->Clock->Module. Run the target for 30 seconds and confirm the clockTicks went up the correct amount.

    Also note: if the CPU is being used 100%, the idle task cannot run and collect the data.

    Todd