Print task priority value in vTaskGetRunTimeStats()

Show task priority for better understanding of task run time consumption
with context of task priority
This commit is contained in:
Vasyl Gomonovych 2020-10-19 11:18:19 +02:00
parent 5fb26de019
commit da5823e01a
2 changed files with 3 additions and 2 deletions

View file

@ -1849,8 +1849,8 @@ void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unq
*
* vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the
* uxTaskGetSystemState() output into a human readable table that displays the
* amount of time each task has spent in the Running state in both absolute and
* percentage terms.
* task priority and amount of time each task has spent in the Running state
* in both absolute and percentage terms.
*
* vTaskGetRunTimeStats() has a dependency on the sprintf() C library function
* that might bloat the code size, use a lot of stack, and provide different

View file

@ -4590,6 +4590,7 @@ static void prvResetNextTaskUnblockTime( void )
* spaces so it can be printed in tabular form more
* easily. */
pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );
pcWriteBuffer += sprintf( pcWriteBuffer, "\t\t%u", ( unsigned int ) pxTaskStatusArray[ x ].uxBasePriority );
if( ulStatsAsPercentage > 0UL )
{