From 4c2e21033bed7ae942e8b1a30a70b209031ce576 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 10 Jul 2024 13:02:43 +0200 Subject: [PATCH] Try tracing handle_page_fault --- JOURNAL.md | 6 ++++++ lagarto-ox.nix | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/JOURNAL.md b/JOURNAL.md index 56dd628..e81a9e6 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -1119,6 +1119,9 @@ In today's meeting, Jonnatan suggests test the memtool program with all-in-order configuration. I should also try to reproduce this hang with a "production" bitstream (from master). +Also, Xavi reports that the memtool chain test continued to run until the memory +was exhausted using an old bistream. + Let's do the quick CSR test first, and then we go back to the ftrace testing, which will take more time. @@ -1164,3 +1167,6 @@ more slow. Interesting [article](https://wiki.osdev.org/RISC-V_Bare_Bones) on how to write a simple bootrom that outputs some ASCII text into the console. + +Regarding the `do_page_fault` filter, it seems that is no available. I need to +pick one from `available_filter_functions` instead. Let's try `handle_page_fault`. diff --git a/lagarto-ox.nix b/lagarto-ox.nix index 86e1ae2..de55287 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -88,7 +88,15 @@ export PATH=${config.system.build.extraUtils}/bin - csrtool all-in-order + mkdir -p /tracing + mount -t tracefs nodev /tracing + + cd /tracing + echo nop > current_tracer + echo 100 > max_graph_depth + echo handle_page_fault > set_graph_function + echo function_graph > current_tracer + cd / memtool fill $((512 * 1024 * 1024)) @@ -281,7 +289,7 @@ # tp_printk write ftrace events to console # trace_buf_size=1M set ftrace buffer to 1M # - setenv bootargs "root=/dev/ram0 loglevel=7 debug rw earlycon=sbi console=hvc0 rdinit=/init2 init=${init}" + setenv bootargs "root=/dev/ram0 loglevel=7 debug rw earlycon=sbi console=hvc0 tp_printk trace_buf_size=1M rdinit=/init2 init=${init}" EOF