Lines Matching full:cpuid
60 UINT32 cpuid; in OsMpSchedStatistics() local
68 cpuid = ArchCurrCpuid(); in OsMpSchedStatistics()
72 g_mpStatPercpu[cpuid].contexSwitch++; in OsMpSchedStatistics()
75 g_mpStatPercpu[cpuid].idleStarttime = now; in OsMpSchedStatistics()
79 runtime = now - g_mpStatPercpu[cpuid].idleStarttime; in OsMpSchedStatistics()
80 g_mpStatPercpu[cpuid].idleRuntime += runtime; in OsMpSchedStatistics()
81 g_mpStatPercpu[cpuid].idleStarttime = 0; in OsMpSchedStatistics()
85 g_mpStatPercpu[cpuid].highTaskStarttime = now; in OsMpSchedStatistics()
89 runtime = now - g_mpStatPercpu[cpuid].highTaskStarttime; in OsMpSchedStatistics()
90 g_mpStatPercpu[cpuid].highTaskRuntime += runtime; in OsMpSchedStatistics()
91 g_mpStatPercpu[cpuid].highTaskStarttime = 0; in OsMpSchedStatistics()
95 g_mpStatPercpu[cpuid].highTaskSwitch++; in OsMpSchedStatistics()
99 g_mpStatPercpu[cpuid].sumPriority += newTask->priority; in OsMpSchedStatistics()
100 g_mpStatPercpu[cpuid].prioritySwitch++; in OsMpSchedStatistics()
109 UINT32 cpuid = ArchCurrCpuid(); in OsSchedStatistics() local
114 SchedPercpu *cpuRun = &schedRun->schedPercpu[cpuid]; in OsSchedStatistics()
115 SchedPercpu *cpuNew = &schedNew->schedPercpu[cpuid]; in OsSchedStatistics()
133 UINT32 cpuid = ArchCurrCpuid(); in OsSpinWaitStatistics() local
134 g_mpStatPercpu[cpuid].spinWaitRuntime += spinWaitRuntime; in OsSpinWaitStatistics()
140 UINT32 cpuid = ArchCurrCpuid(); in OsHwiStatistics() local
146 g_mpStatPercpu[cpuid].hwiNum++; in OsHwiStatistics()
149 g_mpStatPercpu[cpuid].ipiIrqNum++; in OsHwiStatistics()
159 UINT32 cpuid; in OsShellCmdDumpSched() local
180 for (cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) { in OsShellCmdDumpSched()
181 if (!((1U << cpuid) & affinity)) { in OsShellCmdDumpSched()
186 "CPU%u %+16lf ms %12u\n", cpuid, in OsShellCmdDumpSched()
187 (DOUBLE)(taskCB->schedStat.schedPercpu[cpuid].runtime) / NS_PER_MS, in OsShellCmdDumpSched()
188 taskCB->schedStat.schedPercpu[cpuid].contexSwitch); in OsShellCmdDumpSched()
199 UINT32 cpuid = 0; in OsShellMpStaticStart() local
216 cpuid = taskCB->currCpu; in OsShellMpStaticStart()
218 if ((UINT32)(OS_TASK_INVALID_CPUID) == cpuid) { in OsShellMpStaticStart()
222 g_mpStatPercpu[cpuid].idleStarttime = g_mpStaticStartTime; in OsShellMpStaticStart()
225 g_mpStatPercpu[cpuid].highTaskStarttime = g_mpStaticStartTime; in OsShellMpStaticStart()
226 g_mpStatPercpu[cpuid].highTaskSwitch++; in OsShellMpStaticStart()
229 g_mpStatPercpu[cpuid].sumPriority += taskCB->priority; in OsShellMpStaticStart()
230 g_mpStatPercpu[cpuid].prioritySwitch++; in OsShellMpStaticStart()
244 UINT32 cpuid; in OsMpStaticShow() local
253 for (cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) { in OsMpStaticShow()
254 PRINTK("CPU%u %+10lf%14u%14u%14u %+11lf %+11lf %+11lf%14u %+11lf\n", cpuid, in OsMpStaticShow()
255 … ((DOUBLE)(g_mpStatPercpu[cpuid].idleRuntime) / mpStaticPastTime) * DECIMAL_TO_PERCENTAGE, in OsMpStaticShow()
256 g_mpStatPercpu[cpuid].contexSwitch, in OsMpStaticShow()
257 g_mpStatPercpu[cpuid].hwiNum, in OsMpStaticShow()
258 g_mpStatPercpu[cpuid].ipiIrqNum, in OsMpStaticShow()
259 … ((DOUBLE)(g_mpStatPercpu[cpuid].spinWaitRuntime) / mpStaticPastTime) * DECIMAL_TO_PERCENTAGE, in OsMpStaticShow()
260 (g_mpStatPercpu[cpuid].prioritySwitch == 0) ? OS_TASK_PRIORITY_LOWEST : in OsMpStaticShow()
261 … ((DOUBLE)(g_mpStatPercpu[cpuid].sumPriority) / (g_mpStatPercpu[cpuid].prioritySwitch)), in OsMpStaticShow()
262 … ((DOUBLE)(g_mpStatPercpu[cpuid].highTaskRuntime) / mpStaticPastTime) * DECIMAL_TO_PERCENTAGE, in OsMpStaticShow()
263 g_mpStatPercpu[cpuid].highTaskSwitch, in OsMpStaticShow()
264 (g_mpStatPercpu[cpuid].highTaskSwitch == 0) ? 0 : in OsMpStaticShow()
265 …((DOUBLE)(g_mpStatPercpu[cpuid].highTaskRuntime) / (g_mpStatPercpu[cpuid].highTaskSwitch)) / NS_PE… in OsMpStaticShow()
275 UINT32 cpuid = 0; in OsShellMpStaticStop() local
297 cpuid = taskCB->currCpu; in OsShellMpStaticStop()
299 if (cpuid == (UINT32)(OS_TASK_INVALID_CPUID)) { in OsShellMpStaticStop()
303 runtime = mpStaticStopTime - g_mpStatPercpu[cpuid].idleStarttime; in OsShellMpStaticStop()
304 g_mpStatPercpu[cpuid].idleRuntime += runtime; in OsShellMpStaticStop()
305 g_mpStatPercpu[cpuid].idleStarttime = 0; in OsShellMpStaticStop()
308 runtime = mpStaticStopTime - g_mpStatPercpu[cpuid].highTaskStarttime; in OsShellMpStaticStop()
309 g_mpStatPercpu[cpuid].highTaskRuntime += runtime; in OsShellMpStaticStop()
310 g_mpStatPercpu[cpuid].highTaskStarttime = 0; in OsShellMpStaticStop()