From: compudj Date: Thu, 9 Nov 2006 18:10:46 +0000 (+0000) Subject: add test X-Git-Tag: v0.12.20~1240 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a4cc64517c6641cf5626233e84544c05cd81b37d;p=lttv.git add test git-svn-id: http://ltt.polymtl.ca/svn@2249 04897980-b3bd-0310-b5e0-8ef037075253 --- 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