diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-21 19:51:32 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-21 19:51:32 +0200 |
commit | 38b13f150852938b2ed1e7c324cb18a1a25ae7b0 (patch) | |
tree | 0f41fa004ca541bd564bfd5b2462d4624d7f64e0 | |
parent | 3fce2fb205862b9a06a8e35745e26690f8beed3e (diff) | |
download | serenity-38b13f150852938b2ed1e7c324cb18a1a25ae7b0.zip |
Kernel: Remove bitrotted "spawn stress" code.
This was something I used during early kernel development to spam creation
of new processes to see if the kernel could handle it.
-rw-r--r-- | Kernel/init.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 6a8f81f610..1b7c243311 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -34,8 +34,6 @@ #include <Kernel/TTY/VirtualConsole.h> #include <Kernel/VM/MemoryManager.h> -//#define STRESS_TEST_SPAWNING - VirtualConsole* tty0; VirtualConsole* tty1; VirtualConsole* tty2; @@ -51,24 +49,6 @@ SerialDevice* ttyS2; SerialDevice* ttyS3; VFS* vfs; -#ifdef STRESS_TEST_SPAWNING -[[noreturn]] static void spawn_stress() -{ - u32 last_sum_alloc = sum_alloc; - - for (unsigned i = 0; i < 10000; ++i) { - int error; - Process::create_user_process("/bin/true", (uid_t)100, (gid_t)100, (pid_t)0, error, {}, {}, tty0); - dbgprintf("malloc stats: alloc:%u free:%u eternal:%u !delta:%u\n", sum_alloc, sum_free, kmalloc_sum_eternal, sum_alloc - last_sum_alloc); - last_sum_alloc = sum_alloc; - sleep(60); - } - for (;;) { - asm volatile("hlt"); - } -} -#endif - [[noreturn]] static void init_stage2() { Syscall::initialize(); @@ -165,10 +145,6 @@ VFS* vfs; } system_server_process->set_priority(Process::HighPriority); -#ifdef STRESS_TEST_SPAWNING - Process::create_kernel_process("spawn_stress", spawn_stress); -#endif - current->process().sys$exit(0); ASSERT_NOT_REACHED(); } |