summaryrefslogtreecommitdiff
path: root/simpleperf/rust/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'simpleperf/rust/lib.rs')
-rw-r--r--simpleperf/rust/lib.rs22
1 files changed, 5 insertions, 17 deletions
diff --git a/simpleperf/rust/lib.rs b/simpleperf/rust/lib.rs
index 7d39273e..05202efd 100644
--- a/simpleperf/rust/lib.rs
+++ b/simpleperf/rust/lib.rs
@@ -25,16 +25,9 @@ fn path_to_cstr(path: &Path) -> CString {
CString::new(path.to_str().unwrap()).unwrap()
}
-/// Returns whether the system has etm driver. ETM driver should be available immediately
-/// after boot.
-pub fn has_driver_support() -> bool {
- unsafe { simpleperf_profcollect_bindgen::HasDriverSupport() }
-}
-
-/// Returns whether the system has etm device. ETM device may not be available immediately
-/// after boot.
-pub fn has_device_support() -> bool {
- unsafe { simpleperf_profcollect_bindgen::HasDeviceSupport() }
+/// Returns whether the system has support for simpleperf etm.
+pub fn has_support() -> bool {
+ unsafe { simpleperf_profcollect_bindgen::HasSupport() }
}
/// ETM recording scope
@@ -63,16 +56,11 @@ pub fn record(trace_file: &Path, duration: &Duration, scope: RecordScope) {
}
/// Translate ETM trace to profile.
-pub fn process(trace_path: &Path, profile_path: &Path, binary_filter: &str) {
+pub fn process(trace_path: &Path, profile_path: &Path) {
let trace_path = path_to_cstr(trace_path);
let profile_path = path_to_cstr(profile_path);
- let binary_filter = CString::new(binary_filter).unwrap();
unsafe {
- simpleperf_profcollect_bindgen::Inject(
- trace_path.as_ptr(),
- profile_path.as_ptr(),
- binary_filter.as_ptr(),
- );
+ simpleperf_profcollect_bindgen::Inject(trace_path.as_ptr(), profile_path.as_ptr());
}
}