#define CONFIG_DEBUG_MAPLE_TREE
//#define BENCH_SLOT_STORE
//#define BENCH_NODE_STORE
+#define BENCH_WALK
//#define BENCH_FORK
static
int mtree_insert_index(struct maple_tree *mt, unsigned long index, gfp_t gfp)
}
#endif
+#if defined(BENCH_WALK)
+static noinline void bench_walk(struct maple_tree *mt)
+{
+ int i, max = 2500, count = 100000000;
+ MA_STATE(mas, mt, 22, 22);
+
+ for (i = 0; i < max; i += 10)
+ mtree_store_range(mt, i, i + 5, xa_mk_value(i), GFP_KERNEL);
+
+ for (i = 0; i < count; i++) {
+ mas_walk(&mas);
+ mas_reset(&mas);
+ }
+
+}
+#endif
+
static noinline void check_forking(struct maple_tree *mt)
{
mtree_destroy(&tree);
goto skip;
#endif
+#if defined(BENCH_WALK)
+#define BENCH
+ mtree_init(&tree, MAPLE_ALLOC_RANGE);
+ bench_walk(&tree);
+ mtree_destroy(&tree);
+ goto skip;
+#endif
#if defined(BENCH_FORK)
#define BENCH
mtree_init(&tree, MAPLE_ALLOC_RANGE);