From 562710d7e0c1f96516f1517241f4e1651881ccc2 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 8 Apr 2008 02:22:01 +0000 Subject: [PATCH] update git-svn-id: http://ltt.polymtl.ca/svn@2855 04897980-b3bd-0310-b5e0-8ef037075253 --- markers-test/test-mark-speed-edit.c | 4 +++- markers-test/test-mark-speed-empty.c | 4 +++- markers-test/test-mark-speed-local.c | 5 +++-- markers-test/test-mark-speed-opt.c | 5 +++-- markers-test/test-mark-speed.c | 4 +++- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/markers-test/test-mark-speed-edit.c b/markers-test/test-mark-speed-edit.c index 48f627e0..a6c5a3ed 100644 --- a/markers-test/test-mark-speed-edit.c +++ b/markers-test/test-mark-speed-edit.c @@ -62,12 +62,14 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; +int temp __cacheline_aligned = 10; + static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - asm ("" : : "i" ((100 + 60) << 10)); + temp = (temp + 60) << 10; //asm volatile (""); //__my_trace_mark(1, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); test2(NULL, NULL, 2, current->pid, arg, arg2); diff --git a/markers-test/test-mark-speed-empty.c b/markers-test/test-mark-speed-empty.c index c960ec03..27bf604f 100644 --- a/markers-test/test-mark-speed-empty.c +++ b/markers-test/test-mark-speed-empty.c @@ -52,12 +52,14 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; +int temp __cacheline_aligned = 10; + static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - asm ("" : : "i" ((100 + 60) << 10)); + temp = (temp + 60) << 10; asm volatile (""); //__my_trace_mark(1, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); //__my_trace_mark(0, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); diff --git a/markers-test/test-mark-speed-local.c b/markers-test/test-mark-speed-local.c index 3bc716d0..24a2822d 100644 --- a/markers-test/test-mark-speed-local.c +++ b/markers-test/test-mark-speed-local.c @@ -59,15 +59,16 @@ static void noinline test2(const struct marker *mdata, } \ } while (0) - //asm volatile (""); struct proc_dir_entry *pentry = NULL; +int temp __cacheline_aligned = 10; + static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - asm ("" : : "i" ((100 + 60) << 10)); + temp = (temp + 60) << 10; //asm volatile (""); //__my_trace_mark(1, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); test2(NULL, NULL, 2, 10, arg, arg2); diff --git a/markers-test/test-mark-speed-opt.c b/markers-test/test-mark-speed-opt.c index 8374c2d5..982053f1 100644 --- a/markers-test/test-mark-speed-opt.c +++ b/markers-test/test-mark-speed-opt.c @@ -49,15 +49,16 @@ static void noinline test2(const struct marker *mdata, } \ } while (0) - //asm volatile (""); struct proc_dir_entry *pentry = NULL; +int temp __cacheline_aligned = 10; + static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - asm ("" : : "i" ((100 + 60) << 10)); + temp = (temp + 60) << 10; //asm volatile (""); //__my_trace_mark(1, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); __my_trace_mark(0, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); diff --git a/markers-test/test-mark-speed.c b/markers-test/test-mark-speed.c index 3f0b0d70..ab65d3d4 100644 --- a/markers-test/test-mark-speed.c +++ b/markers-test/test-mark-speed.c @@ -52,12 +52,14 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; +int temp __cacheline_aligned = 10; + static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - asm ("" : : "i" ((100 + 60) << 10)); + temp = (temp + 60) << 10; //asm volatile (""); __my_trace_mark(1, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); //__my_trace_mark(0, kernel_debug_test, NULL, "%d %d %ld %ld", 2, current->pid, arg, arg2); -- 2.34.1