Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  [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 41875a7 + 92a0159 commit 745717a
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 @@ -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)
Expand Down

0 comments on commit 745717a

Please sign in to comment.