diff --git a/HOWTO/DEVELOPMENT.md b/HOWTO/DEVELOPMENT.md index 102842020580..b68592c62145 100644 --- a/HOWTO/DEVELOPMENT.md +++ b/HOWTO/DEVELOPMENT.md @@ -347,6 +347,7 @@ switches are: * Set environment variable `ASAN_OPTIONS` for any extra asan options you want to pass. * -gcov * Start a gcov run-time system. + * Generate results by running: `$ERL_TOP/erts/etc/unix/gcov-gen-html $ERL_TOP ` * -gdb * Start an Emacs gdb debugging session. Can be combined with -debug. * -core /path/to/core/file diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index a875fba8958b..0aa4e7441280 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -2667,6 +2667,10 @@ __decl_noreturn void __noreturn erts_exit_epilogue(int flush) sys_tty_reset(n); +#ifdef ERTS_GCOV + flush = !0; /* otherwise we get no results... */ +#endif + if (n == ERTS_INTR_EXIT) (void) (flush ? exit(0) : _exit(0)); else if (n == ERTS_DUMP_EXIT)