diff options
author | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2009-12-02 18:15:16 +0000 |
---|---|---|
committer | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2009-12-02 18:15:16 +0000 |
commit | c6f7e060eaeb951a86dc640855e88c6f8260a347 (patch) | |
tree | 7d6ef3b0be5fec6206861601980974b5749baa04 /cpukit/libmisc/cpuuse/cpuusagereport.c | |
parent | 2009-12-02 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-c6f7e060eaeb951a86dc640855e88c6f8260a347.tar.bz2 |
2009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* configure.ac, libcsupport/src/__times.c,
libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c,
libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h,
rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c,
rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c,
rtems/src/ratemonreportstatistics.c,
score/include/rtems/score/thread.h, score/src/threaddispatch.c,
score/src/threadinitialize.c, score/src/threadtickletimeslice.c:
Changed the configuration of statistics granularity to use just one
define.
Diffstat (limited to 'cpukit/libmisc/cpuuse/cpuusagereport.c')
-rw-r--r-- | cpukit/libmisc/cpuuse/cpuusagereport.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereport.c b/cpukit/libmisc/cpuuse/cpuusagereport.c index 6d916e1cc0..84ee21fc07 100644 --- a/cpukit/libmisc/cpuuse/cpuusagereport.c +++ b/cpukit/libmisc/cpuuse/cpuusagereport.c @@ -27,11 +27,11 @@ #include <rtems/cpuuse.h> #include <rtems/bspIo.h> -#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ #include <rtems/score/timestamp.h> #endif -#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS +#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; @@ -53,7 +53,7 @@ void rtems_cpu_usage_report_with_plugin( Objects_Information *information; char name[13]; uint32_t ival, fval; - #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; @@ -67,7 +67,7 @@ void rtems_cpu_usage_report_with_plugin( * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ - #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); #else @@ -91,7 +91,7 @@ void rtems_cpu_usage_report_with_plugin( "-------------------------------------------------------------------------------\n" " CPU USAGE BY THREAD\n" "------------+----------------------------------------+---------------+---------\n" - #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " ID | NAME | SECONDS | PERCENT\n" #else " ID | NAME | TICKS | PERCENT\n" @@ -121,7 +121,7 @@ void rtems_cpu_usage_report_with_plugin( name ); - #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. @@ -152,7 +152,7 @@ void rtems_cpu_usage_report_with_plugin( uint64_t ival_64; ival_64 = the_thread->cpu_time_used; - ival_64 *= 10000; + ival_64 *= 100000; ival = ival_64 / total_units; } else { ival = 0; @@ -171,7 +171,7 @@ void rtems_cpu_usage_report_with_plugin( } } - #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "------------+----------------------------------------+---------------+---------\n" |