From 87b4c91813f69f081690461affdf3157d7bb3e71 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 8 Jul 2024 08:55:50 +0200 Subject: [PATCH] Dump stack trace on hvc_remove --- lagarto-ox.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lagarto-ox.nix b/lagarto-ox.nix index 0aeb392..37543d2 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -93,6 +93,17 @@ '' echo 0 > /proc/sys/vm/compaction_proactiveness '' + + + # Show stacktrace on calls to the hvc_remove function. + '' + echo "Mount debugfs" + mkdir -p /sys/kernel/debug/ + mount -t debugfs none /sys/kernel/debug/ + td=/sys/kernel/debug/tracing + echo hvc_remove > $td/set_ftrace_filter + echo function > $td/current_tracer + echo 1 > $td/options/func_stack_trace + '' # FIXME: Disable sched_switch for now, as it still hangs the boot... # + # # Exclude the second pid, which is the kthread that will dump the trace to