summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-08-19 12:42:02 -0700
committerDavid Schleef <ds@schleef.org>2010-08-19 12:42:02 -0700
commit22efb1c8252d16882d57ff68b64126dd5f9dd769 (patch)
treecf19936e08f100fa0bf5138ff950af22573f593e
parentf4ac35cf062a317e0391b516870657883c72147c (diff)
Fix printing of performance data in tests
-rw-r--r--orc-test/orctest.c13
-rw-r--r--tools/orcc.c8
2 files changed, 13 insertions, 8 deletions
diff --git a/orc-test/orctest.c b/orc-test/orctest.c
index 7ddc1b2..673eb2b 100644
--- a/orc-test/orctest.c
+++ b/orc-test/orctest.c
@@ -951,14 +951,19 @@ orc_test_performance_full (OrcProgram *program, int flags,
orc_executor_set_stride (ex, j, src[j-ORC_VAR_S1]->stride);
}
}
- orc_profile_start (&prof);
- orc_executor_run (ex);
- orc_profile_stop (&prof);
+ if (flags & ORC_TEST_FLAGS_BACKUP) {
+ orc_profile_start (&prof);
+ orc_executor_run_backup (ex);
+ orc_profile_stop (&prof);
+ } else {
+ orc_profile_start (&prof);
+ orc_executor_run (ex);
+ orc_profile_stop (&prof);
+ }
}
ORC_DEBUG ("done running");
orc_profile_get_ave_std (&prof, &ave, &std);
- //printf("%g %g\n", ave/(n*m), std/(n*m));
for(i=0;i<4;i++){
if (dest_exec[i]) orc_array_free (dest_exec[i]);
diff --git a/tools/orcc.c b/tools/orcc.c
index b500598..97d769b 100644
--- a/tools/orcc.c
+++ b/tools/orcc.c
@@ -1005,8 +1005,8 @@ output_code_test (OrcProgram *p, FILE *output)
fprintf(output, " }\n");
fprintf(output, "\n");
fprintf(output, " if (benchmark) {\n");
- fprintf(output, " printf (\" cycles (backup) : \");\n");
- fprintf(output, " orc_test_performance (p, ORC_TEST_FLAGS_BACKUP);\n");
+ fprintf(output, " printf (\" cycles (backup) : %%g\\n\",\n");
+ fprintf(output, " orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));\n");
fprintf(output, " }\n");
fprintf(output, "\n");
fprintf(output, " ret = orc_test_compare_output (p);\n");
@@ -1019,8 +1019,8 @@ output_code_test (OrcProgram *p, FILE *output)
fprintf(output, " }\n");
fprintf(output, "\n");
fprintf(output, " if (benchmark) {\n");
- fprintf(output, " printf (\" cycles (compiled): \");\n");
- fprintf(output, " orc_test_performance (p, 0);\n");
+ fprintf(output, " printf (\" cycles (compiled): %%g\\n\",\n");
+ fprintf(output, " orc_test_performance_full (p, 0, NULL));\n");
fprintf(output, " }\n");
fprintf(output, "\n");
fprintf(output, " orc_program_free (p);\n");