Changeset 875c26d in rtems


Ignore:
Timestamp:
Mar 21, 2016, 9:45:44 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
90960bd
Parents:
300eaad
Message:

rtems: Avoid RTEMS_USE_TICKS_FOR_STATISTICS

Option was removed by e6b31b27fbe3cd76534db2d4fc4ef5dcdf0d33b4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/ratemonperiod.c

    r300eaad r875c26d  
    124124   *  Update CPU time
    125125   */
    126   #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    127     _Timestamp_Add_to( &stats->total_cpu_time, &executed );
    128 
    129     if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
    130       stats->min_cpu_time = executed;
    131 
    132     if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
    133       stats->max_cpu_time = executed;
    134   #else
    135     stats->total_cpu_time  += executed;
    136 
    137     if ( executed < stats->min_cpu_time )
    138       stats->min_cpu_time = executed;
    139 
    140     if ( executed > stats->max_cpu_time )
    141       stats->max_cpu_time = executed;
    142   #endif
     126  _Timestamp_Add_to( &stats->total_cpu_time, &executed );
     127
     128  if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
     129    stats->min_cpu_time = executed;
     130
     131  if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
     132    stats->max_cpu_time = executed;
    143133
    144134  /*
    145135   *  Update Wall time
    146136   */
    147   #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    148     _Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
    149 
    150     if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
    151       stats->min_wall_time = since_last_period;
    152 
    153     if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
    154       stats->max_wall_time = since_last_period;
    155   #else
    156 
    157     /* Sanity check wall time */
    158     if ( since_last_period < executed )
    159       since_last_period = executed;
    160 
    161     stats->total_wall_time += since_last_period;
    162 
    163     if ( since_last_period < stats->min_wall_time )
    164       stats->min_wall_time = since_last_period;
    165 
    166     if ( since_last_period > stats->max_wall_time )
    167       stats->max_wall_time = since_last_period;
    168   #endif
     137  _Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
     138
     139  if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
     140    stats->min_wall_time = since_last_period;
     141
     142  if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
     143    stats->max_wall_time = since_last_period;
    169144}
    170145
Note: See TracChangeset for help on using the changeset viewer.