From 95b0c6aec0321642bb34e232dd9e8cd616f74beb Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 9 Jul 2010 13:45:19 -0700 Subject: [PATCH] memcpy_speed: flush/populate cache for hot/cold testing --- testsuite/memcpy_speed.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/testsuite/memcpy_speed.c b/testsuite/memcpy_speed.c index da673d1..4621fbd 100644 --- a/testsuite/memcpy_speed.c +++ b/testsuite/memcpy_speed.c @@ -13,6 +13,21 @@ #define ALIGN(ptr,n) ((void *)((unsigned long)(ptr) & (~(unsigned long)(n-1)))) +int hot_src = TRUE; +int hot_dest = TRUE; +int flush_cache = FALSE; + + +void +touch (unsigned char *ptr, int n) +{ + static int sum; + int i; + for(i=0;i