diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-02-06 23:15:57 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-02-06 23:15:57 +0000 |
commit | 6728035e8b29b78debc7ea7773f9d169b2968c65 (patch) | |
tree | c820982046a714996431a4993f491f4193848afa /cpukit/libmisc/cpuuse | |
parent | 2008-02-06 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-6728035e8b29b78debc7ea7773f9d169b2968c65.tar.bz2 |
2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/printk.c: Added width and padding for %s.
* libmisc/cpuuse/cpuusagereport.c: Support object names that are
strings longer than 4 chanracters.
Diffstat (limited to 'cpukit/libmisc/cpuuse')
-rw-r--r-- | cpukit/libmisc/cpuuse/cpuusagereport.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereport.c b/cpukit/libmisc/cpuuse/cpuusagereport.c index 3fee85c269..bdf8f81f5d 100644 --- a/cpukit/libmisc/cpuuse/cpuusagereport.c +++ b/cpukit/libmisc/cpuuse/cpuusagereport.c @@ -51,7 +51,7 @@ void rtems_cpu_usage_report_with_plugin( uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; - char name[5]; + char name[13]; uint32_t ival, fval; #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec uptime, total, ran; @@ -88,9 +88,9 @@ void rtems_cpu_usage_report_with_plugin( (*print)( context, "CPU Usage by thread\n" #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) - " ID NAME SECONDS PERCENT\n" + " ID NAME SECONDS PERCENT\n" #else - " ID NAME TICKS PERCENT\n" + " ID NAME TICKS PERCENT\n" #endif ); @@ -109,7 +109,12 @@ void rtems_cpu_usage_report_with_plugin( rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); - (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); + (*print)( + context, + "0x%08" PRIx32 " %-12s ", + the_thread->Object.id, + name + ); #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* |