Subversion Repositories HelenOS

Rev

Rev 1787 | Rev 2022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1787 Rev 2021
Line 32... Line 32...
32
#include <proc/thread.h>
32
#include <proc/thread.h>
33
#include <arch.h>
33
#include <arch.h>
34
#include <panic.h>
34
#include <panic.h>
35
#include <memstr.h>
35
#include <memstr.h>
36
 
36
 
-
 
37
#ifdef CONFIG_BENCH
-
 
38
#include <arch/cycle.h>
-
 
39
#endif
-
 
40
 
37
#define VAL_COUNT   1024
41
#define VAL_COUNT   1024
38
 
42
 
39
void * data[VAL_COUNT];
43
void * data[VAL_COUNT];
40
 
44
 
41
static void testit(int size, int count)
45
static void testit(int size, int count)
Line 151... Line 155...
151
    slab_cache_destroy(thr_cache);
155
    slab_cache_destroy(thr_cache);
152
    printf("Test complete.\n");
156
    printf("Test complete.\n");
153
   
157
   
154
}
158
}
155
 
159
 
156
void test(void)
160
void test_slab1(void)
157
{
161
{
-
 
162
#ifdef CONFIG_BENCH
-
 
163
    uint64_t t0 = get_cycle();
-
 
164
#endif
158
    testsimple();
165
    testsimple();
159
    testthreads();
166
    testthreads();
-
 
167
#ifdef CONFIG_BENCH
-
 
168
    uint64_t dt = get_cycle() - t0;
-
 
169
    printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt);
-
 
170
#endif
160
}
171
}