kernel: profiling infrastructure

This commit is contained in:
Matheus
2025-12-05 18:19:42 -03:00
parent d10295dcdf
commit 40bbf217ee
19 changed files with 595 additions and 3 deletions
+3 -3
View File
@@ -343,11 +343,11 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
// start a login shell in /dev/com0 if it exists
if (access("/dev/com0", F_OK) == 0)
// start a login shell in /dev/com0 if it exists and kernel does not enable profiling
if (access("/dev/com0", F_OK) == 0 && access("/dev/prof", F_OK))
spawn_login_prompt("/dev/com0");
if (argc >1 && strcmp(argv[1], "withlogin") == 0)
if (argc > 1 && strcmp(argv[1], "withlogin") == 0)
dologinprompt("/dev/console");
// open /dev/console as the controlling terminal if we're not doing login