hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/android/binder_trace.h
....@@ -1,15 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2012 Google, Inc.
3
- *
4
- * This software is licensed under the terms of the GNU General Public
5
- * License version 2, as published by the Free Software Foundation, and
6
- * may be copied, distributed, and modified under those terms.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
12
- *
134 */
145
156 #undef TRACE_SYSTEM
....@@ -247,22 +238,40 @@
247238 __entry->dest_ref_debug_id, __entry->dest_ref_desc)
248239 );
249240
250
-TRACE_EVENT(binder_transaction_fd,
251
- TP_PROTO(struct binder_transaction *t, int src_fd, int dest_fd),
252
- TP_ARGS(t, src_fd, dest_fd),
241
+TRACE_EVENT(binder_transaction_fd_send,
242
+ TP_PROTO(struct binder_transaction *t, int fd, size_t offset),
243
+ TP_ARGS(t, fd, offset),
253244
254245 TP_STRUCT__entry(
255246 __field(int, debug_id)
256
- __field(int, src_fd)
257
- __field(int, dest_fd)
247
+ __field(int, fd)
248
+ __field(size_t, offset)
258249 ),
259250 TP_fast_assign(
260251 __entry->debug_id = t->debug_id;
261
- __entry->src_fd = src_fd;
262
- __entry->dest_fd = dest_fd;
252
+ __entry->fd = fd;
253
+ __entry->offset = offset;
263254 ),
264
- TP_printk("transaction=%d src_fd=%d ==> dest_fd=%d",
265
- __entry->debug_id, __entry->src_fd, __entry->dest_fd)
255
+ TP_printk("transaction=%d src_fd=%d offset=%zu",
256
+ __entry->debug_id, __entry->fd, __entry->offset)
257
+);
258
+
259
+TRACE_EVENT(binder_transaction_fd_recv,
260
+ TP_PROTO(struct binder_transaction *t, int fd, size_t offset),
261
+ TP_ARGS(t, fd, offset),
262
+
263
+ TP_STRUCT__entry(
264
+ __field(int, debug_id)
265
+ __field(int, fd)
266
+ __field(size_t, offset)
267
+ ),
268
+ TP_fast_assign(
269
+ __entry->debug_id = t->debug_id;
270
+ __entry->fd = fd;
271
+ __entry->offset = offset;
272
+ ),
273
+ TP_printk("transaction=%d dest_fd=%d offset=%zu",
274
+ __entry->debug_id, __entry->fd, __entry->offset)
266275 );
267276
268277 DECLARE_EVENT_CLASS(binder_buffer_class,
....@@ -297,6 +306,10 @@
297306 TP_PROTO(struct binder_buffer *buffer),
298307 TP_ARGS(buffer));
299308
309
+DEFINE_EVENT(binder_buffer_class, binder_transaction_update_buffer_release,
310
+ TP_PROTO(struct binder_buffer *buffer),
311
+ TP_ARGS(buffer));
312
+
300313 TRACE_EVENT(binder_update_page_range,
301314 TP_PROTO(struct binder_alloc *alloc, bool allocate,
302315 void __user *start, void __user *end),