summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dtypes.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 25a3088..6e3c070 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -7819,7 +7819,7 @@ herr_t no_operation(H5T_t *t, int mode);
herr_t H5T__forward_args_with_func_overhead(H5T_t *t);
herr_t H5T__forward_args_without_func_overhead(H5T_t *t);
-herr_t
+herr_t __attribute__((noinline))
H5T__forward_args_with_func_overhead(H5T_t *t)
{
herr_t ret_value = FAIL;
@@ -7829,12 +7829,11 @@ H5T__forward_args_with_func_overhead(H5T_t *t)
if ((ret_value = no_operation(t, 10)) == FAIL)
HGOTO_ERROR(17, 31, FAIL, "that didn't work");
- ret_value = SUCCEED;
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-herr_t
+herr_t __attribute__((noinline))
H5T__forward_args_without_func_overhead(H5T_t *t)
{
return no_operation(t, 10);
@@ -7862,7 +7861,7 @@ main(void)
long nerrors = 0;
hid_t fapl = -1;
H5T_t *t;
- int i, ntimes = 10 * 1000 * 1000;
+ int i, ntimes = 100 * 1000 * 1000;
uint64_t start, stop;
/* Set the random # seed */
@@ -7879,6 +7878,13 @@ main(void)
start = __builtin_ia32_rdtsc();
for (i = 0; i < ntimes; i++)
+ no_operation(t, 10);
+ stop = __builtin_ia32_rdtsc();
+ printf("%d calls to no-op routine, %" PRIu64 " cycles\n",
+ ntimes, stop - start);
+
+ start = __builtin_ia32_rdtsc();
+ for (i = 0; i < ntimes; i++)
H5T__forward_args_without_func_overhead(t);
stop = __builtin_ia32_rdtsc();
printf("%d calls to no-overhead version, %" PRIu64 " cycles\n",