mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qfcc] Add filename to dot output
It makes things so much easier when viewing the graphs
This commit is contained in:
parent
f0ecf7b30a
commit
f7757cf894
4 changed files with 4 additions and 0 deletions
|
@ -176,6 +176,7 @@ dot_dump_dag (void *_dag, const char *filename)
|
|||
dstring_t *dstr = dstring_newstr();
|
||||
|
||||
dasprintf (dstr, "digraph dag_%p {\n", dag);
|
||||
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
|
||||
dasprintf (dstr, " layout=dot;\n");
|
||||
dasprintf (dstr, " clusterrank=local;\n");
|
||||
dasprintf (dstr, " rankdir=TB;\n");
|
||||
|
|
|
@ -551,6 +551,7 @@ dump_dot_expr (void *_e, const char *filename)
|
|||
expr_t *e = (expr_t *) _e;
|
||||
|
||||
dasprintf (dstr, "digraph expr_%p {\n", e);
|
||||
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
|
||||
dasprintf (dstr, " layout=dot; rankdir=TB; compound=true;\n");
|
||||
_print_expr (dstr, e, 0, ++id, 0);
|
||||
dasprintf (dstr, "}\n");
|
||||
|
|
|
@ -332,6 +332,7 @@ print_flowgraph (flow_dot_t *method, flowgraph_t *graph, const char *filename)
|
|||
dstring_t *dstr = dstring_newstr();
|
||||
|
||||
dasprintf (dstr, "digraph flowgraph_%s_%p {\n", method->type, graph);
|
||||
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
|
||||
dasprintf (dstr, " layout=dot;\n");
|
||||
dasprintf (dstr, " clusterrank=local;\n");
|
||||
dasprintf (dstr, " rankdir=TB;\n");
|
||||
|
|
|
@ -128,6 +128,7 @@ print_sblock (sblock_t *sblock, const char *filename)
|
|||
dstring_t *dstr = dstring_newstr();
|
||||
|
||||
dasprintf (dstr, "digraph sblock_%p {\n", sblock);
|
||||
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
|
||||
dasprintf (dstr, " layout=dot; rankdir=TB;\n");
|
||||
for (i = 0; sblock; sblock = sblock->next, i++)
|
||||
flow_sblock (dstr, sblock, i);
|
||||
|
|
Loading…
Reference in a new issue