FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2014 Threads] Processor occupancy tracing: why isn't it there?Posted by erupter on June 13, 2014 I'm thinking about using the TASKSWITCHEDIN/OUT macros to record the time spent in processing time by each task.
This is something available on every operating system and I wonder why that isn't part of the normal tracing capabilities.
Surely there is a reason for not including such a functionality by default?
Processor occupancy tracing: why isn't it there?Posted by davedoors on June 13, 2014 http://www.freertos.org/rtos-run-time-stats.html
You just have to fill in the macro that returns the time stamp, which can't be part of the standard kernel code because where it comes from depends on the mcu you are using and which timers are free on that mcu. There are some standard ways of providing the time stamp on Cortex mcus that use raw systick timer values.
you can also look at http://www.freertos.org/uxTaskGetSystemState.html and http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusTrace/FreeRTOSPlusTrace.shtml
Processor occupancy tracing: why isn't it there?Posted by erupter on June 13, 2014 Thanks Dave
I'm again getting up to speed on FreeRTOS after years, and I totally forgot about this -_-
By looking into my old code I had the runtime stats setup already, with the core timer and everything.
I'm getting old :P
I remember reading something about the impact of the tracing features, but can't find it. Do you know anything about this?
Processor occupancy tracing: why isn't it there?Posted by davedoors on June 13, 2014 The timing impact? Well, as with all the features that add code (stack overflow detection, assert points, and the like) there is a code size and execution speed impact. The impact of gathering run time information depends on the implementation of the function that returns the time stamp. If it is simply reading a register then the impact will be one read, and one write, per context switch (actually, probably a little more). If the time stamp needs to be pre-processed then the impact will be higher.
Formatting statistical information into human readable table is another matter. That takes a long time and is not really something you want to be doing outside of your debug code.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|