diff mbox

Simple change in dot dumper -- Display profile count and branch probability

Message ID CAAkRFZKT8mxvgsncnwFz=-tzhJNP1gced=M9pgv8N63QD+raFg@mail.gmail.com
State New
Headers show

Commit Message

Xinliang David Li April 23, 2013, 5:40 a.m. UTC
Hi, this is a follow up simple patch to support 'slim' graph dump:
when -slim option is specified (e.g,
-fdump-tree-optimized-graph-slim), do not dump the boby.

2013-04-22  Xinliang David Li  <davidxl@google.com>

        * cfghhooks.c (dump_bb_for_graph): Support 'slim' graph dump.




Ok for trunk?

thanks,

David

On Mon, Apr 22, 2013 at 12:23 PM, Diego Novillo <dnovillo@google.com> wrote:
> On 2013-04-21 02:37 , Xinliang David Li wrote:
>>
>>          * graph.c (draw_cfg_node_succ_edges): Add branch probility as
>> label.
>>          * cfghhooks.c (dump_bb_for_graph): Dump profile count and
>> frquency.
>>          * Makefile.in: New dependency.
>
>
> Looks OK.
>
>
> Diego.

Comments

Richard Biener April 23, 2013, 8:52 a.m. UTC | #1
On Tue, Apr 23, 2013 at 7:40 AM, Xinliang David Li <davidxl@google.com> wrote:
> Hi, this is a follow up simple patch to support 'slim' graph dump:
> when -slim option is specified (e.g,
> -fdump-tree-optimized-graph-slim), do not dump the boby.

Ok.

Thanks,
Richard.

> 2013-04-22  Xinliang David Li  <davidxl@google.com>
>
>         * cfghhooks.c (dump_bb_for_graph): Support 'slim' graph dump.
>
>
> Index: cfghooks.c
> ===================================================================
> --- cfghooks.c  (revision 198165)
> +++ cfghooks.c  (working copy)
> @@ -313,7 +313,8 @@ dump_bb_for_graph (pretty_printer *pp, b
>      pp_printf (pp, "COUNT:" HOST_WIDEST_INT_PRINT_DEC, bb->count);
>    pp_printf (pp, " FREQ:%i |", bb->frequency);
>    pp_write_text_to_stream (pp);
> -  cfg_hooks->dump_bb_for_graph (pp, bb);
> +  if (!(dump_flags & TDF_SLIM))
> +    cfg_hooks->dump_bb_for_graph (pp, bb);
>  }
>
>  /* Dump the complete CFG to FILE.  FLAGS are the TDF_* flags in dumpfile.h.  */
>
>
> Ok for trunk?
>
> thanks,
>
> David
>
> On Mon, Apr 22, 2013 at 12:23 PM, Diego Novillo <dnovillo@google.com> wrote:
>> On 2013-04-21 02:37 , Xinliang David Li wrote:
>>>
>>>          * graph.c (draw_cfg_node_succ_edges): Add branch probility as
>>> label.
>>>          * cfghhooks.c (dump_bb_for_graph): Dump profile count and
>>> frquency.
>>>          * Makefile.in: New dependency.
>>
>>
>> Looks OK.
>>
>>
>> Diego.
diff mbox

Patch

Index: cfghooks.c
===================================================================
--- cfghooks.c  (revision 198165)
+++ cfghooks.c  (working copy)
@@ -313,7 +313,8 @@  dump_bb_for_graph (pretty_printer *pp, b
     pp_printf (pp, "COUNT:" HOST_WIDEST_INT_PRINT_DEC, bb->count);
   pp_printf (pp, " FREQ:%i |", bb->frequency);
   pp_write_text_to_stream (pp);
-  cfg_hooks->dump_bb_for_graph (pp, bb);
+  if (!(dump_flags & TDF_SLIM))
+    cfg_hooks->dump_bb_for_graph (pp, bb);
 }

 /* Dump the complete CFG to FILE.  FLAGS are the TDF_* flags in dumpfile.h.  */