From a4cc64517c6641cf5626233e84544c05cd81b37d Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 9 Nov 2006 18:10:46 +0000 Subject: [PATCH] add test git-svn-id: http://ltt.polymtl.ca/svn@2249 04897980-b3bd-0310-b5e0-8ef037075253 --- tests/kernel/test-irqloop.c | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/kernel/test-irqloop.c diff --git a/tests/kernel/test-irqloop.c b/tests/kernel/test-irqloop.c new file mode 100644 index 00000000..38a6680c --- /dev/null +++ b/tests/kernel/test-irqloop.c @@ -0,0 +1,55 @@ +/* test-irqloop + * + * Test time spent for irq disabling + */ + + +#include +#include +#include +#include +#include + +#define NR_LOOPS 20000 + +static int ltt_test_init(void) +{ + unsigned int i; + cycles_t time1, time2, time; + cycles_t max_time = 0, min_time = 18446744073709551615ULL; /* (2^64)-1 */ + cycles_t tot_time = 0; + unsigned long flags; + printk(KERN_ALERT "test init\n"); + + time1 = get_cycles(); + for(i=0; i