This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto] Show addresses of cgraph nodes


Useful when debugging large callgraph sets.

Tested on x86_64.


Diego.


	* cgraph.c (dump_cgraph_node): Show memory address of NODE.
	* cgraph.h (csi_end_p): Tidy formatting.

Index: cgraph.c
===================================================================
--- cgraph.c	(revision 142823)
+++ cgraph.c	(working copy)
@@ -1139,7 +1139,8 @@ void
 dump_cgraph_node (FILE *f, struct cgraph_node *node)
 {
   struct cgraph_edge *edge;
-  fprintf (f, "%s/%i(%i):", cgraph_node_name (node), node->uid, node->pid);
+  fprintf (f, "%s/%i(%i) [%p]:", cgraph_node_name (node), node->uid,
+	   node->pid, (void *) node);
   if (node->global.inlined_to)
     fprintf (f, " (inline copy in %s/%i)",
 	     cgraph_node_name (node->global.inlined_to),
Index: cgraph.h
===================================================================
--- cgraph.h	(revision 142823)
+++ cgraph.h	(working copy)
@@ -425,7 +425,7 @@ const char *cgraph_inline_failed_string 
 static inline bool
 csi_end_p (cgraph_node_set_iterator csi)
 {
-  return csi.index >= VEC_length(cgraph_node_ptr, csi.set->nodes);
+  return csi.index >= VEC_length (cgraph_node_ptr, csi.set->nodes);
 }
 
 /* Advance iterator CSI. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]