aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/ChangeLog
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-02-21 09:28:55 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2020-02-26 06:57:22 -0500
commit67fa274cd635ec3c8af635294b67f09e45e3c56a (patch)
tree5e4a3b45327dc89b6d8791fa236a6c48cb7c0b46 /gcc/analyzer/ChangeLog
parentce25177f505ea75b3c0833c3f3f0072b97ee1b44 (diff)
analyzer: improvements to logging/dumping
This patch adds various information to -fdump-analyzer and -fdump-analyzer-stderr to make it easier to track down problems with state explosions in the exploded_graph. It logs the number of unprocessed nodes in the worklist, for the case where the upper limit on exploded nodes is reached. It prints: [a] a bar chart showing the number of exploded nodes by function, and [b] bar charts for each function showing the number of exploded nodes per supernode/BB, and [c] bar charts for each function showing the number of excess exploded nodes per supernode/BB beyond the limit (--param=analyzer-max-enodes-per-program-point), where that limit was reached I've found these helpful in finding exactly where we fail to consolidate state, leading to state explosions and false negatives due to the thresholds being reached. The patch also adds a "superedge::dump" member function I found myself needing. gcc/ChangeLog: * Makefile.in (ANALYZER_OBJS): Add analyzer/bar-chart.o. gcc/analyzer/ChangeLog: * bar-chart.cc: New file. * bar-chart.h: New file. * engine.cc: Include "analyzer/bar-chart.h". (stats::log): Only log the m_num_nodes kinds that are non-zero. (stats::dump): Likewise when dumping. (stats::get_total_enodes): New. (exploded_graph::get_or_create_node): Increment the per-point-data m_excess_enodes when hitting the per-program-point limit on enodes. (exploded_graph::print_bar_charts): New. (exploded_graph::log_stats): Log the number of unprocessed enodes in the worklist. Call print_bar_charts. (exploded_graph::dump_stats): Print the number of unprocessed enodes in the worklist. * exploded-graph.h (stats::get_total_enodes): New decl. (struct per_program_point_data): Add field m_excess_enodes. (exploded_graph::print_bar_charts): New decl. * supergraph.cc (superedge::dump): New. (superedge::dump): New. * supergraph.h (supernode::get_function): New. (superedge::dump): New decl. (superedge::dump): New decl.
Diffstat (limited to 'gcc/analyzer/ChangeLog')
-rw-r--r--gcc/analyzer/ChangeLog25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog
index f92b56f68c6..982cc3ca9fd 100644
--- a/gcc/analyzer/ChangeLog
+++ b/gcc/analyzer/ChangeLog
@@ -1,3 +1,28 @@
+2020-02-26 David Malcolm <dmalcolm@redhat.com>
+
+ * bar-chart.cc: New file.
+ * bar-chart.h: New file.
+ * engine.cc: Include "analyzer/bar-chart.h".
+ (stats::log): Only log the m_num_nodes kinds that are non-zero.
+ (stats::dump): Likewise when dumping.
+ (stats::get_total_enodes): New.
+ (exploded_graph::get_or_create_node): Increment the per-point-data
+ m_excess_enodes when hitting the per-program-point limit on
+ enodes.
+ (exploded_graph::print_bar_charts): New.
+ (exploded_graph::log_stats): Log the number of unprocessed enodes
+ in the worklist. Call print_bar_charts.
+ (exploded_graph::dump_stats): Print the number of unprocessed
+ enodes in the worklist.
+ * exploded-graph.h (stats::get_total_enodes): New decl.
+ (struct per_program_point_data): Add field m_excess_enodes.
+ (exploded_graph::print_bar_charts): New decl.
+ * supergraph.cc (superedge::dump): New.
+ (superedge::dump): New.
+ * supergraph.h (supernode::get_function): New.
+ (superedge::dump): New decl.
+ (superedge::dump): New decl.
+
2020-02-24 David Malcolm <dmalcolm@redhat.com>
* engine.cc (exploded_graph::get_or_create_node): Dump the