FROMLIST: binder: remove binder_debug_no_lock mechanism
(from https://patchwork.kernel.org/patch/9817811/) With the global lock, there was a mechanism to acceess binder driver debugging information with the global lock disabled to debug deadlocks or other issues. This mechanism is rarely (if ever) used anymore and wasn't needed during the development of fine-grained locking in the binder driver. Removing it. Change-Id: Ie1cf45748cefa433607a97c2ef322e7906efe0f7 Signed-off-by: Todd Kjos <tkjos@google.com>
This commit is contained in:
parent
2324f70c5a
commit
a19f3efc4f
1 changed files with 8 additions and 23 deletions
|
@ -107,9 +107,6 @@ static uint32_t binder_debug_mask = BINDER_DEBUG_USER_ERROR |
|
|||
BINDER_DEBUG_FAILED_TRANSACTION | BINDER_DEBUG_DEAD_TRANSACTION;
|
||||
module_param_named(debug_mask, binder_debug_mask, uint, S_IWUSR | S_IRUGO);
|
||||
|
||||
static bool binder_debug_no_lock;
|
||||
module_param_named(proc_no_lock, binder_debug_no_lock, bool, S_IWUSR | S_IRUGO);
|
||||
|
||||
static char *binder_devices_param = CONFIG_ANDROID_BINDER_DEVICES;
|
||||
module_param_named(devices, binder_devices_param, charp, S_IRUGO);
|
||||
|
||||
|
@ -3508,10 +3505,8 @@ static int binder_state_show(struct seq_file *m, void *unused)
|
|||
{
|
||||
struct binder_proc *proc;
|
||||
struct binder_node *node;
|
||||
int do_lock = !binder_debug_no_lock;
|
||||
|
||||
if (do_lock)
|
||||
binder_lock(__func__);
|
||||
binder_lock(__func__);
|
||||
|
||||
seq_puts(m, "binder state:\n");
|
||||
|
||||
|
@ -3522,18 +3517,15 @@ static int binder_state_show(struct seq_file *m, void *unused)
|
|||
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node)
|
||||
print_binder_proc(m, proc, 1);
|
||||
if (do_lock)
|
||||
binder_unlock(__func__);
|
||||
binder_unlock(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int binder_stats_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
int do_lock = !binder_debug_no_lock;
|
||||
|
||||
if (do_lock)
|
||||
binder_lock(__func__);
|
||||
binder_lock(__func__);
|
||||
|
||||
seq_puts(m, "binder stats:\n");
|
||||
|
||||
|
@ -3541,24 +3533,20 @@ static int binder_stats_show(struct seq_file *m, void *unused)
|
|||
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node)
|
||||
print_binder_proc_stats(m, proc);
|
||||
if (do_lock)
|
||||
binder_unlock(__func__);
|
||||
binder_unlock(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int binder_transactions_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
int do_lock = !binder_debug_no_lock;
|
||||
|
||||
if (do_lock)
|
||||
binder_lock(__func__);
|
||||
binder_lock(__func__);
|
||||
|
||||
seq_puts(m, "binder transactions:\n");
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node)
|
||||
print_binder_proc(m, proc, 0);
|
||||
if (do_lock)
|
||||
binder_unlock(__func__);
|
||||
binder_unlock(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3566,10 +3554,8 @@ static int binder_proc_show(struct seq_file *m, void *unused)
|
|||
{
|
||||
struct binder_proc *itr;
|
||||
int pid = (unsigned long)m->private;
|
||||
int do_lock = !binder_debug_no_lock;
|
||||
|
||||
if (do_lock)
|
||||
binder_lock(__func__);
|
||||
binder_lock(__func__);
|
||||
|
||||
hlist_for_each_entry(itr, &binder_procs, proc_node) {
|
||||
if (itr->pid == pid) {
|
||||
|
@ -3577,8 +3563,7 @@ static int binder_proc_show(struct seq_file *m, void *unused)
|
|||
print_binder_proc(m, itr, 1);
|
||||
}
|
||||
}
|
||||
if (do_lock)
|
||||
binder_unlock(__func__);
|
||||
binder_unlock(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue