Changeset ba068c0


Ignore:
Timestamp:
Sep 9, 2023, 2:11:23 PM (8 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
fc9f514
Parents:
5cfb8b1
Message:

rename clock routines processor and program to processor_cpu and program_cpu to deal with name clash with processor

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/clock.hfa

    r5cfb8b1 rba068c0  
    1010// Created On       : Thu Apr 12 14:36:06 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr 18 08:12:16 2021
    13 // Update Count     : 28
     12// Last Modified On : Sat Sep  9 14:07:17 2023
     13// Update Count     : 30
    1414//
    1515
     
    9191        // discontinuous jumps when the OS is not running the kernal thread. A duration is returned because the value is
    9292        // relative and cannot be converted to real-time (wall-clock) time.
    93         Duration processor() {                                                          // non-monotonic duration of kernel thread
     93        Duration processor_cpu() {                                                      // non-monotonic duration of kernel thread
    9494                timespec ts;
    9595                clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts );
    9696                return (Duration){ ts };
    97         } // processor
     97        } // processor_cpu
    9898
    9999        // Program CPU-time watch measures CPU time consumed by all processors (kernel threads) in the UNIX process.  This
    100100        // watch is affected by discontinuous jumps when the OS is not running the kernel threads. A duration is returned
    101101        // because the value is relative and cannot be converted to real-time (wall-clock) time.
    102         Duration program() {                                                            // non-monotonic duration of program CPU
     102        Duration program_cpu() {                                                        // non-monotonic duration of program CPU
    103103                timespec ts;
    104104                clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &ts );
    105105                return (Duration){ ts };
    106         } // program
     106        } // program_cpu
    107107
    108108        // Monotonic duration from machine boot and including system suspension. This watch is unaffected by discontinuous
  • libcfa/src/concurrency/kernel/cluster.hfa

    r5cfb8b1 rba068c0  
    3131
    3232// warn normally all ints
    33 #define warn_large_before warnf( !strict || old_avg < 33_000_000_000, "Suspiciously large previous average: %'llu (%llx), %'" PRId64 "ms \n", old_avg, old_avg, program()`ms )
    34 #define warn_large_after warnf( !strict || ret < 33_000_000_000, "Suspiciously large new average after %'" PRId64 "ms cputime: %'llu (%llx) from %'llu-%'llu (%'llu, %'llu) and %'llu\n", program()`ms, ret, ret, currtsc, intsc, new_val, new_val / 1000000, old_avg )
     33#define warn_large_before warnf( !strict || old_avg < 33_000_000_000, "Suspiciously large previous average: %'llu (%llx), %'" PRId64 "ms \n", old_avg, old_avg, program_cpu()`ms )
     34#define warn_large_after warnf( !strict || ret < 33_000_000_000, "Suspiciously large new average after %'" PRId64 "ms cputime: %'llu (%llx) from %'llu-%'llu (%'llu, %'llu) and %'llu\n", program_cpu()`ms, ret, ret, currtsc, intsc, new_val, new_val / 1000000, old_avg )
    3535
    3636// 8X linear factor is just 8 * x
     
    4242static inline __readyQ_avg_t __to_readyQ_avg(unsigned long long intsc) { if(unlikely(0 == intsc)) return 0.0; else return log2((__readyQ_avg_t)intsc); }
    4343
    44 #define warn_large_before warnf( !strict || old_avg < 35.0, "Suspiciously large previous average: %'lf, %'" PRId64 "ms \n", old_avg, program()`ms )
    45 #define warn_large_after warnf( !strict || ret < 35.3, "Suspiciously large new average after %'" PRId64 "ms cputime: %'lf from %'llu-%'llu (%'llu, %'llu) and %'lf\n", program()`ms, ret, currtsc, intsc, new_val, new_val / 1000000, old_avg ); \
     44#define warn_large_before warnf( !strict || old_avg < 35.0, "Suspiciously large previous average: %'lf, %'" PRId64 "ms \n", old_avg, program_cpu()`ms )
     45#define warn_large_after warnf( !strict || ret < 35.3, "Suspiciously large new average after %'" PRId64 "ms cputime: %'lf from %'llu-%'llu (%'llu, %'llu) and %'lf\n", program_cpu()`ms, ret, currtsc, intsc, new_val, new_val / 1000000, old_avg ); \
    4646verify(ret >= 0)
    4747
Note: See TracChangeset for help on using the changeset viewer.