Ignore:
Timestamp:
May 27, 2015, 3:13:58 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
e0938c2
Parents:
80fca28
git-author:
Joel Sherrill <joel.sherrill@…> (05/27/15 15:13:58)
git-committer:
Joel Sherrill <joel.sherrill@…> (06/15/15 18:20:17)
Message:

Remove use ticks for statistics configure option.

This was obsolete and broken based upon recent time keeping changes.

Thie build option was previously enabled by adding
USE_TICKS_FOR_STATISTICS=1 to the configure command line.

This propagated into the code as preprocessor conditionals
using the RTEMS_USE_TICKS_FOR_STATISTICS conditional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/cpuuse/cpuusagereset.c

    r80fca28 re6b31b27  
    2828)
    2929{
    30   #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    31     _Timestamp_Set_to_zero( &the_thread->cpu_time_used );
    32   #else
    33     the_thread->cpu_time_used = 0;
    34   #endif
     30  _Timestamp_Set_to_zero( &the_thread->cpu_time_used );
    3531}
    3632
     
    4036void rtems_cpu_usage_reset( void )
    4137{
    42   #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    43     uint32_t cpu_count;
    44     uint32_t cpu_index;
     38  uint32_t cpu_count;
     39  uint32_t cpu_index;
    4540
    46     _TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
     41  _TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
    4742
    48     cpu_count = rtems_get_processor_count();
    49     for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
    50       Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
     43  cpu_count = rtems_get_processor_count();
     44  for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
     45    Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
    5146
    52       cpu->time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
    53     }
    54   #else
    55     CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
    56   #endif
     47    cpu->time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
     48  }
    5749
    5850  rtems_iterate_over_all_threads(CPU_usage_Per_thread_handler);
Note: See TracChangeset for help on using the changeset viewer.