xeon08: Add perf
This commit is contained in:
		
							parent
							
								
									d35becb663
								
							
						
					
					
						commit
						0d196af473
					
				| @ -48,6 +48,7 @@ let | |||||||
| in { | in { | ||||||
|   imports = [ |   imports = [ | ||||||
|     ./lttng.nix |     ./lttng.nix | ||||||
|  |     ./perf.nix | ||||||
|   ]; |   ]; | ||||||
|   boot.kernelPackages = lib.mkForce kernel; |   boot.kernelPackages = lib.mkForce kernel; | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										22
									
								
								xeon08/kernel/perf.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								xeon08/kernel/perf.nix
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | { config, pkgs, lib, ... }: | ||||||
|  | 
 | ||||||
|  | { | ||||||
|  |   # add the perf tool | ||||||
|  |   environment.systemPackages = with pkgs; [ | ||||||
|  |     config.boot.kernelPackages.perf | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  |   # allow non-root users to read tracing data from the kernel | ||||||
|  |   boot.kernel.sysctl."kernel.perf_event_paranoid" = -2; | ||||||
|  |   boot.kernel.sysctl."kernel.kptr_restrict" = 0; | ||||||
|  | 
 | ||||||
|  |   # specify additionl options to the tracefs directory to allow members of the | ||||||
|  |   # tracing group to access tracefs. | ||||||
|  |   fileSystems."/sys/kernel/tracing" = { | ||||||
|  |     options = [ | ||||||
|  |       "mode=755" | ||||||
|  |       "gid=tracing" | ||||||
|  |     ]; | ||||||
|  |   }; | ||||||
|  | } | ||||||
|  | 
 | ||||||
		Reference in New Issue
	
	Block a user