Lines Matching refs:taskID
190 UINT32 taskID; in OsTskCycleStart() local
196 taskID = g_losTask.newTask->taskID; in OsTskCycleStart()
197 g_cpup[taskID].cpupID = taskID; in OsTskCycleStart()
198 g_cpup[taskID].startTime = CpupTimeUsGet(); in OsTskCycleStart()
211 UINT32 taskID; in OsTskCycleEnd() local
218 taskID = g_losTask.runTask->taskID; in OsTskCycleEnd()
220 if (g_cpup[taskID].startTime == 0) { in OsTskCycleEnd()
225 if (cpuTime < g_cpup[taskID].startTime) { in OsTskCycleEnd()
229 g_cpup[taskID].allTime += (cpuTime - g_cpup[taskID].startTime); in OsTskCycleEnd()
230 g_cpup[taskID].startTime = 0; in OsTskCycleEnd()
243 UINT32 taskID; in OsTskCycleEndStart() local
251 taskID = g_losTask.runTask->taskID; in OsTskCycleEndStart()
254 if (g_cpup[taskID].startTime != 0) { in OsTskCycleEndStart()
255 if (cpuTime < g_cpup[taskID].startTime) { in OsTskCycleEndStart()
259 g_cpup[taskID].allTime += (cpuTime - g_cpup[taskID].startTime); in OsTskCycleEndStart()
260 g_cpup[taskID].startTime = 0; in OsTskCycleEndStart()
263 taskID = g_losTask.newTask->taskID; in OsTskCycleEndStart()
264 g_cpup[taskID].cpupID = taskID; in OsTskCycleEndStart()
265 g_cpup[taskID].startTime = cpuTime; in OsTskCycleEndStart()
400 LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskCpuUsage(UINT32 taskID) in LOS_TaskCpuUsage() argument
410 if (OS_TSK_GET_INDEX(taskID) >= g_taskMaxNum) { in LOS_TaskCpuUsage()
413 if (g_cpup[taskID].cpupID != taskID) { in LOS_TaskCpuUsage()
416 if ((g_cpup[taskID].status & OS_TASK_STATUS_UNUSED) || (g_cpup[taskID].status == 0)) { in LOS_TaskCpuUsage()
431 cpupRet = (UINT32)((LOS_CPUP_PRECISION * g_cpup[taskID].allTime) / cpuTimeAll); in LOS_TaskCpuUsage()
447 LITE_OS_SEC_TEXT_MINOR UINT32 LOS_HistoryTaskCpuUsage(UINT32 taskID, UINT16 mode) in LOS_HistoryTaskCpuUsage() argument
459 if (OS_TSK_GET_INDEX(taskID) >= g_taskMaxNum) { in LOS_HistoryTaskCpuUsage()
462 if (g_cpup[taskID].cpupID != taskID) { in LOS_HistoryTaskCpuUsage()
465 if ((g_cpup[taskID].status & OS_TASK_STATUS_UNUSED) || (g_cpup[taskID].status == 0)) { in LOS_HistoryTaskCpuUsage()
487 cpuTimeCurTsk += g_cpup[taskID].historyTime[curPos] - g_cpup[taskID].historyTime[prePos]; in LOS_HistoryTaskCpuUsage()
489 cpuTimeCurTsk += g_cpup[taskID].allTime - g_cpup[taskID].historyTime[curPos]; in LOS_HistoryTaskCpuUsage()
569 …TE_OS_SEC_TEXT_MINOR UINT32 LOS_CpupUsageMonitor(CPUP_TYPE_E type, CPUP_MODE_E mode, UINT32 taskID) in LOS_CpupUsageMonitor() argument
588 if (taskID > LOSCFG_BASE_CORE_TSK_LIMIT) { in LOS_CpupUsageMonitor()
592 taskCB = OS_TCB_FROM_TID(taskID); in LOS_CpupUsageMonitor()
598 PRINTK("\nCPUusage of taskID %d in 10s: ", taskID); in LOS_CpupUsageMonitor()
600 PRINTK("\nCPUusage of taskID %d in 1s: ", taskID); in LOS_CpupUsageMonitor()
602 PRINTK("\nCPUusage of taskID %d in <1s: ", taskID); in LOS_CpupUsageMonitor()
604 ret = LOS_HistoryTaskCpuUsage(taskID, mode); in LOS_CpupUsageMonitor()