From: Yunji Kim Date: Tue, 5 Jun 2018 07:26:17 +0000 (+0900) Subject: [COMMON] lib: dss-reader: Modify dss-reader to trace binder transactions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3e93f1971a3e30c58153189b78c4b845f2f84bd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] lib: dss-reader: Modify dss-reader to trace binder transactions Change-Id: Iae83e6822054eb192cfa7e441b1b8dd2257fdb1e Signed-off-by: Yunji Kim --- diff --git a/lib/dss-reader.c b/lib/dss-reader.c index 2fd40f60fbd3..b5d12a62c79a 100644 --- a/lib/dss-reader.c +++ b/lib/dss-reader.c @@ -70,6 +70,26 @@ int main(int argc, char *argv[]) break; } } +#ifdef CONFIG_DEBUG_SNAPSHOT_BINDER + for (i = 0; i < DSS_API_MAX_NUM << 2; i++) + { + printf("log[%.9f] = { 'type' : 'binder', 'cpu' : %d, 'trace_type' : %d, 'transaction_id' : %d, 'from_pid' : %d,"\ + " 'from_tid' : %d, 'to_pid' : %d, 'to_tid' : %d, 'from_pid_comm' : '%s', 'from_tid_comm' : '%s',"\ + " 'to_pid_comm' : '%s', 'to_tid_comm' : '%s', 'to_node_id' : %d, 'reply' : %d, 'flags' : 0x%x, 'code' : 0x%x,"\ + " 'return_error' : %d, 'return_error_param' : %d, 'return_error_line' : %d}\n", + p->binder[i].time/1.0e9, + p->binder[i].cpu, + p->binder[i].base.trace_type, p->binder[i].base.transaction_id, + p->binder[i].base.from_pid, p->binder[i].base.from_tid, p->binder[i].base.to_pid, p->binder[i].base.to_tid, + p->binder[i].base.from_pid_comm, p->binder[i].base.from_tid_comm, + p->binder[i].base.to_pid_comm, p->binder[i].base.to_tid_comm, + p->binder[i].transaction.to_node_id, p->binder[i].transaction.reply, + p->binder[i].transaction.flags, p->binder[i].transaction.code, + p->binder[i].error.return_error, p->binder[i].error.return_error_param, p->binder[i].error.return_error_line); + if (p->binder[i].time == 0) + break; + } +#endif return 0; }