test/interactive: helper scripts for tracing
All checks were successful
Test / Hakurei (push) Successful in 41s
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 39s
Test / Hpkg (push) Successful in 40s
Test / Hakurei (race detector) (push) Successful in 41s
Test / Sandbox (race detector) (push) Successful in 39s
Test / Flake checks (push) Successful in 1m26s
All checks were successful
Test / Hakurei (push) Successful in 41s
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 39s
Test / Hpkg (push) Successful in 40s
Test / Hakurei (race detector) (push) Successful in 41s
Test / Sandbox (race detector) (push) Successful in 39s
Test / Flake checks (push) Successful in 1m26s
The vm state is discarded often, and it is quite cumbersome to set everything up again when the shell history is gone. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
f1a53d6116
commit
a4f7e92e1c
@ -195,6 +195,7 @@
|
||||
./test/interactive/configuration.nix
|
||||
./test/interactive/vm.nix
|
||||
./test/interactive/hakurei.nix
|
||||
./test/interactive/trace.nix
|
||||
|
||||
self.nixosModules.hakurei
|
||||
self.inputs.home-manager.nixosModules.home-manager
|
||||
|
28
test/interactive/trace.nix
Normal file
28
test/interactive/trace.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
tracing = name: "\"/sys/kernel/debug/tracing/${name}\"";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "hakurei-set-up-tracing" ''
|
||||
set -e
|
||||
echo "$1" > ${tracing "set_graph_function"}
|
||||
echo function_graph > ${tracing "current_tracer"}
|
||||
echo funcgraph-tail > ${tracing "trace_options"}
|
||||
echo funcgraph-retval > ${tracing "trace_options"}
|
||||
echo nofuncgraph-cpu > ${tracing "trace_options"}
|
||||
echo nofuncgraph-overhead > ${tracing "trace_options"}
|
||||
echo nofuncgraph-duration > ${tracing "trace_options"}
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "hakurei-print-trace" "exec cat ${tracing "trace"}")
|
||||
(pkgs.writeShellScriptBin "hakurei-consume-trace" "exec cat ${tracing "trace_pipe"}")
|
||||
];
|
||||
|
||||
boot.kernelPatches = [
|
||||
{
|
||||
name = "funcgraph-retval";
|
||||
patch = null;
|
||||
extraStructuredConfig.FUNCTION_GRAPH_RETVAL = lib.kernel.yes;
|
||||
}
|
||||
];
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user