lkml.org 
[lkml]   [2016]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RESEND] printk: add tgid and comm in dump_stack_print_info
Date
Some threads'name of android is the same in different process.
So we need to get the tgid and the comm of thread's group_leader.

Signed-off-by: Liu Hailong <liuhailong5@huawei.com>
Signed-off-by: Li Pengcheng <lipengcheng8@huawei.com>
Signed-off-by: Chen Feng <puck.chen@hisilicon.com>
---
kernel/printk/printk.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index bfbf284..84246b3 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3166,6 +3166,9 @@ void dump_stack_print_info(const char *log_lvl)
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);

+ printk("TGID: %d Comm: %.20s\n",
+ current->tgid, current->group_leader->comm);
+
if (dump_stack_arch_desc_str[0] != '\0')
printk("%sHardware name: %s\n",
log_lvl, dump_stack_arch_desc_str);
--
1.8.3.2
\
 
 \ /
  Last update: 2016-05-23 10:21    [W:0.026 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site