xref: /linux/drivers/android/binder/trace.rs (revision 8a7c601e14576a22c2bbf7f67455ccf3f3d2737f)
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