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

login
register
mail settings
Submitter Xinliang David Li
Date April 23, 2013, 5:40 a.m.
Message ID <CAAkRFZKT8mxvgsncnwFz=-tzhJNP1gced=M9pgv8N63QD+raFg@mail.gmail.com>
Download mbox | patch
Permalink /patch/238753/
State New
Headers show

Comments

Xinliang David Li - April 23, 2013, 5:40 a.m.
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.
Richard Guenther - April 23, 2013, 8:52 a.m.
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.

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.  */