change log for rtems (2011-09-15)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Sep 15 15:10:34 UTC 2011
*sh*:
2011-09-15 Sebastian Huber <sebastian.huber at embedded-brains.de>
* cpukit/libmisc/cpuuse/cpuuse.h,
cpukit/libmisc/cpuuse/cpuusagedata.c,
cpukit/libmisc/cpuuse/cpuusagereport.c,
cpukit/libmisc/cpuuse/cpuusagereset.c: Fixed timestamp usage.
M 1.2920 cpukit/ChangeLog
M 1.4 cpukit/libmisc/cpuuse/cpuusagedata.c
M 1.24 cpukit/libmisc/cpuuse/cpuusagereport.c
M 1.9 cpukit/libmisc/cpuuse/cpuusagereset.c
M 1.11 cpukit/libmisc/cpuuse/cpuuse.h
diff -u rtems/cpukit/ChangeLog:1.2919 rtems/cpukit/ChangeLog:1.2920
--- rtems/cpukit/ChangeLog:1.2919 Wed Sep 14 09:16:56 2011
+++ rtems/cpukit/ChangeLog Thu Sep 15 09:34:19 2011
@@ -1,3 +1,10 @@
+2011-09-15 Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+ * cpukit/libmisc/cpuuse/cpuuse.h,
+ cpukit/libmisc/cpuuse/cpuusagedata.c,
+ cpukit/libmisc/cpuuse/cpuusagereport.c,
+ cpukit/libmisc/cpuuse/cpuusagereset.c: Fixed timestamp usage.
+
2011-09-14 Sebastian Huber <sebastian.huber at embedded-brains.de>
PR 1898/cpukit
diff -u rtems/cpukit/libmisc/cpuuse/cpuusagedata.c:1.3 rtems/cpukit/libmisc/cpuuse/cpuusagedata.c:1.4
--- rtems/cpukit/libmisc/cpuuse/cpuusagedata.c:1.3 Wed Dec 2 12:22:18 2009
+++ rtems/cpukit/libmisc/cpuuse/cpuusagedata.c Thu Sep 15 09:34:20 2011
@@ -15,14 +15,10 @@
#include "config.h"
#endif
-#include <rtems.h>
#include <rtems/cpuuse.h>
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- #include <rtems/score/timespec.h>
-#endif
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- struct timespec CPU_usage_Uptime_at_last_reset;
+ Timestamp_Control CPU_usage_Uptime_at_last_reset;
#else
uint32_t CPU_usage_Ticks_at_last_reset;
#endif
diff -u rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.23 rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.24
--- rtems/cpukit/libmisc/cpuuse/cpuusagereport.c:1.23 Tue Jun 28 15:39:39 2011
+++ rtems/cpukit/libmisc/cpuuse/cpuusagereport.c Thu Sep 15 09:34:21 2011
@@ -15,8 +15,6 @@
#include "config.h"
#endif
-#include <rtems.h>
-
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -24,17 +22,6 @@
#include <inttypes.h>
#include <rtems/cpuuse.h>
-#include <rtems/bspIo.h>
-
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- #include <rtems/score/timestamp.h>
-#endif
-
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- extern Timestamp_Control CPU_usage_Uptime_at_last_reset;
-#else
- extern uint32_t CPU_usage_Ticks_at_last_reset;
-#endif
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
static bool is_executing_on_a_core(
@@ -77,6 +64,7 @@
uint32_t ival, fval;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
+ uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
@@ -171,11 +159,12 @@
* Print the information
*/
+ seconds = _Timestamp_Get_seconds( &ran );
+ nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
+ TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
"%7" PRIu32 ".%06" PRIu32 " |%4" PRIu32 ".%03" PRIu32 "\n",
- _Timestamp_Get_seconds( &ran ),
- _Timestamp_Get_nanoseconds( &ran ) /
- TOD_NANOSECONDS_PER_MICROSECOND,
+ seconds, nanoseconds,
ival, fval
);
}
@@ -204,13 +193,15 @@
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
+ seconds = _Timestamp_Get_seconds( &total );
+ nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
+ TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
context,
"------------+----------------------------------------+---------------+---------\n"
" TIME SINCE LAST CPU USAGE RESET IN SECONDS: %7" PRIu32 ".%06" PRIu32 "\n"
"-------------------------------------------------------------------------------\n",
- _Timestamp_Get_seconds( &total ),
- _Timestamp_Get_nanoseconds( &total ) / TOD_NANOSECONDS_PER_MICROSECOND
+ seconds, nanoseconds
);
#else
(*print)(
diff -u rtems/cpukit/libmisc/cpuuse/cpuusagereset.c:1.8 rtems/cpukit/libmisc/cpuuse/cpuusagereset.c:1.9
--- rtems/cpukit/libmisc/cpuuse/cpuusagereset.c:1.8 Wed Dec 2 12:22:18 2009
+++ rtems/cpukit/libmisc/cpuuse/cpuusagereset.c Thu Sep 15 09:34:21 2011
@@ -15,9 +15,6 @@
#include "config.h"
#endif
-#include <rtems.h>
-#include <rtems/score/timestamp.h>
-
#include <stdlib.h>
#include <ctype.h>
#include <inttypes.h>
@@ -36,15 +33,6 @@
}
/*
- * External data that is shared by cpu usage code but not declared in .h files.
- */
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- extern Timestamp_Control CPU_usage_Uptime_at_last_reset;
-#else
- extern uint32_t CPU_usage_Ticks_at_last_reset;
-#endif
-
-/*
* rtems_cpu_usage_reset
*/
void rtems_cpu_usage_reset( void )
diff -u rtems/cpukit/libmisc/cpuuse/cpuuse.h:1.10 rtems/cpukit/libmisc/cpuuse/cpuuse.h:1.11
--- rtems/cpukit/libmisc/cpuuse/cpuuse.h:1.10 Fri Jun 24 12:52:56 2011
+++ rtems/cpukit/libmisc/cpuuse/cpuuse.h Thu Sep 15 09:34:21 2011
@@ -19,12 +19,23 @@
#ifndef __RTEMS_CPUUSE_h
#define __RTEMS_CPUUSE_h
+#include <rtems.h>
#include <rtems/bspIo.h>
+#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
+ #include <rtems/score/timestamp.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
+#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
+ extern Timestamp_Control CPU_usage_Uptime_at_last_reset;
+#else
+ extern uint32_t CPU_usage_Ticks_at_last_reset;
+#endif
+
/*
* rtems_cpu_usage_report_with_handler
*/
--
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/20110915/aff083a9/attachment.html>
More information about the vc
mailing list