This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Show addresses of cgraph nodes
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 Dec 2008 08:47:39 -0500
- Subject: [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. */