summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/ratemonreportstatistics.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-06 22:09:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-06 22:09:18 +0000
commit8677cf75e577ce98a3e72087dcbdda0c83a0330c (patch)
treeb74f7e170cd60b8172f85fdc5771dae647d18e60 /cpukit/rtems/src/ratemonreportstatistics.c
parent2007-09-06 Daniel Hellstrom <daniel@gaisler.com> (diff)
downloadrtems-8677cf75e577ce98a3e72087dcbdda0c83a0330c.tar.bz2
2007-09-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/src/ratemonperiod.c: Clean up. * rtems/src/ratemonreportstatistics.c: Clarify period statistics output.
Diffstat (limited to 'cpukit/rtems/src/ratemonreportstatistics.c')
-rw-r--r--cpukit/rtems/src/ratemonreportstatistics.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/cpukit/rtems/src/ratemonreportstatistics.c b/cpukit/rtems/src/ratemonreportstatistics.c
index 35f3c6d30b..7e03105e1a 100644
--- a/cpukit/rtems/src/ratemonreportstatistics.c
+++ b/cpukit/rtems/src/ratemonreportstatistics.c
@@ -27,8 +27,9 @@
#include <rtems/score/timespec.h>
/* We print to 1/10's of milliseconds */
- #define NANOSECONDS_DIVIDER 100000
- #define PERCENT_FMT "%04" PRId32
+ #define NANOSECONDS_DIVIDER 1000
+ #define PERCENT_FMT "%04" PRId32
+ #define NANOSECONDS_FMT "%" PRId32
#endif
/*
@@ -48,6 +49,13 @@ void rtems_rate_monotonic_report_statistics( void )
char name[5];
printk( "Period information by period\n" );
+#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
+ printk( "--- Period times are seconds:microseconds ---\n" );
+#endif
+
+#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
+ printk( "--- CPU Usage times are seconds:microseconds ---\n" );
+#endif
/*
Layout by columns -- in memory of Hollerith :)
@@ -57,10 +65,10 @@ ididididid NNNN ccccc mmmmmm X
Uncomment the following if you are tinkering with the formatting.
Be sure to test the various cases.
+*/
printk("\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
-*/
printk( " ID OWNER COUNT MISSED CPU TIME "
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
" "
@@ -119,9 +127,9 @@ ididididid NNNN ccccc mmmmmm X
&cpu_average
);
printk(
- "%" PRId32 "." PERCENT_FMT "/" /* min cpu time */
- "%" PRId32 "." PERCENT_FMT "/" /* max cpu time */
- "%" PRId32 "." PERCENT_FMT " ", /* avg cpu time */
+ "%" PRId32 ":" NANOSECONDS_FMT "/" /* min cpu time */
+ "%" PRId32 ":" NANOSECONDS_FMT "/" /* max cpu time */
+ "%" PRId32 ":" NANOSECONDS_FMT " ", /* avg cpu time */
the_stats.min_cpu_time.tv_sec,
the_stats.min_cpu_time.tv_nsec / NANOSECONDS_DIVIDER,
the_stats.max_cpu_time.tv_sec,
@@ -155,9 +163,9 @@ ididididid NNNN ccccc mmmmmm X
&wall_average
);
printk(
- "%" PRId32 "." PERCENT_FMT "/" /* min wall time */
- "%" PRId32 "." PERCENT_FMT "/" /* max wall time */
- "%" PRId32 "." PERCENT_FMT "\n", /* avg wall time */
+ "%" PRId32 ":" PERCENT_FMT "/" /* min wall time */
+ "%" PRId32 ":" PERCENT_FMT "/" /* max wall time */
+ "%" PRId32 ":" PERCENT_FMT "\n", /* avg wall time */
the_stats.min_wall_time.tv_sec,
the_stats.min_wall_time.tv_nsec / NANOSECONDS_DIVIDER,
the_stats.max_wall_time.tv_sec,