From 3f8e538c8a82a504c0b074e412f489431a363d6a Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 7 Apr 2008 22:53:29 +0000 Subject: [PATCH] update git-svn-id: http://ltt.polymtl.ca/svn@2854 04897980-b3bd-0310-b5e0-8ef037075253 --- markers-test/test-mark-speed-edit.c | 5 +---- markers-test/test-mark-speed-empty.c | 5 +---- markers-test/test-mark-speed-local.c | 5 +---- markers-test/test-mark-speed-opt.c | 5 +---- markers-test/test-mark-speed.c | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/markers-test/test-mark-speed-edit.c b/markers-test/test-mark-speed-edit.c index fd37c773..48f627e0 100644 --- a/markers-test/test-mark-speed-edit.c +++ b/markers-test/test-mark-speed-edit.c @@ -62,15 +62,12 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; -volatile int temp = 10; - static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - temp = temp * 100 + 60; - temp = temp << 10; + asm ("" : : "i" ((100 + 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 20bcc621..c960ec03 100644 --- a/markers-test/test-mark-speed-empty.c +++ b/markers-test/test-mark-speed-empty.c @@ -52,15 +52,12 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; -volatile int temp = 10; - static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - temp = temp * 100 + 60; - temp = temp << 10; + asm ("" : : "i" ((100 + 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 9393f0ff..3bc716d0 100644 --- a/markers-test/test-mark-speed-local.c +++ b/markers-test/test-mark-speed-local.c @@ -62,15 +62,12 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; -volatile int temp = 10; - static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - temp = temp * 100 + 60; - temp = temp << 10; + asm ("" : : "i" ((100 + 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 1800dea7..8374c2d5 100644 --- a/markers-test/test-mark-speed-opt.c +++ b/markers-test/test-mark-speed-opt.c @@ -52,15 +52,12 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; -volatile int temp = 10; - static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - temp = temp * 100 + 60; - temp = temp << 10; + asm ("" : : "i" ((100 + 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 bec60164..3f0b0d70 100644 --- a/markers-test/test-mark-speed.c +++ b/markers-test/test-mark-speed.c @@ -52,15 +52,12 @@ static void noinline test2(const struct marker *mdata, //asm volatile (""); struct proc_dir_entry *pentry = NULL; -volatile int temp = 10; - static inline void test(unsigned long arg, unsigned long arg2) { #ifdef CACHEFLUSH wbinvd(); #endif - temp = temp * 100 + 60; - temp = temp << 10; + asm ("" : : "i" ((100 + 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