Skip to content

Commit

Permalink
Merge branch 'rickard/gcov-fix' into maint
Browse files Browse the repository at this point in the history
* rickard/gcov-fix:
  [erts] Document how to generate gcov html results
  [erts] Make sure gcov-emulator produce results
  • Loading branch information
rickard-green committed Feb 27, 2025
2 parents 2bc5510 + 5113e2e commit 92a0159
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions HOWTO/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <OUTPUT_DIR>`
* -gdb
* Start an Emacs gdb debugging session. Can be combined with -debug.
* -core /path/to/core/file
Expand Down
4 changes: 4 additions & 0 deletions erts/emulator/beam/erl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,6 +2676,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)
Expand Down

0 comments on commit 92a0159

Please sign in to comment.