Function cpu_instructions_reader::ffi::readInstructionNumberReader

source ยท
pub unsafe extern "C" fn readInstructionNumberReader(
    reader: *mut InstructionNumberReaderRaw,
    cpu: c_int,
) -> c_ll
Expand description

This C function reads instruction number information by reading the file identifier, see perf_event_read

The returned array pointer is also allocated by malloc, consider calling libc::free to release to ensure memory safety, and remember to prevent dangling pointers

NOTE: The length of the array is the number of CPUs used during construction. Consider using the size member of self::InstructionNumberReaderRaw to determine the length of the array