Egypt

Source code grapher

gcc can creating profiling info when it builds. It generates a .expand file for each source file.

egypt is a script that takes these files and outputs a graphviz file.

Building NeoMutt

To build NeoMutt for egypt, you need to add a option to the compiler. The simplest way is to:

export EXTRA_CFLAGS="-fdump-rtl-expand"
./configure [OPTIONS]
make

Building Graphviz file

egypt can be run on any number of .expand files.

Just the startup code:

egypt main.c.*.expand init.c.*.expand > startup.gv

The compose dialog:

egypt compose/*.expand envelope/*.expand > compose.gv

Viewing the Graphviz file

The ImageMagick package has a display program that can view .gv files directly.

Alternatively, you can use GraphViz’s dot program to convert it to an image:

dot -Tpng compose.gv > compose.png

Filtering the output

The graphviz file is in text format and can get quite verbose. Especially with the frequent use of library functions. You may wish to filter out mutt_buffer_string().

Sample Output

envelope

Search by Algolia