Skip to content

A library for interfacing with the Ftrace Linux kernel's internal tracer.

License

Notifications You must be signed in to change notification settings

ImanSeyed/riftrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This library provides an API for using the Ftrace.

Examples

use riftrace::controller::{ControllerTrait, MainController};
use riftrace::operations::FilterOps;
use riftrace::{Tracer, TracingStat};
let trace_ctrl = MainController::new();
let filter_operator = FilterOps::new(&trace_ctrl);
// Change current tracer from nop to function_graph
trace_ctrl.set_current_tracer(Tracer::FunctionGraph).unwrap();
// Turn tracing on
trace_ctrl.set_tracing_on(TracingStat::On).unwrap();
// Limit the trace to only "net*"
filter_operator.set_ftrace_filter("net*", false).unwrap();
// Print out the output of the trace in a human-readable format
println!("{}", trace_ctrl.trace().unwrap());

About

A library for interfacing with the Ftrace Linux kernel's internal tracer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages