Commit Graph

14 Commits

Author SHA1 Message Date
Liujie Xie
cb7e10d31b ANDROID: vendor_hooks: Add hooks for binder proc transaction
We need pointers to proc and t, the current hooks in binder_proc_transaction
are unable to use.

Bug: 208910215
Change-Id: I730964f965a015e5f5a3e237d9b3bd084b5bd0d0
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
2022-02-14 18:40:45 +00:00
Liujie Xie
05c23b7a50 ANDROID: vendor_hooks: Add hooks for binder
We want to add some hooks in the binder module so that we can reduce
block time until binder thread is available
Here are what new hooks do for:
1、android_vh_binder_looper_state_registered: choose a binder thread(do proc work) as a low-level thread.Only this thread has power to excute background binder transaction.
2、android_vh_binder_thread_read: let binder thread do works which come from
our list.
3、android_vh_binder_free_proc: free some pointers and variable.
4、android_vh_binder_thread_release: free the list that we create before.
5、android_vh_binder_has_work_ilocked: to check if our list has work.
6、android_vh_binder_read_done: because of we add hook in binder_has_work_ilocked,
binder_has_work_ilocked may return true, so we try to wake up low-level thread immediately.

Bug: 212483521
Change-Id: Ic40f452cc4dcf8fc85422e23e6f1a7ad77547309
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
2022-01-07 16:09:31 +00:00
Liujie Xie
05aa93d251 ANDROID: vendor_hooks: Add hooks for binder proc transaction
When binder transaction happened, We want to know it's transaction code
and it is oneway or not.

Bug: 208910215

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ic03e5481e96e120a1953a101895714db04ca2bdf
2021-12-03 12:42:11 +08:00
Liangliang Li
2f3f5731de ANDROID: GKI: Add vendor hook to binder transaction
We want to get binder free space information in the binder
transaction, but this needs to hold the mutex lock. So we add
this restrict hook to do this.

Bug: 205648032
Change-Id: Ie1f377018da686bd62f5ac2d1e5421899741e6d5
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
2021-11-17 16:49:10 +00:00
xieliujie
4322bb07e8 ANDROID: vendor_hooks: Modify the function name
Vendor hook is add in the commit:
https://android-review.googlesource.com/c/kernel/common/+/1687592
When we register the vendor hook and build, there is build error:
too long symbol "__tracepoint_android_vh_binder_transaction_priority_skip"
So, I shorten the function name
android_vh_binder_transaction_priority_skip -->
android_vh_binder_priority_skip

Bug: 186482511

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I27f39dd32436b09257bcf6e746f4ccdfbd6d6cfe
2021-07-15 16:50:42 +00:00
zhang chuang
eabe9707f2 ANDROID: Add hook to show vendor info for transactions
When watchdog or anr occur, we need to read
dev/binderfs/binder_logs/proc/pid or dev/binderfs/binder_logs/state
node to know the time-consuming information of the binder call.
We need to add the time-consuming information of binder transaction.

Bug: 190413570

Signed-off-by: zhang chuang <zhangchuang3@xiaomi.com>
Change-Id: I0423d4e821d5cd725a848584133dc7245cbc233a
2021-06-24 17:40:34 -07:00
zhengding chen
35014985c2 ANDROID: vendor_hooks: Add hooks for binder proc transaction
When servicemanager process added service proxy from other process
register the service, we want to know the matching relation between
handle in the process and service name. When binder transaction
happened, We want to know what process calls what method on what service.

Bug: 186604985

Signed-off-by: zhengding chen <chenzhengding@oppo.com>
Change-Id: I813d1cde10294d8665f899f7fef0d444ec1f1f5e
2021-04-30 02:31:20 +00:00
xieliujie
2337b9185a ANDROID: vendor_hooks: Add hook for binder
Add hook to support oem's performance feature.

Bug: 186482511

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: Ib495e80e569cc293eaa98d87a050aee8915eb415
2021-04-27 19:18:56 +00:00
Zhuguangqing
301e89472f ANDROID: Add vendor hook to binder.
Add vendor hook to get the binder message for vendor-specific tuning.

Bug: 182496370

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: Id47e59c4e3ccd07b26eef758ada147b98cd1964e
2021-03-24 18:13:25 +00:00
Liujie Xie
1e13e5d9b9 ANDROID: vendor_hooks: Add hooks for improving binder trans
Recognize important binder proc & binder thread and improve their sched
lantency.

Bug: 182952552
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I174949bf90a4215a6d27f24abbc7d324a321e662
2021-03-22 20:28:00 +00:00
Todd Kjos
10fc8b2584 ANDROID: simplify vendor hook definitions
Remove macro versions of hooks that are no longer needed. The
macro versions are still needed when the _rcuidle version
of the hook is used (as in include/trace/hooks/debug.h).

Bug: 177416721
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I4b50447e9a922ed038663d1459d7622dab30ffbb
2021-01-27 09:45:26 +00:00
Satya Durga Srinivasu Prabhala
90bd50a4d7 ANDROID: binder: consolidate wakeup vendor hooks into one
There are few vendor hooks available for binder wakeup related
functionality. As they both essentially do the same thing, we can
consolidate them into one.

Bug: 174219217
Change-Id: I44b472e7564eecbe8236ad2eb88b0433195f14d8
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-12-15 22:35:10 +00:00
Satya Durga Srinivasu Prabhala
37d7ed1b22 ANDROID: binder: Add vendor hooks
Add below vendor hooks to make vendor extensions possible.
	1. android_vh_binder_wakeup_poll_threads_ilocked
	2. android_vh_binder_wakeup_thread_ilocked

Bug: 174219217
Change-Id: I9f55ca4427583bbfb29a6808280a7d09e1fc22ee
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-12-02 16:25:08 +00:00
JianMin Liu
3fc5e94255 ANDROID: binder: Add vendor hook to the binder
- To apply vendor's performance tune for blocked binder transaction,
     add the hook on the begin/end of transaction.

   - ANDROID_VENDOR_DATA added to binder_transaction.

Bug: 161400830

Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: If60870623ce2669200238172737dd8455ac34b02
2020-07-28 03:03:52 +00:00