change log for rtems (2010-12-16)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Dec 16 16:10:27 UTC 2010
*sh*:
2010-12-16 Sebastian Huber <sebastian.huber at embedded-brains.de>
* libmisc/cpuuse/cpuusagereport.c: We have to take the time since the
last context switch before the uptime.
M 1.2665 cpukit/ChangeLog
M 1.18 cpukit/libmisc/cpuuse/cpuusagereport.c
diff -u rtems/cpukit/ChangeLog:1.2664 rtems/cpukit/ChangeLog:1.2665
--- rtems/cpukit/ChangeLog:1.2664 Thu Dec 16 08:50:11 2010
+++ rtems/cpukit/ChangeLog Thu Dec 16 09:46:34 2010
@@ -1,5 +1,10 @@
2010-12-16 Sebastian Huber <sebastian.huber at embedded-brains.de>
+ * libmisc/cpuuse/cpuusagereport.c: We have to take the time since the
+ last context switch before the uptime.
+
+2010-12-16 Sebastian Huber <sebastian.huber at embedded-brains.de>
+
* score/src/watchdognanoseconds.c: New file.
* score/Makefile.am: Reflect change above.
* score/include/rtems/score/watchdog.h, score/src/coretodget.c,
diff -u rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.17 rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.18
--- rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.17 Tue Nov 23 09:26:52 2010
+++ rtems/cpukit/libmisc/cpuuse/cpuusagereport.c Thu Dec 16 09:46:34 2010
@@ -53,7 +53,7 @@
char name[13];
uint32_t ival, fval;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- Timestamp_Control uptime, total, ran;
+ Timestamp_Control uptime, total, ran, last_context_switch;
#else
uint32_t total_units = 0;
#endif
@@ -67,6 +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 );
#else
@@ -132,9 +133,7 @@
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
- _Timestamp_Subtract(
- &_Thread_Time_of_last_context_switch, &uptime, &used
- );
+ _Timestamp_Subtract( &last_context_switch, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
};
_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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20101216/5c1b3b4f/attachment.html>
More information about the vc
mailing list