Subject: bug#78221: 31.0.50; Improving *-change-functions notifications

From: Stefan Monnier <[email-masked]>
Date: Sun, 04 May 2025 11:27:23 -0400

> The right tool to find these is cflow, combined with grep and awk (or
> python or perl or whatever) to search and filter cflow's output.  I've
> used these before.

Do you happen to remember the magic incantation to let `cflow` process
our sources correctly?  I tried the rule below and the errors file
suggests that the preprocessing is done correctly (it's full of
complaints but only about redefinitions), yet the result doesn't include
any info about the functions called by `insert_1_both` or
`Fput_text_property` (to take two randomly sampled cases of interest).

        Stefan

diff --git a/src/Makefile.in b/src/Makefile.in
index e4fc2fef711..2c7aa92f9b9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -699,6 +699,18 @@ MAKE_PDUMPER_FINGERPRINT =
 MAKE_PDUMPER_FINGERPRINT =
 endif
 
+cgraph.cflow:
+	cflow --all --brief --cpp='$(CC) -E $(ALL_CFLAGS)' \
+	    $(ALLOBJS:.o=.c) 				   \
+	    >$@ 2>$@.errors
+
+cgraph-rev.cflow:
+	cflow --reverse --all --brief --cpp='$(CC) -E $(ALL_CFLAGS)' \
+	    $(ALLOBJS:.o=.c) 					     \
+	    >$@ 2>$@.errors
+
+flowcharts: cgraph-rev.cflow cgraph.cflow
+
 ## We have to create $(etc) here because init_cmdargs tests its
 ## existence when setting Vinstallation_directory (FIXME?).
 ## This goes on to affect various things, and the emacs binary fails