Skip to contentSkip to conversation

Have ckpt_debug() print global pid and __LINE__

PATCH In review Sukadev Bhattiprolu 2 participants 2 messages Jul 2, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Have ckpt_debug() print global pid and __LINE__

Have ckpt_debug() print global-pid and __LINE__

Printing both global and virtual pid helps correlating dmesg with logs from mktree.

---
 include/linux/checkpoint.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
include/linux/checkpoint.h +6 -6
Index: linux-cr/include/linux/checkpoint.h
===================================================================
@@ -281,12 +281,12 @@ extern int restore_signal(struct ckpt_ct
 extern unsigned long ckpt_debug_level;
 
 /* use this to select a specific debug level */
-#define _ckpt_debug(level, fmt, args...)			\
-	do {							\
-		if (ckpt_debug_level & (level))			\
-			printk(KERN_DEBUG "[%d:c/r:%s] " fmt,	\
-				task_pid_vnr(current),		\
-				 __func__, ## args);		\
+#define _ckpt_debug(level, fmt, args...)				\
+	do {								\
+		if (ckpt_debug_level & (level))				\
+			printk(KERN_DEBUG "[%d:%d:c/r:%s:%d] " fmt,	\
+				current->pid, task_pid_vnr(current),	\
+				 __func__, __LINE__, ## args);		\
 	} while (0)
 
 /*

A message that is not in the archive (sent off-list or not yet received): 20090702022541.GA31350-r/[email protected]

#2 lore raw

Good idea - in queue for v17.

Thanks,

Oren.

Quoted 35 lines · Sukadev Bhattiprolu

Have ckpt_debug() print global-pid and __LINE__

Printing both global and virtual pid helps correlating dmesg with logs from mktree.

---
 include/linux/checkpoint.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: linux-cr/include/linux/checkpoint.h
===================================================================

include/linux/checkpoint.h +6 -6
@@ -281,12 +281,12 @@ extern int restore_signal(struct ckpt_ct
 extern unsigned long ckpt_debug_level;
 
 /* use this to select a specific debug level */
-#define _ckpt_debug(level, fmt, args...)			\
-	do {							\
-		if (ckpt_debug_level & (level))			\
-			printk(KERN_DEBUG "[%d:c/r:%s] " fmt,	\
-				task_pid_vnr(current),		\
-				 __func__, ## args);		\
+#define _ckpt_debug(level, fmt, args...)				\
+	do {								\
+		if (ckpt_debug_level & (level))				\
+			printk(KERN_DEBUG "[%d:%d:c/r:%s:%d] " fmt,	\
+				current->pid, task_pid_vnr(current),	\
+				 __func__, __LINE__, ## args);		\
 	} while (0)
 
 /*