Fix profiling && + toggle support via debug scheme.

This commit is contained in:
4lDO2
2024-10-07 10:15:35 +02:00
parent dc1ba28f91
commit 8d4ee26ff1
3 changed files with 34 additions and 6 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ use crate::{
syscall::{error::*, usercopy::UserSliceWo},
};
const N: usize = 64 * 1024 * 1024;
const N: usize = 16 * 1024 * 1024;
pub const HARDCODED_CPU_COUNT: u32 = 4;
@@ -96,7 +96,7 @@ const NULL: AtomicPtr<RingBuffer> = AtomicPtr::new(core::ptr::null_mut());
pub static BUFS: [AtomicPtr<RingBuffer>; 4] = [NULL; 4];
pub const PROFILE_TOGGLEABLE: bool = true;
pub static IS_PROFILING: AtomicBool = AtomicBool::new(true);
pub static IS_PROFILING: AtomicBool = AtomicBool::new(false);
pub fn serio_command(index: usize, data: u8) {
if PROFILE_TOGGLEABLE {
@@ -255,5 +255,5 @@ pub fn maybe_setup_timer(idt: &mut Idt, cpu_id: LogicalCpuId) {
return;
}
idt.entries[32].set_func(aux_timer);
idt.set_reserved(32, true);
idt.set_reserved_mut(32, true);
}