xref: /linux/drivers/android/binder/trace.rs (revision e3966940559d52aa1800a008dcfeec218dd31f88)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 // Copyright (C) 2025 Google LLC.
4 
5 use kernel::ffi::{c_uint, c_ulong};
6 use kernel::tracepoint::declare_trace;
7 
8 declare_trace! {
9     unsafe fn rust_binder_ioctl(cmd: c_uint, arg: c_ulong);
10 }
11 
12 #[inline]
13 pub(crate) fn trace_ioctl(cmd: u32, arg: usize) {
14     // SAFETY: Always safe to call.
15     unsafe { rust_binder_ioctl(cmd, arg as c_ulong) }
16 }
17