change log for rtems (2011-03-07)

Joel Sherrill joel.sherrill at OARcorp.com
Mon Mar 7 15:27:05 UTC 2011


Should this have a PR and be applied to 4.10?

--joel

On 03/07/2011 09:10 AM, rtems-vc at rtems.org wrote:
> *sh*
> 2011-03-07	Sebastian Huber<sebastian.huber at embedded-brains.de>
>
> 	* libmisc/cpuuse/cpuusagereport.c: Fix calculation in case a thread
> 	dispatch happends in the meantime.  The percent values will not sum up
> 	to one hundred percent.
> M 
> <http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2763&r2=text&tr2=1.2764&diff_format=h> 
> 	1.2764 	cpukit/ChangeLog
> M 
> <http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/cpuuse/cpuusagereport.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h> 
> 	1.19 	cpukit/libmisc/cpuuse/cpuusagereport.c
>
> diff -u rtems/cpukit/ChangeLog:1.2763 rtems/cpukit/ChangeLog:1.2764
> --- rtems/cpukit/ChangeLog:1.2763	Mon Mar  7 07:54:44 2011
> +++ rtems/cpukit/ChangeLog	Mon Mar  7 08:55:04 2011
> @@ -2,6 +2,9 @@
>
>   	* include/rtems/irq-extension.h: Documentation.
>   	* libmisc/monitor/mon-prmisc.c: Fix for multiprocessing configuration.
> +	* libmisc/cpuuse/cpuusagereport.c: Fix calculation in case a thread
> +	dispatch happends in the meantime.  The percent values will not sum up
> +	to one hundred percent.
>
>   2011-03-04	Ralf Corsépius<ralf.corsepius at rtems.org>
>
>
> diff -u rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.18 rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.19
> --- rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.18	Thu Dec 16 09:46:34 2010
> +++ rtems/cpukit/libmisc/cpuuse/cpuusagereport.c	Mon Mar  7 08:55:05 2011
> @@ -53,7 +53,7 @@
>     char                 name[13];
>     uint32_t             ival, fval;
>     #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
> -    Timestamp_Control  uptime, total, ran, last_context_switch;
> +    Timestamp_Control  uptime, total, ran, uptime_at_last_reset;
>     #else
>       uint32_t           total_units = 0;
>     #endif
> @@ -67,9 +67,7 @@
>      *  guideline as to what each number means proportionally.
>      */
>     #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
> -    last_context_switch = _Thread_Time_of_last_context_switch;
> -    _TOD_Get_uptime(&uptime );
> -    _Timestamp_Subtract(&CPU_usage_Uptime_at_last_reset,&uptime,&total );
> +    uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
>     #else
>       for ( api_index = 1 ; api_index<= OBJECTS_APIS_LAST ; api_index++ ) {
>         #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
> @@ -133,9 +131,14 @@
>             ran = the_thread->cpu_time_used;
>             if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
>               Timestamp_Control used;
> -            _Timestamp_Subtract(&last_context_switch,&uptime,&used );
> +            Timestamp_Control last = _Thread_Time_of_last_context_switch;
> +            _TOD_Get_uptime(&uptime );
> +            _Timestamp_Subtract(&last,&uptime,&used );
>               _Timestamp_Add_to(&ran,&used );
> -          };
> +          } else {
> +            _TOD_Get_uptime(&uptime );
> +          }
> +          _Timestamp_Subtract(&uptime_at_last_reset,&uptime,&total );
>             _Timestamp_Divide(&ran,&total,&ival,&fval );
>
>             /*
>
> --
> Generated by Deluxe Loginfo 
> <http://www.codewiz.org/projects/index.html#loginfo> 2.122 by Bernardo 
> Innocenti <bernie at develer.com>
>


-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985





More information about the vc mailing list