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.

Questions on CPU Load, Task Load, Hwi Load, Swi Load

Other Parts Discussed in Thread: SYSBIOS

Hi All,

        I have few questions on computing CPU load, Task Load, Hwi load and Swi load. please note i am using c6670.

I have my configuration like this

var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Load = xdc.useModule('ti.sysbios.utils.Load');
var Diags = xdc.useModule('xdc.runtime.Diags');
var loggerBuf = LoggerBuf.create();
Load.common$.logger = loggerBuf;
Load.common$.diags_USER4 = Diags.ALWAYS_ON;

Load.hwiEnabled = true; 
Load.swiEnabled = true; 
Load.taskEnabled = true;

Load.postUpdate = null;

Load.updateInIdle = true; 
Load.windowInMs = 1; 
Load.common$ = undefined; 
Load.minIdle = 0;

and i am using the following API's to get the values through values

void ipostUpdate(void)
{
Load_Stat stat;
u32 tskLoad,hwiLoad,swiLoad;
Load_getTaskLoad(particleFilter_TaskHnd,&stat);
tskLoad = Load_calculateLoad(&stat);

Load_getGlobalHwiLoad(&stat);
hwiLoad = Load_calculateLoad(&stat);

Load_getGlobalSwiLoad(&stat);
swiLoad = Load_calculateLoad(&stat);

Myprintf(cpuload %d,Taskload %d,Hwiload %d,SwiLoad %d, Load_getCPULoad(),tskLoad,hwiLoad,swiLoad);

}

1. I want to hook the ipostUpdate to Load.postUpdate = null; In other words, ipostUpdate should be called immediately after Update [after 1ms which is the benchmark time window]

2. Also I am not able to see any example using the above functions, can you please point me to them. Sorry to say its so frustrating that getting loads of CPU,Tsk,Hwi and Swi basic examples are not there in entire Ti installation directory. 

3. there are two ways to get the Load Info, 

a. Load module logger.

b. run time APIs [since i am using this].

Since i am not using the Load module logger, i think i can OMIT some of these below lines in the .cfg file..Can you please confirm whether it is right?

var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var loggerBuf = LoggerBuf.create();
Load.common$.logger = loggerBuf;

4. Once i get the values how to cross verify whether they are correct or accurate. Kindly help.

Kindly address these questions ASAP, i am awaiting on answers.

Thanks

RC Reddy

  • Hi All,

              i  went through .txt kind of editor, thats why i thot it needs to be entered manually. if i go thru xconfig GUI based editor i was able the function.

    Load.postUpdate = "&ipostUpdate";

    Now that this has solved, I am getting different error altogether, I am getting undefined error of ipostUpdate.

    1. Please note i have a built in code which uses linux based make file system and it fails there.

    2. To verify why step 1 is failing, i built a standalone code and check for failure, this doesnt fail [it works]

    I am not able to identify the issue, 

    I am getting this kind of error in Linux based make file system

    undefined first referenced
    symbol in file
    --------- ----------------
    ipostUpdate \mnt\data0\workspace_v5_3\checkL\Debug\configPkg\package\cfg\app_pe66.oe66

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "checkL.out" not built

    Can someone please let me know is there any configuration/setting to be taken care for .cfg to access functions in .c/.cpp in linux based make file system. basically, .cfg file is not able to see this function ipostUpdate...in what situations/conditions can that happen.

    Thanks

    RC Reddy

  • RC,

    The error message from the linker indicates that the object or library that you’ve compiled the ipostUpdate function into is not included in the set of objects and libraries to be linked.  Is the object/library referenced in your makefile?  Or is the path to it included in the linker search path?  Have you built simpler SYS/BIOS apps with your build system without issue?

    Re the other questions from your first post:

    #2 - I’ve searched a bit and didn’t find any detailed examples to point you to.  I will look some more and post back if I find something.  Hopefully someone else on the forum can point to something…

    #3 - Yes, if you’re using just the runtime APIs then you should be able to remove those configuration statements.

    #4 – How you cross verify will depend upon your particular application. Can you configure your application to generate an expected load profile, and then verify the load numbers are as expected?

    Scott

  • Hi,

         Thanks for reply.

    1. I have around 20 folders [3 tier structure i.e. folder3 within foder2 within folder1] structure with .c and .h files amounting to near 87 files. My build works fine with file search path, library search path and compiler search path. I am not unable to understand what is it so specific that .cfg is not able to see the .c/.h file. Still investigating :(, if i succeed will post it back in this page.

    2. thanx

    3. ohk, i understood it.

    4. will follow the method you suggested and verify it.

    Thanks

    RC Reddy