diff options
Diffstat (limited to 'machdep.h')
| -rw-r--r-- | machdep.h | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -4,7 +4,7 @@ | |||
| 4 | AUTHOR......: David Rowe | 4 | AUTHOR......: David Rowe |
| 5 | DATE CREATED: May 2 2013 | 5 | DATE CREATED: May 2 2013 |
| 6 | 6 | ||
| 7 | Machine dependant functions, e.g. profiling that requires access to a clock | 7 | Machine dependent functions, e.g. profiling that requires access to a clock |
| 8 | counter register. | 8 | counter register. |
| 9 | 9 | ||
| 10 | \*---------------------------------------------------------------------------*/ | 10 | \*---------------------------------------------------------------------------*/ |
| @@ -33,9 +33,9 @@ | |||
| 33 | #define PROFILE_VAR(...) unsigned int __VA_ARGS__ | 33 | #define PROFILE_VAR(...) unsigned int __VA_ARGS__ |
| 34 | #define PROFILE_SAMPLE(timestamp) timestamp = machdep_profile_sample() | 34 | #define PROFILE_SAMPLE(timestamp) timestamp = machdep_profile_sample() |
| 35 | #define PROFILE_SAMPLE_AND_LOG(timestamp, prev_timestamp, label) \ | 35 | #define PROFILE_SAMPLE_AND_LOG(timestamp, prev_timestamp, label) \ |
| 36 | timestamp = machdep_profile_sample_and_log(prev_timestamp, label) | 36 | timestamp = machdep_profile_sample_and_log(prev_timestamp, label) |
| 37 | #define PROFILE_SAMPLE_AND_LOG2(prev_timestamp, label) \ | 37 | #define PROFILE_SAMPLE_AND_LOG2(prev_timestamp, label) \ |
| 38 | machdep_profile_sample_and_log(prev_timestamp, label) | 38 | machdep_profile_sample_and_log(prev_timestamp, label) |
| 39 | #else | 39 | #else |
| 40 | #define PROFILE_VAR(...) | 40 | #define PROFILE_VAR(...) |
| 41 | #define PROFILE_SAMPLE(timestamp) | 41 | #define PROFILE_SAMPLE(timestamp) |
| @@ -43,10 +43,10 @@ | |||
| 43 | #define PROFILE_SAMPLE_AND_LOG2(prev_timestamp, label) | 43 | #define PROFILE_SAMPLE_AND_LOG2(prev_timestamp, label) |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | void machdep_profile_init(void); | 46 | void machdep_profile_init(void); |
| 47 | void machdep_profile_reset(void); | 47 | void machdep_profile_reset(void); |
| 48 | unsigned int machdep_profile_sample(void); | 48 | unsigned int machdep_profile_sample(void); |
| 49 | unsigned int machdep_profile_sample_and_log(unsigned int start, char s[]); | 49 | unsigned int machdep_profile_sample_and_log(unsigned int start, char s[]); |
| 50 | void machdep_profile_print_logged_samples(void); | 50 | void machdep_profile_print_logged_samples(void); |
| 51 | 51 | ||
| 52 | #endif | 52 | #endif |
