Changeset c6f7e060 in rtems


Ignore:
Timestamp:
Dec 2, 2009, 6:15:16 PM (9 years ago)
Author:
Glenn Humphrey <glenn.humphrey@…>
Branches:
4.10, 4.11, master
Children:
dca9a82
Parents:
97abdd2
Message:

2009-12-02 Glenn Humphrey <glenn.humphrey@…>

  • 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.
Location:
cpukit
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r97abdd2 rc6f7e060  
     12009-12-02      Glenn Humphrey <glenn.humphrey@OARcorp.com>
     2
     3        * configure.ac, libcsupport/src/__times.c,
     4        libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c,
     5        libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h,
     6        rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c,
     7        rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c,
     8        rtems/src/ratemonreportstatistics.c,
     9        score/include/rtems/score/thread.h, score/src/threaddispatch.c,
     10        score/src/threadinitialize.c, score/src/threadtickletimeslice.c:
     11        Changed the configuration of statistics granularity to use just one
     12        define.
     13
    1142009-12-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    215
  • cpukit/configure.ac

    r97abdd2 rc6f7e060  
    154154  ["]_RTEMS_VERSION["],
    155155  [RTEMS version string])
     156
     157RTEMS_CPUOPT([__RTEMS_USE_TICKS_FOR_STATISTICS__],
     158  [test x"${USE_TICKS_FOR_STATISTICS}" = x"1"],
     159  [1],
     160  [disable nanosecond granularity for statistics])
    156161
    157162RTEMS_CPUOPT([__RTEMS_USE_TICKS_CPU_USAGE_STATISTICS__],
  • cpukit/libcsupport/src/__times.c

    r97abdd2 rc6f7e060  
    2323#include <errno.h>
    2424#include <assert.h>
    25 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     25#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    2626  #include <rtems/score/timestamp.h>
    2727#endif
     
    5252   */
    5353
    54   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     54  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5555    {
    5656      Timestamp_Control per_tick;
  • cpukit/libmisc/cpuuse/cpuusagedata.c

    r97abdd2 rc6f7e060  
    1717
    1818#include <rtems.h>
    19 
    2019#include <rtems/cpuuse.h>
    21 
    22 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    23     defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     20#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    2421  #include <rtems/score/timespec.h>
    25 
    2622#endif
    2723
    28 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     24#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    2925  struct timespec    CPU_usage_Uptime_at_last_reset;
    3026#else
    3127  uint32_t           CPU_usage_Ticks_at_last_reset;
    3228#endif
    33 
  • cpukit/libmisc/cpuuse/cpuusagereport.c

    r97abdd2 rc6f7e060  
    2828#include <rtems/bspIo.h>
    2929
    30 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     30#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    3131  #include <rtems/score/timestamp.h>
    3232#endif
    3333
    34 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     34#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    3535  extern Timestamp_Control  CPU_usage_Uptime_at_last_reset;
    3636#else
     
    5454  char                 name[13];
    5555  uint32_t             ival, fval;
    56   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     56  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5757    Timestamp_Control  uptime, total, ran;
    5858  #else
     
    6868   *  guideline as to what each number means proportionally.
    6969   */
    70   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     70  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    7171    _TOD_Get_uptime( &uptime );
    7272    _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
     
    9292     "                              CPU USAGE BY THREAD\n"
    9393     "------------+----------------------------------------+---------------+---------\n"
    94      #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     94     #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    9595       " ID         | NAME                                   | SECONDS       | PERCENT\n"
    9696     #else
     
    122122        );
    123123
    124         #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     124        #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    125125          /*
    126126           * If this is the currently executing thread, account for time
     
    153153
    154154            ival_64 = the_thread->cpu_time_used;
    155             ival_64 *= 10000;
     155            ival_64 *= 100000;
    156156            ival = ival_64 / total_units;
    157157          } else {
     
    172172  }
    173173
    174   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     174  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    175175    (*print)(
    176176       context,
  • cpukit/libmisc/cpuuse/cpuusagereset.c

    r97abdd2 rc6f7e060  
    2929)
    3030{
    31   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     31  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    3232    _Timestamp_Set_to_zero( &the_thread->cpu_time_used );
    3333  #else
     
    3636}
    3737
    38 
    3938/*
    4039 * External data that is shared by cpu usage code but not declared in .h files.
    4140 */
    42 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     41#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    4342  extern Timestamp_Control CPU_usage_Uptime_at_last_reset;
    4443#else
     
    5150void rtems_cpu_usage_reset( void )
    5251{
    53   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     52  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5453    _TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
    5554    _Thread_Time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
  • cpukit/rtems/include/rtems/rtems/ratemon.h

    r97abdd2 rc6f7e060  
    5555#endif
    5656
    57 /*
    58  *  The user can define this at configure time and go back to ticks
    59  *  resolution.
    60  */
    61 #if !defined(__RTEMS_USE_TICKS_RATE_MONOTONIC_STATISTICS__)
    62   /**
    63    *  Enable the nanosecond accurate statistics
    64    *
    65    *  When not defined, the older style tick accurate granularity
    66    *  is used.
    67    */
    68   #define RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
    69 #endif
    70 
    7157/**
    7258 *  This is the public type used for the rate monotonic timing
    7359 *  statistics.
    7460 */
    75 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
     61#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    7662  #include <rtems/score/timespec.h>
    7763
     
    8571 *  statistics.
    8672 */
    87 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
     73#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    8874  #include <rtems/score/timestamp.h>
    8975
     
    436422 *  This method resets the statistics information for a period instance.
    437423 */
    438 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
     424#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    439425  #define _Rate_monotonic_Reset_wall_time_statistics( _the_period ) \
    440426     do { \
     
    459445 *  This helper method resets the period CPU usage statistics structure.
    460446 */
    461 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     447#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    462448  #define _Rate_monotonic_Reset_cpu_use_statistics( _the_period ) \
    463449     do { \
  • cpukit/rtems/include/rtems/rtems/types.h

    r97abdd2 rc6f7e060  
    125125 *
    126126 * When using nano seconds granularity timing, RTEMS may internally use a
    127  * variety of represenations.
    128  */
    129 #ifndef __RTEMS_USE_TICKS_CPU_USAGE_STATISTICS__
     127 * variety of representations.
     128 */
     129#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    130130  typedef struct timespec rtems_thread_cpu_usage_t;
    131131#else
     
    133133#endif
    134134
    135 
    136135/**
    137136 * @brief Data structure to manage and manipulate calendar time.
  • cpukit/rtems/src/ratemongetstatistics.c

    r97abdd2 rc6f7e060  
    6262      dst->count        = src->count;
    6363      dst->missed_count = src->missed_count;
    64       #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     64      #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    6565        _Timestamp_To_timespec( &src->min_cpu_time,   &dst->min_cpu_time );
    6666        _Timestamp_To_timespec( &src->max_cpu_time,   &dst->max_cpu_time );
    6767        _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
    68       #else
    69         statistics->min_wall_time   = src->min_wall_time;
    70         statistics->max_wall_time   = src->max_wall_time;
    71         statistics->total_wall_time = src->total_wall_time;
    72       #endif
    73 
    74       #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
    7568        _Timestamp_To_timespec( &src->min_wall_time,   &dst->min_wall_time );
    7669        _Timestamp_To_timespec( &src->max_wall_time,   &dst->max_wall_time );
    7770        _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
    7871      #else
     72        dst->min_cpu_time    = src->min_cpu_time;
     73        dst->max_cpu_time    = src->max_cpu_time;
     74        dst->total_cpu_time  = src->total_cpu_time;
    7975        dst->min_wall_time   = src->min_wall_time;
    8076        dst->max_wall_time   = src->max_wall_time;
  • cpukit/rtems/src/ratemongetstatus.c

    r97abdd2 rc6f7e060  
    2424#include <rtems/score/thread.h>
    2525
    26 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    27     defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     26#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    2827  #include <rtems/score/timespec.h>
    2928#endif
     
    5352  Objects_Locations              location;
    5453  Rate_monotonic_Control        *the_period;
    55   #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    56       defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     54  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5755    Timestamp_Control            uptime;
    5856    Timestamp_Control            temp;
     
    6967      status->state = the_period->state;
    7068
     69      /*
     70       *  If the period is inactive, there is no information.
     71       */
    7172      if ( status->state == RATE_MONOTONIC_INACTIVE ) {
    72         #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
     73        #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    7374          _Timespec_Set_to_zero( &status->since_last_period );
     75          _Timespec_Set_to_zero( &status->executed_since_last_period );
    7476        #else
    7577          status->since_last_period = 0;
    76         #endif
    77         #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
    78           _Timespec_Set_to_zero( &status->executed_since_last_period );
    79         #else
    8078          status->executed_since_last_period = 0;
    8179        #endif
     80
    8281      } else {
    83         /*
    84          *  Both nanoseconds granularity options have to know the uptime.
    85          *  This lets them share one single invocation of _TOD_Get_uptime().
    86          */
    87         #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    88             defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     82        #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    8983          _TOD_Get_uptime( &uptime );
    90         #endif
    91 
    92         #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
    9384          _Timestamp_Subtract( &the_period->time_at_period, &uptime, &temp );
    9485          _Timestamp_To_timespec( &temp, &status->since_last_period );
    95         #else
    96           status->since_last_period =
    97             _Watchdog_Ticks_since_boot - the_period->time_at_period;
    98         #endif
    99 
    100         #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
    10186          _Timestamp_Subtract(
    10287            &_Thread_Time_of_last_context_switch,
     
    10691          _Timestamp_To_timespec( &temp, &status->executed_since_last_period );
    10792        #else
     93          status->since_last_period =
     94            _Watchdog_Ticks_since_boot - the_period->time_at_period;
    10895          status->executed_since_last_period =
    10996            the_period->owner->cpu_time_used -
  • cpukit/rtems/src/ratemonperiod.c

    r97abdd2 rc6f7e060  
    3131
    3232  /*
    33    *  If any statistics are at nanosecond granularity, we need to
    34    *  obtain the uptime.
    35    */
    36   #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    37       defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
    38 
    39     struct timespec  uptime;
     33   *  If using nanosecond statistics, we need to obtain the uptime.
     34   */
     35  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
     36    Timestamp_Control  uptime;
    4037
    4138    _TOD_Get_uptime( &uptime );
     
    4542   *  Set the starting point and the CPU time used for the statistics.
    4643   */
    47   #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
     44  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    4845    the_period->time_at_period = uptime;
    4946  #else
     
    5451
    5552  /*
    56    *  If using nanosecond granularity for CPU Usage Statistics and the
    57    *  period's thread is currently executing, then we need to take into
    58    *  account how much time the executing thread has run since the last
    59    *  context switch.  When this routine is invoked from
    60    *  rtems_rate_monotonic_period, the owner will be the executing thread.
    61    *  When this routine is invoked from _Rate_monotonic_Timeout, it will not.
    62    */
    63   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     53   *  If using nanosecond statistics and the period's thread is currently
     54   *  executing, then we need to take into account how much time the
     55   *  executing thread has run since the last context switch.  When this
     56   *  routine is invoked from rtems_rate_monotonic_period, the owner will
     57   *  be the executing thread.  When this routine is invoked from
     58   *  _Rate_monotonic_Timeout, it will not.
     59   */
     60  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    6461    if (owning_thread == _Thread_Executing) {
    6562
     
    8683  Thread_CPU_usage_t              executed;
    8784  Rate_monotonic_Period_time_t    since_last_period;
    88   #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    89       defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
    90     Timestamp_Control             uptime;
    91 
    92     /*
    93      * Obtain the current time since boot
    94      */
     85
     86  /*
     87   *  If using nanosecond statistics, we need to obtain the uptime.
     88   */
     89  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
     90    Timestamp_Control  uptime;
     91
    9592    _TOD_Get_uptime( &uptime );
    9693  #endif
     
    114111   *  Grab basic information for time statistics.
    115112   */
    116   #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
     113  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    117114    _Timespec_Subtract(
    118115      &the_period->time_at_period,
     
    124121  #endif
    125122
    126   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     123  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    127124    {
    128125      Thread_CPU_usage_t ran, used;
     
    160157   *  Update CPU time
    161158   */
    162 
    163   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     159  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    164160    _Timestamp_Add_to( &stats->total_cpu_time, &executed );
    165161
     
    182178   *  Update Wall time
    183179   */
    184 
    185   #ifndef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
     180  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
     181    _Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
     182
     183    if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
     184      stats->min_wall_time = since_last_period;
     185
     186    if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
     187      stats->max_wall_time = since_last_period;
     188  #else
    186189
    187190    /* Sanity check wall time */
     
    195198
    196199    if ( since_last_period > stats->max_wall_time )
    197       stats->max_wall_time = since_last_period;
    198   #else
    199     _Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
    200 
    201     if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
    202       stats->min_wall_time = since_last_period;
    203 
    204     if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
    205200      stats->max_wall_time = since_last_period;
    206201  #endif
  • cpukit/rtems/src/ratemonreportstatistics.c

    r97abdd2 rc6f7e060  
    2424#include <rtems/score/timespec.h>
    2525
    26 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
    27     defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     26#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    2827  /* We print to 1/10's of milliseconds */
    2928  #define NANOSECONDS_DIVIDER 1000
     
    5554
    5655  (*print)( context, "Period information by period\n" );
    57   #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
     56  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5857    (*print)( context, "--- CPU times are in seconds ---\n" );
    59   #endif
    60   #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
    6158    (*print)( context, "--- Wall times are in seconds ---\n" );
    6259  #endif
     
    7572*/
    7673  (*print)( context, "   ID     OWNER COUNT MISSED     "
    77        #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     74       #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    7875          "     "
    7976       #endif
    8077          "CPU TIME     "
    81        #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
    82           "    "
    83        #endif
    84        #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
    85           "      "
     78       #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
     79          "          "
    8680       #endif
    8781          "   WALL TIME\n"
    8882  );
    8983  (*print)( context, "                               "
    90        #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     84       #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    9185          "     "
    9286       #endif
    9387          "MIN/MAX/AVG    "
    94        #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
    95           "    "
    96        #endif
    97        #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
    98           "      "
     88       #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
     89          "          "
    9990       #endif
    10091          "  MIN/MAX/AVG\n"
     
    142133     */
    143134    {
    144     #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     135    #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    145136      struct timespec  cpu_average;
    146137      struct timespec *min_cpu = &the_stats.min_cpu_time;
     
    178169     */
    179170    {
    180     #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
     171    #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    181172      struct timespec  wall_average;
    182173      struct timespec *min_wall = &the_stats.min_wall_time;
  • cpukit/score/include/rtems/score/thread.h

    r97abdd2 rc6f7e060  
    4848 *  resolution.
    4949 */
    50 #ifndef __RTEMS_USE_TICKS_CPU_USAGE_STATISTICS__
     50#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5151  #include <rtems/score/timestamp.h>
    52 
    53   /**
    54    *  This macro enables the nanosecond accurate statistics
    55    *
    56    *  When not defined, the older style tick accurate granularity
    57    *  is used.
    58    */
    59   #define RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
    6052
    6153  typedef Timestamp_Control Thread_CPU_usage_t;
     
    7668#include <rtems/score/tqdata.h>
    7769#include <rtems/score/watchdog.h>
    78 
    79 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
    80   /* XXX include something for timespec */
    81 #endif
    8270
    8371/**
     
    517505SCORE_EXTERN struct _reent **_Thread_libc_reent;
    518506
    519 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     507#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    520508
    521509  /**
  • cpukit/score/src/threaddispatch.c

    r97abdd2 rc6f7e060  
    3131#include <rtems/score/wkspace.h>
    3232
    33 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     33#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    3434  #include <rtems/score/timestamp.h>
    3535#endif
     
    103103    _ISR_Enable( level );
    104104
    105     #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     105    #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    106106      {
    107107        Timestamp_Control uptime, ran;
  • cpukit/score/src/threadinitialize.c

    r97abdd2 rc6f7e060  
    201201   *  Initialize the CPU usage statistics
    202202   */
    203   #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     203  #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    204204    _Timestamp_Set_to_zero( &the_thread->cpu_time_used );
    205205  #else
    206     the_thread->cpu_time_used         = 0;
     206    the_thread->cpu_time_used = 0;
    207207  #endif
    208208
  • cpukit/score/src/threadtickletimeslice.c

    r97abdd2 rc6f7e060  
    5050  executing = _Thread_Executing;
    5151
    52   #ifndef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
     52  #ifdef __RTEMS_USE_TICKS_FOR_STATISTICS__
    5353    /*
    5454     *  Increment the number of ticks this thread has been executing
Note: See TracChangeset for help on using the changeset viewer.