First commit, Vystem v0.1

This commit is contained in:
2026-03-31 22:15:00 +02:00
commit e15daed8c0
462 changed files with 134655 additions and 0 deletions

View 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

View 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

View 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

View 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

View 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