Commit Graph

20 Commits

Author SHA1 Message Date
bjorn3 38f36d406b Use cfg!() instead of #[cfg] for most profiling code
This makes it less likely that it breaks again in the future as most
code gets checked by the compiler even when profiling support is not
enabled.
2026-04-13 19:43:43 +02:00
Jacob Lorentzon 142871660e profiling: infer number of CPUs dynamically 2026-04-13 06:44:27 -06:00
bjorn3 2405a7ebb3 Move kmain and kmain_ap to startup/mod.rs 2026-04-12 18:41:00 +02:00
bjorn3 572bb4ce1f Avoid re-exporting arch specific modules in the crate root 2026-04-12 18:25:52 +02:00
Jacob Lorentzon 141c87650f Fix profiling and add check to CI 2026-04-12 06:51:26 -06:00
bjorn3 654ee6ca3e size_of and align_of are part of the prelude nowadays 2026-04-09 15:23:34 -06:00
Speedy_Lex ee1260363c Fix many clippy lints 2026-04-08 19:40:41 +01:00
auronandace 14b8c2b0c1 enforce two lints and collapse some ifs 2026-03-03 14:51:32 +00:00
bjorn3 bc3a59abb3 Minor simplification to profiling::nmi_handler 2025-10-26 18:27:29 +01:00
bjorn3 0f7b16d89d Partially use cfg!() rather than #[cfg] for controlling the profiling module
This only adds a pointer worth of overhead per cpu core in the
PerCpuBlock struct.

Also fix a bunch of unsafe_op_in_unsafe_fn warnings in the profiling
code.
2025-10-26 18:27:29 +01:00
Speedy_Lex ea812e8f2a Run cargo fmt 2025-10-04 01:06:15 +02:00
Speedy_Lex d38002969c Fixes for rust update 2025-10-04 00:55:26 +02:00
bjorn3 5a6117b5ae Replace the log crate with a custom logging system
This avoids the need to explicitly set a logger early during boot, which
reduces the amount of moving parts that could go wrong slightly. And it
cuts the kernel image size by 13kb.
2025-09-13 18:55:16 +02:00
4lDO2 8d4ee26ff1 Fix profiling && + toggle support via debug scheme. 2024-10-07 10:20:51 +02:00
Ron Williams 19cd3ad287 Fix APIC reference in profiling.rs 2024-08-26 21:06:47 -07:00
4lDO2 d94baa2712 Run rustfmt. 2024-07-15 17:50:18 +02:00
4lDO2 fbaa93e8fa Fix profiling stack trace bp bounds checking. 2024-04-04 15:45:47 +02:00
4lDO2 1b3e024f7d Fix profiling code. 2024-03-23 15:52:18 +01:00
Jeremy Soller 45f1c4e29e Add rustfmt from relibc and apply it with cargo fmt 2024-01-17 13:52:01 -07:00
4lDO2 fac0e783ef Refactor profiling code. 2023-12-17 00:49:28 +01:00