All checks were successful
		
		
	
	Test / Create distribution (push) Successful in 33s
				
			Test / Sandbox (push) Successful in 40s
				
			Test / Sandbox (race detector) (push) Successful in 40s
				
			Test / Hakurei (race detector) (push) Successful in 44s
				
			Test / Hakurei (push) Successful in 45s
				
			Test / Hpkg (push) Successful in 42s
				
			Test / Flake checks (push) Successful in 1m28s
				
			Updated according to evaluation warning. Signed-off-by: Ophestra <cat@gensokyo.uk>
		
			
				
	
	
		
			29 lines
		
	
	
		
			940 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			940 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ 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;
 | 
						|
      structuredExtraConfig.FUNCTION_GRAPH_RETVAL = lib.kernel.yes;
 | 
						|
    }
 | 
						|
  ];
 | 
						|
}
 |