Print task priority value in vTaskGetRunTimeStats()

Show task priority for better understanding of task run time consumption
This commit is contained in:
Vasyl Gomonovych 2020-10-15 15:12:32 +02:00
parent bda9869271
commit b9b6987344
2 changed files with 3 additions and 2 deletions

View file

@ -1741,8 +1741,8 @@
*
* 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

@ -4601,6 +4601,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 )
{