First commit, Vystem v0.1
This commit is contained in:
9
shelter/lib/include/kernel/tests/test_malloc.h
Normal file
9
shelter/lib/include/kernel/tests/test_malloc.h
Normal file
@@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#ifndef SH_LIB_TEST_MALLOC_H
|
||||
#define SH_LIB_TEST_MALLOC_H
|
||||
#include "std/type.h"
|
||||
#include "std/status.h"
|
||||
#include "cpu/tsc.h"
|
||||
// Test and benchmark malloc subsystem
|
||||
SH_STATUS sh_test_malloc_benchmark();
|
||||
#endif
|
||||
11
shelter/lib/include/kernel/tests/test_pez.h
Normal file
11
shelter/lib/include/kernel/tests/test_pez.h
Normal file
@@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#ifndef SH_LIB_TEST_PEZ_H
|
||||
#define SH_LIB_TEST_PEZ_H
|
||||
#include "std/type.h"
|
||||
#include "std/status.h"
|
||||
#include "memory/pez/pez.h"
|
||||
#include "cpu/tsc.h"
|
||||
#define SH_TEST_PEZ_TOTAL_TSC_TIME_COUNT 4000
|
||||
// Test and benchmark pez subsystem
|
||||
SH_STATUS sh_test_pez_benchmark_physical(sh_pez_PHYSICAL_PLANE *phys_plane);
|
||||
#endif
|
||||
14
shelter/lib/include/kernel/tests/test_radix.h
Normal file
14
shelter/lib/include/kernel/tests/test_radix.h
Normal file
@@ -0,0 +1,14 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#ifndef SH_LIB_TEST_RADIX_H
|
||||
#define SH_LIB_TEST_RADIX_H
|
||||
#include "std/type.h"
|
||||
#include "std/status.h"
|
||||
#include "memory/page.h"
|
||||
#include "memory/slab.h"
|
||||
#include "memory/pez/radix.h"
|
||||
#include "cpu/tsc.h"
|
||||
// Load the number of iterations for benchmakrs for radix test.
|
||||
void sh_test_radix_load_iterations_count(sh_uint64 iterations_num);
|
||||
// Test and benchmark radix trees subsystem
|
||||
SH_STATUS sh_test_radix_benchmark(struct sh_slab_radix_node_SLAB_ALLOCATOR *alloc,sh_page_PAGE_TABLE_POOL *ptp);
|
||||
#endif
|
||||
19
shelter/lib/include/kernel/tests/test_slabs.h
Normal file
19
shelter/lib/include/kernel/tests/test_slabs.h
Normal file
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#ifndef SH_LIB_TEST_SLABS_H
|
||||
#define SH_LIB_TEST_SLABS_H
|
||||
#include "std/type.h"
|
||||
#include "std/status.h"
|
||||
#include "memory/page.h"
|
||||
#include "memory/slab.h"
|
||||
#include "cpu/tsc.h"
|
||||
// Load the number of iterations for benchmakrs for slabs test.
|
||||
void sh_test_slabs_load_iterations_count(sh_uint64 iterations_num);
|
||||
// Test and benchmark physical region objects slab allocator
|
||||
SH_STATUS sh_test_slabs_benchmark_region_physical(sh_slab_reg_phys_SLAB_ALLOCATOR *alloc,sh_page_PAGE_TABLE_POOL *ptp);
|
||||
// Test and benchmark virtual region objects slab allocator
|
||||
SH_STATUS sh_test_slabs_benchmark_region_virtual(sh_slab_reg_virt_SLAB_ALLOCATOR *alloc,sh_page_PAGE_TABLE_POOL *ptp);
|
||||
// Test and benchmark radix nodes objects slab allocator
|
||||
SH_STATUS sh_test_slabs_benchmark_radix_node(struct sh_slab_radix_node_SLAB_ALLOCATOR *alloc,sh_page_PAGE_TABLE_POOL *ptp);
|
||||
// Test and benchmark all slab allocators
|
||||
SH_STATUS sh_test_slabs_benchmark(sh_slab_reg_phys_SLAB_ALLOCATOR *alloc_reg_phys,sh_slab_reg_virt_SLAB_ALLOCATOR *alloc_reg_virt,struct sh_slab_radix_node_SLAB_ALLOCATOR *alloc_radix_node,sh_page_PAGE_TABLE_POOL *ptp);
|
||||
#endif
|
||||
13
shelter/lib/include/kernel/tests/test_utils.h
Normal file
13
shelter/lib/include/kernel/tests/test_utils.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#ifndef SH_LIB_TEST_UTILS_H
|
||||
#define SH_LIB_TEST_UTILS_H
|
||||
#include "std/type.h"
|
||||
#include "std/status.h"
|
||||
#include "cpu/tsc.h"
|
||||
// Compute and print time stats based on provided list of TSC values.
|
||||
SH_STATUS sh_test_compute_print_stats(char* benchname,sh_tsc_TSC_VALUE *tsc_value_array,sh_uint64 array_size);
|
||||
// Return pointer to TSC values buffer
|
||||
sh_tsc_TSC_VALUE* sh_test_get_tsc_values_buffer_ptr();
|
||||
// Load the number of iterations for benchmarks.
|
||||
void sh_test_load_iterations_count(sh_uint64 iterations_num);
|
||||
#endif
|
||||
Reference in New Issue
Block a user