2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Add -D stats and -D progress options

add short options to turn on all stats, and all progress indicators,
also allow adding "no-" prefix to dump options to allow subtracting
individual options when short options are used.

eg.
  -D stats -D no-expr-simplify
This commit is contained in:
John Johansen
2010-11-09 11:53:38 -08:00
parent 6b4dff4bee
commit f1a3f66515

View File

@@ -191,28 +191,34 @@ typedef struct {
} optflag_table_t;
optflag_table_t dumpflag_table[] = {
{ 0, "rule-exprs", "Dump rule to expr tree conversions",
{ 1, "rule-exprs", "Dump rule to expr tree conversions",
DFA_DUMP_RULE_EXPR },
{ 0, "expr-stats", "Dump stats on expr tree", DFA_DUMP_TREE_STATS },
{ 0, "expr-tree", "Dump expression tree", DFA_DUMP_TREE },
{ 0, "expr-simplified", "Dump simplified expression tree",
{ 1, "expr-stats", "Dump stats on expr tree", DFA_DUMP_TREE_STATS },
{ 1, "expr-tree", "Dump expression tree", DFA_DUMP_TREE },
{ 1, "expr-simplified", "Dump simplified expression tree",
DFA_DUMP_SIMPLE_TREE },
{ 0, "dfa-progress", "Dump dfa creation as in progress",
DFA_DUMP_PROGRESS | DFA_DUMP_STATS },
{ 0, "dfa-stats", "Dump dfa creation stats", DFA_DUMP_STATS },
{ 0, "dfa-states", "Dump dfa state diagram", DFA_DUMP_STATES },
{ 0, "dfa-graph", "Dump dfa dot (graphviz) graph", DFA_DUMP_GRAPH },
{ 0, "dfa-minimize", "Dump dfa minimization", DFA_DUMP_MINIMIZE },
{ 0, "dfa-unreachable", "Dump dfa unreachable states",
DFA_DUMP_UNREACHABLE },
{ 0, "compress-progress", "Dump progress of compression",
DFA_DUMP_TRANS_PROGRESS | DFA_DUMP_TRANS_STATS },
{ 0, "compress-stats", "Dump stats on compression",
DFA_DUMP_TRANS_STATS },
{ 0, "compressed-dfa", "Dump compressed dfa", DFA_DUMP_TRANS_TABLE },
{ 0, "equiv-stats", "Dump equivance class stats",
{ 1, "stats", "Dump all compile stats",
DFA_DUMP_TREE_STATS | DFA_DUMP_STATS | DFA_DUMP_TRANS_STATS |
DFA_DUMP_EQUIV_STATS },
{ 0, "equiv", "Dump equivance class", DFA_DUMP_EQUIV },
{ 1, "progress", "Dump progress for all compile phases",
DFA_DUMP_PROGRESS | DFA_DUMP_STATS | DFA_DUMP_TRANS_PROGRESS |
DFA_DUMP_TRANS_STATS },
{ 1, "dfa-progress", "Dump dfa creation as in progress",
DFA_DUMP_PROGRESS | DFA_DUMP_STATS },
{ 1, "dfa-stats", "Dump dfa creation stats", DFA_DUMP_STATS },
{ 1, "dfa-states", "Dump dfa state diagram", DFA_DUMP_STATES },
{ 1, "dfa-graph", "Dump dfa dot (graphviz) graph", DFA_DUMP_GRAPH },
{ 1, "dfa-minimize", "Dump dfa minimization", DFA_DUMP_MINIMIZE },
{ 1, "dfa-unreachable", "Dump dfa unreachable states",
DFA_DUMP_UNREACHABLE },
{ 1, "compress-progress", "Dump progress of compression",
DFA_DUMP_TRANS_PROGRESS | DFA_DUMP_TRANS_STATS },
{ 1, "compress-stats", "Dump stats on compression",
DFA_DUMP_TRANS_STATS },
{ 1, "compressed-dfa", "Dump compressed dfa", DFA_DUMP_TRANS_TABLE },
{ 1, "equiv-stats", "Dump equivance class stats",
DFA_DUMP_EQUIV_STATS },
{ 1, "equiv", "Dump equivance class", DFA_DUMP_EQUIV },
{ 0, NULL, NULL, 0 },
};