From: compudj Date: Mon, 19 Mar 2007 03:56:23 +0000 (+0000) Subject: add teest tsc sync X-Git-Tag: v0.12.20~1051 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c6a191efd68ced074c7d401a90d93e8a8c2babcc;p=lttv.git add teest tsc sync git-svn-id: http://ltt.polymtl.ca/svn@2438 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/tests/kernel/test-hpet.c b/tests/kernel/test-hpet.c new file mode 100644 index 00000000..bf0dda5c --- /dev/null +++ b/tests/kernel/test-hpet.c @@ -0,0 +1,40 @@ +/* test-async-tsc.c + * + * test async tsc on AMD. + */ + + +#include +#include +#include +#include +#include + +static int __init test_init(void) +{ + int i; + cycles_t time1, time2; + volatile unsigned long myval; + + time1 = get_cycles(); + for (i=0; i<1; i++) { + //printk("time %llu\n", ltt_tsc_read()); + //myval = ltt_tsc_read(); + myval = hpet_readl(HPET_COUNTER); + } + time2 = get_cycles(); + printk("timediff %llu\n", time2-time1); + return -EPERM; +} + +static void __exit test_exit(void) +{ +} + +module_init(test_init); +module_exit(test_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mathieu Desnoyers"); +MODULE_DESCRIPTION("sync async tsc"); +