Changeset 8677cf7 in rtems


Ignore:
Timestamp:
Sep 6, 2007, 10:09:18 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d1b3c44
Parents:
a7ff7e7
Message:

2007-09-06 Joel Sherrill <joel.sherrill@…>

  • rtems/src/ratemonperiod.c: Clean up.
  • rtems/src/ratemonreportstatistics.c: Clarify period statistics output.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    ra7ff7e7 r8677cf7  
     12007-09-06      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * rtems/src/ratemonperiod.c: Clean up.
     4        * rtems/src/ratemonreportstatistics.c: Clarify period statistics output.
     5
    162007-09-06      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • cpukit/rtems/src/ratemonperiod.c

    ra7ff7e7 r8677cf7  
    6767  #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
    6868    period_start               = the_period->time_at_period;
     69    _Timespec_Subtract( &period_start, &uptime, &since_last_period );
    6970    the_period->time_at_period = uptime;
    70     _Timespec_Subtract( &period_start, &uptime, &since_last_period );
    7171  #else
    7272    ticks_since_last_period =
     
    123123    if ( _Timespec_Greater_than( &executed, &stats->max_cpu_time ) )
    124124      stats->max_cpu_time = executed;
    125 
    126125  #else
    127126    stats->total_cpu_time  += ticks_executed_since_last_period;
     
    149148    _Timespec_Add_to( &stats->total_wall_time, &since_last_period );
    150149
    151     if ( _Timespec_Less_than( &since_last_period, &stats->min_wall_time ) ) 
     150    if ( _Timespec_Less_than( &since_last_period, &stats->min_wall_time ) )
    152151      stats->min_wall_time = since_last_period;
    153152
    154     if ( _Timespec_Greater_than( &since_last_period, &stats->max_wall_time ) ) 
     153    if ( _Timespec_Greater_than( &since_last_period, &stats->max_wall_time ) )
    155154      stats->max_wall_time = since_last_period;
    156155  #endif
     
    261260              );
    262261
    263               /* thread had executed before the last context switch also */
     262              /* The thread had executed before the last context switch also.
     263               *   
     264               *     the_period->owner_executed_at_period += ran
     265               */
    264266              _Timespec_Add_to( &the_period->owner_executed_at_period, &ran );
    265267            }
  • cpukit/rtems/src/ratemonreportstatistics.c

    ra7ff7e7 r8677cf7  
    2828
    2929  /* We print to 1/10's of milliseconds */
    30   #define NANOSECONDS_DIVIDER 100000
    31   #define PERCENT_FMT "%04" PRId32
     30  #define NANOSECONDS_DIVIDER 1000
     31  #define PERCENT_FMT     "%04" PRId32
     32  #define NANOSECONDS_FMT "%" PRId32
    3233#endif
    3334
     
    4950
    5051  printk( "Period information by period\n" );
     52#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
     53  printk( "--- Period times are seconds:microseconds ---\n" );
     54#endif
     55   
     56#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     57  printk( "--- CPU Usage times are seconds:microseconds ---\n" );
     58#endif
    5159/*
    5260Layout by columns -- in memory of Hollerith :)
     
    5866  Uncomment the following if you are tinkering with the formatting.
    5967  Be sure to test the various cases.
     68*/
    6069  printk("\
    61701234567890123456789012345678901234567890123456789012345678901234567890123456789\
    6271\n");
    63 */
    6472  printk( "   ID     OWNER COUNT MISSED     CPU TIME     "
    6573       #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     
    120128      );
    121129      printk(
    122         "%" PRId32 "." PERCENT_FMT "/"        /* min cpu time */
    123         "%" PRId32 "." PERCENT_FMT "/"        /* max cpu time */
    124         "%" PRId32 "." PERCENT_FMT " ",       /* avg cpu time */
     130        "%" PRId32 ":"  NANOSECONDS_FMT "/"        /* min cpu time */
     131        "%" PRId32 ":"  NANOSECONDS_FMT "/"        /* max cpu time */
     132        "%" PRId32 ":"  NANOSECONDS_FMT " ",       /* avg cpu time */
    125133        the_stats.min_cpu_time.tv_sec,
    126134          the_stats.min_cpu_time.tv_nsec / NANOSECONDS_DIVIDER,
     
    156164      );
    157165      printk(
    158         "%" PRId32 "." PERCENT_FMT "/"        /* min wall time */
    159         "%" PRId32 "." PERCENT_FMT "/"        /* max wall time */
    160         "%" PRId32 "." PERCENT_FMT "\n",      /* avg wall time */
     166        "%" PRId32 ":" PERCENT_FMT "/"        /* min wall time */
     167        "%" PRId32 ":" PERCENT_FMT "/"        /* max wall time */
     168        "%" PRId32 ":" PERCENT_FMT "\n",      /* avg wall time */
    161169        the_stats.min_wall_time.tv_sec,
    162170          the_stats.min_wall_time.tv_nsec / NANOSECONDS_DIVIDER,
Note: See TracChangeset for help on using the changeset viewer.