diff options
author | Dhoat Harpal <hdhoat@codeaurora.org> | 2017-06-19 21:26:13 +0530 |
---|---|---|
committer | Dhoat Harpal <hdhoat@codeaurora.org> | 2017-06-20 15:43:11 +0530 |
commit | 31d03180998589c6501f94aa889815936013431e (patch) | |
tree | 0c0c0b7dbf3a4d2c051f2092184718eb6ba228a2 /net/ipc_router | |
parent | d4041b86d5e341c82a4e5b0cd09f4edc7ecb068a (diff) |
soc: qcom: ipc_router: Improve IPC attribution
Change the IPC wakelock name to include PID since
complete process name is not printed in many bugreports.
IPC wakelock are of format ipc<port_id>_<PID>_<proc_name>.
Improve debugfs logging to include port_id to service_id mapping
and the amount of transactions on each local port. This information
is helpful in associating a local port with the service ID. This
info is present in /d/dump_local_ports.
CRs-Fixed: 2063352
Change-Id: Id6406f89b3b61066399ef5660b9d2ab37bff6728
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Diffstat (limited to 'net/ipc_router')
-rw-r--r-- | net/ipc_router/ipc_router_core.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/net/ipc_router/ipc_router_core.c b/net/ipc_router/ipc_router_core.c index f08aef9509bb..5cb309a11f82 100644 --- a/net/ipc_router/ipc_router_core.c +++ b/net/ipc_router/ipc_router_core.c @@ -364,6 +364,8 @@ static void ipc_router_log_msg(void *log_ctx, uint32_t xchng_type, svcId = rport_ptr->server->name.service; svcIns = rport_ptr->server->name.instance; port_type = CLIENT_PORT; + port_ptr->last_served_svc_id = + rport_ptr->server->name.service; } else if (port_ptr && (port_ptr->type == SERVER_PORT)) { svcId = port_ptr->port_name.service; svcIns = port_ptr->port_name.instance; @@ -1329,8 +1331,9 @@ struct msm_ipc_port *msm_ipc_router_create_raw_port(void *endpoint, mutex_init(&port_ptr->port_rx_q_lock_lhc3); init_waitqueue_head(&port_ptr->port_rx_wait_q); snprintf(port_ptr->rx_ws_name, MAX_WS_NAME_SZ, - "ipc%08x_%s", + "ipc%08x_%d_%s", port_ptr->this_port.port_id, + task_pid_nr(current), current->comm); port_ptr->port_rx_ws = wakeup_source_register(port_ptr->rx_ws_name); if (!port_ptr->port_rx_ws) { @@ -3867,16 +3870,18 @@ static void dump_local_ports(struct seq_file *s) int j; struct msm_ipc_port *port_ptr; - seq_printf(s, "%-11s|%-11s|\n", - "Node_id", "Port_id"); + seq_printf(s, "%-11s|%-11s|%-32s|%-11s|\n", + "Node_id", "Port_id", "Wakelock", "Last SVCID"); seq_puts(s, "------------------------------------------------------------\n"); down_read(&local_ports_lock_lhc2); for (j = 0; j < LP_HASH_SIZE; j++) { list_for_each_entry(port_ptr, &local_ports[j], list) { mutex_lock(&port_ptr->port_lock_lhc3); - seq_printf(s, "0x%08x |0x%08x |\n", - port_ptr->this_port.node_id, - port_ptr->this_port.port_id); + seq_printf(s, "0x%08x |0x%08x |%-32s|0x%08x |\n", + port_ptr->this_port.node_id, + port_ptr->this_port.port_id, + port_ptr->rx_ws_name, + port_ptr->last_served_svc_id); mutex_unlock(&port_ptr->port_lock_lhc3); } } |