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