
#15897: Negative MUT time in +RTS -s -RTS when heap profiling is enabled -------------------------------------+------------------------------------- Reporter: maoe | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Profiling | Version: 8.6.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Debugging | (amd64) information is incorrect | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * cc: bgamari (added) Comment: If I run this program with debug runtime I get this assertion failure: {{{ Main: internal error: ASSERTION FAILED: file rts/Stats.c, line 1123 (GHC version 8.7.20181115 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug zsh: abort (core dumped) ./Main 5000000 +RTS -s -h }}} Code that fails: {{{ // The subdivision of runtime into INIT/EXIT/GC/MUT is just adding // and subtracting, so the parts should add up to the total exactly. // Note that stats->total_ns is captured a tiny bit later than // end_exit_elapsed, so we don't use it here. ASSERT(stats.init_elapsed_ns \ + stats.mutator_elapsed_ns \ + stats.gc_elapsed_ns \ + sum.exit_elapsed_ns \ == end_exit_elapsed - start_init_elapsed); }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15897#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler