From 93936cbe145f8480959b231a164370f5914f21ed Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 10 Jul 2024 11:34:40 +0200 Subject: [PATCH] Trace function graph after a page fault --- JOURNAL.md | 1 + lagarto-ox.nix | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/JOURNAL.md b/JOURNAL.md index 08a69fd..e61aab2 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -1113,3 +1113,4 @@ and then begins filling it, printing the progress in the output. written=53248K, addr=0x3f9ec00020 OK written=57344K, addr=0x3f9f000020 OK +Let's see if we can trace the page fault. diff --git a/lagarto-ox.nix b/lagarto-ox.nix index faff021..5954a7a 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -88,6 +88,14 @@ export PATH=${config.system.build.extraUtils}/bin + mkdir -p /sys/kernel/debug/ + mount -t debugfs none /sys/kernel/debug/ + td=/sys/kernel/debug/tracing + echo nop > $td/current_tracer + echo 100 > $td/max_graph_depth + echo do_page_fault > $td/set_graph_function + echo function_graph > $td/current_tracer + #memtool chain $((512 * 1024)) memtool fill $((512 * 1024 * 1024))