Révision | a65ce4736e25a838697a1e7c0d6b4cb3da312656 (tree) |
---|---|
l'heure | 2023-01-21 21:43:11 |
Auteur | phabrics <phabrics@phab...> |
Commiter | phabrics |
Fixed sun3 timer interrupt rate calculator.
@@ -475,10 +475,10 @@ _tme_am9513_th_timer(struct tme_am9513 *am9513) | ||
475 | 475 | tme_log(TME_AM9513_LOG_HANDLE(am9513), |
476 | 476 | 0, TME_OK, |
477 | 477 | (TME_AM9513_LOG_HANDLE(am9513), |
478 | - "timer %d interrupt rate: %ld/sec", | |
478 | + "timer %d interrupt rate: %ld %ld/sec", | |
479 | 479 | counter_i, |
480 | - (TME_TIME_SET_SEC(counter->tme_am9513_counter_int_sample) | |
481 | - / counter->tme_am9513_counter_int_sample_time))); | |
480 | + counter->tme_am9513_counter_int_sample, | |
481 | + TME_TIME_GET_SEC(counter->tme_am9513_counter_int_sample_time))); | |
482 | 482 | } |
483 | 483 | |
484 | 484 | /* reset the sample: */ |
@@ -91,7 +91,7 @@ _TME_RCSID("$Id: isil7170.c,v 1.6 2010/06/05 14:37:27 fredette Exp $"); | ||
91 | 91 | /* define this to track interrupt rates, reporting once every N |
92 | 92 | seconds: */ |
93 | 93 | #if 1 |
94 | -#define TME_ISIL7170_TRACK_INT_RATE (10) | |
94 | +#define TME_ISIL7170_TRACK_INT_RATE TME_TIME_SET_SEC(10) | |
95 | 95 | #endif |
96 | 96 | |
97 | 97 | #define TME_ISIL7170_LOG_HANDLE(am) (&(am)->tme_isil7170_element->tme_element_log_handle) |
@@ -336,13 +336,13 @@ _tme_isil7170_th_timer(struct tme_isil7170 *isil7170) | ||
336 | 336 | 0, TME_OK, |
337 | 337 | (TME_ISIL7170_LOG_HANDLE(isil7170), |
338 | 338 | "timer interrupt rate: %ld/sec", |
339 | - (isil7170->tme_isil7170_int_sample | |
340 | - / (TME_ISIL7170_TRACK_INT_RATE | |
341 | - + TME_TIME_GET_SEC(now - isil7170->tme_isil7170_int_sample_time))))); | |
339 | + (TME_TIME_SET_SEC(isil7170->tme_isil7170_int_sample) | |
340 | + / (now - (isil7170->tme_isil7170_int_sample_time - TME_ISIL7170_TRACK_INT_RATE | |
341 | + ))))); | |
342 | 342 | } |
343 | 343 | |
344 | 344 | /* reset the sample: */ |
345 | - now += TME_TIME_GET_SEC(TME_ISIL7170_TRACK_INT_RATE); | |
345 | + now += TME_ISIL7170_TRACK_INT_RATE; | |
346 | 346 | isil7170->tme_isil7170_int_sample_time = now; |
347 | 347 | isil7170->tme_isil7170_int_sample = 0; |
348 | 348 | } |
@@ -32,6 +32,13 @@ | ||
32 | 32 | |
33 | 33 | # Default values of various locations to download from/to. |
34 | 34 | |
35 | +# Machines to build in machine_root. Templates come from machine_dir and are | |
36 | +# put in directories named after the template files. If unset, default template | |
37 | +# directory is <tme_install_prefix>/share/tme/examples. | |
38 | +machine_root=./machine | |
39 | +machine_dir= | |
40 | +machines= | |
41 | + | |
35 | 42 | # Firmware downloads for various machines |
36 | 43 | firmware_root=./sun-fw |
37 | 44 | firmware_site=https://people.csail.mit.edu/~fredette/tme |