summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
05600f3)
ifneq ($(KERNELRELEASE),)
ifneq ($(CONFIG_LTT),)
ifneq ($(KERNELRELEASE),)
ifneq ($(CONFIG_LTT),)
- obj-m += ltt-facility-loader-tests.o
- obj-m += test-time-probe.o
- obj-m += test-instrument-size-small.o
- obj-m += test-instrument-size-med.o
- obj-m += test-instrument-size-big.o
- obj-m += test-printk-effect.o
+ #obj-m += ltt-facility-loader-tests.o
+ #obj-m += test-time-probe.o
+ #obj-m += test-instrument-size-small.o
+ #obj-m += test-instrument-size-med.o
+ #obj-m += test-instrument-size-big.o
+ #obj-m += test-printk-effect.o
obj-m += test-cmpxchg.o
endif
obj-m += test-cmpxchg.o
endif
+#include <linux/config.h>
+#include <linux/jiffies.h>
+#include <linux/compiler.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/ltt-core.h>
-#include <asm/system.h>
-static volatile int test_val = 100;
+volatile int test_val = 100;
+
static void do_test(void)
{
static void do_test(void)
{
- ret = cmpxchg(&test_val, val, 101);
+ ret = cmpxchg(&test_val, val, val+1);
+void (*fct)(void) = do_test;
+
static int ltt_test_init(void)
{
unsigned int i;
static int ltt_test_init(void)
{
unsigned int i;
printk(KERN_ALERT "test init\n");
local_irq_save(flags);
printk(KERN_ALERT "test init\n");
local_irq_save(flags);
for(i=0; i<NR_LOOPS; i++) {
for(i=0; i<NR_LOOPS; i++) {
+ //for(int j=0; j<10; j++) {
- time2 = get_cycles();
- time = time2 - time1;
- max_time = max(max_time, time);
- min_time = min(min_time, time);
- tot_time += time;
+ //}
+ //max_time = max(max_time, time);
+ //min_time = min(min_time, time);
+ //printk("val : %d\n", test_val);
local_irq_restore(flags);
local_irq_restore(flags);
+ time = time2 - time1;
+ tot_time += time;
printk(KERN_ALERT "test results : time per probe\n");
printk(KERN_ALERT "number of loops : %d\n", NR_LOOPS);
printk(KERN_ALERT "total time : %llu\n", tot_time);
printk(KERN_ALERT "test results : time per probe\n");
printk(KERN_ALERT "number of loops : %d\n", NR_LOOPS);
printk(KERN_ALERT "total time : %llu\n", tot_time);
- printk(KERN_ALERT "min : %llu\n", min_time);
- printk(KERN_ALERT "max : %llu\n", max_time);
+ //printk(KERN_ALERT "min : %llu\n", min_time);
+ //printk(KERN_ALERT "max : %llu\n", max_time);
printk(KERN_ALERT "test end\n");
printk(KERN_ALERT "test end\n");