aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-12 06:25:09 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-12 06:25:09 +0100
commitd7b65819914396ffe615130867bfe2d281b4ccc8 (patch)
treeeeda3b7bafc0f637db15e5954e4295166d2fa43d /test/monniaux
parent549e1f93c95e06d796bdd15ca0cf24c0a0128e70 (diff)
downloadcompcert-kvx-d7b65819914396ffe615130867bfe2d281b4ccc8.tar.gz
compcert-kvx-d7b65819914396ffe615130867bfe2d281b4ccc8.zip
easier for clocking directly from ccomp files
Diffstat (limited to 'test/monniaux')
-rw-r--r--test/monniaux/clock.c4
-rw-r--r--test/monniaux/clock.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/test/monniaux/clock.c b/test/monniaux/clock.c
index d72528d8..7611a2ee 100644
--- a/test/monniaux/clock.c
+++ b/test/monniaux/clock.c
@@ -19,6 +19,10 @@ cycle_t get_total_clock(void) {
return total_clock;
}
+cycle_t get_current_cycle(void) {
+ return get_cycle();
+}
+
void print_total_clock(void) {
printf("cycles: %lu\n", total_clock);
}
diff --git a/test/monniaux/clock.h b/test/monniaux/clock.h
index 43fd7c5c..be8fa172 100644
--- a/test/monniaux/clock.h
+++ b/test/monniaux/clock.h
@@ -4,5 +4,6 @@ void clock_prepare(void);
void clock_stop(void);
void clock_start(void);
cycle_t get_total_clock(void);
+cycle_t get_current_cycle(void);
void print_total_clock(void);
void printerr_total_clock(void);