Tentative fixes for RT statistics.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@16175 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
7e0e4ea9bb
commit
b3555769e7
|
@ -123,6 +123,9 @@ uint64_t __port_schedule_next(void) {
|
|||
mpuSetRegionAddress(PORT_USE_GUARD_MPU_REGION, ntp->wabase);
|
||||
#endif
|
||||
|
||||
__trace_switch(ntp, otp);
|
||||
__stats_ctxswc(ntp, otp);
|
||||
|
||||
return ((uint64_t)(uint32_t)otp << 32) | ((uint64_t)(uint32_t)ntp << 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,6 +160,11 @@ void chInstanceObjectInit(os_instance_t *oip,
|
|||
/* Setting up the caller as current thread.*/
|
||||
oip->rlist.current->state = CH_STATE_CURRENT;
|
||||
|
||||
#if CH_DBG_STATISTICS == TRUE
|
||||
/* Starting measurement for this thread.*/
|
||||
chTMStartMeasurementX(&oip->rlist.current->stats);
|
||||
#endif
|
||||
|
||||
/* User instance initialization hook.*/
|
||||
CH_CFG_OS_INSTANCE_INIT_HOOK(oip);
|
||||
|
||||
|
|
Loading…
Reference in New Issue