mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
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:
parent
5fb26de019
commit
da5823e01a
2 changed files with 3 additions and 2 deletions
|
@ -1849,8 +1849,8 @@ void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unq
|
||||||
*
|
*
|
||||||
* vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the
|
* vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the
|
||||||
* uxTaskGetSystemState() output into a human readable table that displays 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
|
* task priority and amount of time each task has spent in the Running state
|
||||||
* percentage terms.
|
* in both absolute and percentage terms.
|
||||||
*
|
*
|
||||||
* vTaskGetRunTimeStats() has a dependency on the sprintf() C library function
|
* vTaskGetRunTimeStats() has a dependency on the sprintf() C library function
|
||||||
* that might bloat the code size, use a lot of stack, and provide different
|
* that might bloat the code size, use a lot of stack, and provide different
|
||||||
|
|
1
tasks.c
1
tasks.c
|
@ -4590,6 +4590,7 @@ static void prvResetNextTaskUnblockTime( void )
|
||||||
* spaces so it can be printed in tabular form more
|
* spaces so it can be printed in tabular form more
|
||||||
* easily. */
|
* easily. */
|
||||||
pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );
|
pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );
|
||||||
|
pcWriteBuffer += sprintf( pcWriteBuffer, "\t\t%u", ( unsigned int ) pxTaskStatusArray[ x ].uxBasePriority );
|
||||||
|
|
||||||
if( ulStatsAsPercentage > 0UL )
|
if( ulStatsAsPercentage > 0UL )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue