Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


Suggestion for Task Profiling - Exec Cnt

Posted by https://me.yahoo.com/a/Totshr9t on January 26, 2012
re: LPC1765

I got the Task Runtime Stats and Task List profiling setup and working very easy. That is great. Dumping everything out my UART0. However, the only parameter I miss is seeing a count on the number of times a task has been called - the execution count. Exec Time and Duty Cycle helps, but there are occasions where seeing the exact number of times a task has been run is of vital interest.

Just a suggestion.

Thanks, Chris.

RE: Suggestion for Task Profiling - Exec Cnt

Posted by Richard Damon on January 26, 2012
Note that unless you are deleting the task and then recreating it, a given task is only run once. (and if you delete and recreate a task it really is a new task). Tasks normally have a loop inside of them, but that is outside of the view of FreeRTOS. If you want to keep trace of the number of time the task has looped, just add a counter in your code.

RE: Suggestion for Task Profiling - Exec Cnt

Posted by Dave on January 26, 2012
I read the OP to mean a count of the number of times the task is scheduled to run, so if it moves from Block to Running state the counter would increment. Is that right? If so, it sounds like a good idea although it would add a bit to the context switch code, you should add it to the features request tracker in sourceforge.

It could be done using trace macros too.

RE: Suggestion for Task Profiling - Exec Cnt

Posted by https://me.yahoo.com/a/Totshr9t on January 27, 2012
I wrote my own Performance Monitor module for FreeRTOS a few years ago, because it did not have one at the time. There is an easy way to keep track of how many times a task runs. It is really the same kind of thing as keeping track of how much time is spent in a task. If you can do that, you already have all the info necessary to know how many times it has run. It is automatic. Most other RTOS performance monitors all have this feature.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists