|
|
@ -69,7 +69,7 @@ impl TracePoint {
|
|
|
|
/// `/sys/kernel/debug/tracing/events`.
|
|
|
|
/// `/sys/kernel/debug/tracing/events`.
|
|
|
|
pub fn attach(&mut self, category: &str, name: &str) -> Result<LinkRef, ProgramError> {
|
|
|
|
pub fn attach(&mut self, category: &str, name: &str) -> Result<LinkRef, ProgramError> {
|
|
|
|
let id = read_sys_fs_trace_point_id(category, name)?;
|
|
|
|
let id = read_sys_fs_trace_point_id(category, name)?;
|
|
|
|
let fd = perf_event_open_trace_point(id).map_err(|(_code, io_error)| {
|
|
|
|
let fd = perf_event_open_trace_point(id, None).map_err(|(_code, io_error)| {
|
|
|
|
ProgramError::SyscallError {
|
|
|
|
ProgramError::SyscallError {
|
|
|
|
call: "perf_event_open".to_owned(),
|
|
|
|
call: "perf_event_open".to_owned(),
|
|
|
|
io_error,
|
|
|
|
io_error,
|
|
|
|