comparison: Add a mode to not apply filters on interface sub-graphs
authorDodji Seketeli <dodji@redhat.com>
Thu, 16 Feb 2023 11:19:21 +0000 (12:19 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 2 Mar 2023 17:31:43 +0000 (18:31 +0100)
commit82f50f2093a6a8f5124dc327e7d814f90f67eb4e
tree2666ad9dcd4d89b4ed317043fd610cd727a25d5e
parent945f23a6937d1de6f85d77361f00239e4ce0d9c7
comparison: Add a mode to not apply filters on interface sub-graphs

This patch allows to avoid applying filters on interface diff node
sub-graphs because those filters are useful for interface impact
analysis only, which is not needed in the leaf-node report, for
instance.  When using the leaf-node report, this capability speeds up
corpus_diff::apply_filters_and_suppressions_before_reporting, hence
the functions like corpus_diff::{has_incompatible_changes,
has_net_subtype_changes} are sped up too.

That patch thus adds a --no-change-categorization option to abidiff to
avoid doing that change categorization (A.K.A applying filters).

* doc/manuals/abidiff.rst: Document the new
--no-change-categorization option.
* doc/manuals/kmidiff.rst: Likewise.
* include/abg-comparison.h
(diff_context::perform_change_categorization): Declare new
accessor member functions.
* src/abg-comparison-priv.h
(diff_context::priv::perform_change_categorization_): Add new data
member.
(diff_context::priv::priv): Initialize the new data member.
* src/abg-comparison.cc
(diff_context::perform_change_categorization): Define new accessor
member functions.
(corpus_diff::priv::apply_filters_and_compute_diff_stats):
Don't apply filters on the diff node sub-graphs of interfaces when
the user requested "no change categorization".
* tools/abidiff.cc (options::perform_change_categorization): New
data member.
(options::options): Initialize the new data member.
(display_usage): Add a help string for the new
--no-change-categorization.
(parse_command_line): Parse the new --no-change-categorization
option.
(set_diff_context_from_opts): Set the option on the diff context
here.
* tools/kmidiff.cc(options::perform_change_categorization): New
data member.
(options::options): Initialize the new data member.
(display_usage): Add a help string for the new
--no-change-categorization.
(parse_command_line): Parse the new --no-change-categorization
option.
(set_diff_context_from_opts): Set the option on the diff context
here.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
doc/manuals/abidiff.rst
doc/manuals/kmidiff.rst
include/abg-comparison.h
src/abg-comparison-priv.h
src/abg-comparison.cc
tools/abidiff.cc
tools/kmidiff.cc