@ -2130,15 +2130,35 @@ tskTCB *pxNewTCB;
ulStatsAsPercentage = ( 100UL * pxNextTCB - > ulRunTimeCounter ) / ulTotalRunTime ;
ulStatsAsPercentage = ( 100UL * pxNextTCB - > ulRunTimeCounter ) / ulTotalRunTime ;
if ( ulStatsAsPercentage > 0UL )
if ( ulStatsAsPercentage > 0UL )
{
# ifdef portLU_PRINTF_SPECIFIER_REQUIRED
{
{
sprintf ( pcStatsString , ( char * ) " %s \t \t %lu \t \t %lu%% \r \n " , pxNextTCB - > pcTaskName , pxNextTCB - > ulRunTimeCounter , ulStatsAsPercentage ) ;
sprintf ( pcStatsString , ( char * ) " %s \t \t %lu \t \t %lu%% \r \n " , pxNextTCB - > pcTaskName , pxNextTCB - > ulRunTimeCounter , ulStatsAsPercentage ) ;
}
}
# else
{
/* sizeof( int ) == sizeof( long ) so a smaller
printf ( ) library can be used . */
sprintf ( pcStatsString , ( char * ) " %s \t \t %u \t \t %u%% \r \n " , pxNextTCB - > pcTaskName , ( unsigned int ) pxNextTCB - > ulRunTimeCounter , ( unsigned int ) ulStatsAsPercentage ) ;
}
# endif
}
else
else
{
{
/* If the percentage is zero here then the task has
/* If the percentage is zero here then the task has
consumed less than 1 % of the total run time . */
consumed less than 1 % of the total run time . */
# ifdef portLU_PRINTF_SPECIFIER_REQUIRED
{
sprintf ( pcStatsString , ( char * ) " %s \t \t %lu \t \t <1%% \r \n " , pxNextTCB - > pcTaskName , pxNextTCB - > ulRunTimeCounter ) ;
sprintf ( pcStatsString , ( char * ) " %s \t \t %lu \t \t <1%% \r \n " , pxNextTCB - > pcTaskName , pxNextTCB - > ulRunTimeCounter ) ;
}
}
# else
{
/* sizeof( int ) == sizeof( long ) so a smaller
printf ( ) library can be used . */
sprintf ( pcStatsString , ( char * ) " %s \t \t %u \t \t <1%% \r \n " , pxNextTCB - > pcTaskName , ( unsigned int ) pxNextTCB - > ulRunTimeCounter ) ;
}
# endif
}
}
}
strcat ( ( char * ) pcWriteBuffer , ( char * ) pcStatsString ) ;
strcat ( ( char * ) pcWriteBuffer , ( char * ) pcStatsString ) ;