[Zeek-Dev] Compiling with --coverage flag

Jim Mellander jmellander at lbl.gov
Mon Jun 10 11:30:56 PDT 2019


I've been tinkering with the --coverage flag to capture runtime statistics
which can then be used to compile zeek with branch prediction hints.  My
preliminary tests indicate a substantial performance increase, enough to
justify engaging the zeek community.

I noticed that the configure script includes --enable-coverage, which
doesn't quite do what I want, as it compiles with debug support. and I'm
most interested in optimization for production use.

In brief, I've been testing:

./configure --enable-coverage

for the initial compile, then run against pcaps and live traffic, and use
that profiling data to recompile:

CFLAGS=’-fprofile-use -fprofile-correction -flto’ CXXFLAGS=’-fprofile-use
-fprofile-correction -flto’ ./configure

with a substantial performance boost against a regular compile (can
additionally do --build-type=Release for compiling with -O3 flag).

Has anyone else tinkered with this? - I would be happy to elaborate, and
discuss with others.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.icsi.berkeley.edu/pipermail/zeek-dev/attachments/20190610/226330cd/attachment.html 

More information about the zeek-dev mailing list