1. 12 Jan, 2019 1 commit
    • Ömer Sinan Ağacan's avatar
      Fix negative mutator time in GC stats in prof builds · 19670bc3
      Ömer Sinan Ağacan authored
      Because garbage collector calls `retainerProfile()` and `heapCensus()`,
      GC times normally include some of PROF times too. To fix this we have
      these lines:
      
          // heapCensus() is called by the GC, so RP and HC time are
          // included in the GC stats.  We therefore subtract them to
          // obtain the actual GC cpu time.
          stats.gc_cpu_ns      -=  prof_cpu;
          stats.gc_elapsed_ns  -=  prof_elapsed;
      
      These variables are later used for calculating GC time excluding the
      final GC (which should be attributed to EXIT).
      
          exit_gc_elapsed      = stats.gc_elapsed_ns - start_exit_gc_elapsed;
      
      The problem is if we subtract PROF times from `gc_elapsed_ns` and then
      subtract `start_exit_gc_elapsed` from the result, we end up subtracting
      PROF times twice, because `start_exit_gc_elapsed` also includes PROF
      times.
      
      We now subtract PROF times from GC after the calculations for EXIT and
      MUT times. The existing assertion that checks
      
          INIT + MUT + GC + EXIT = TOTAL
      
      now holds. When we subtract PROF numbers from GC, and a new assertion
      
          INIT + MUT + GC + PROF + EXIT = TOTAL
      
      also holds.
      
      Fixes #15897. New assertions added in this commit also revealed #16102,
      which is also fixed by this commit.
      19670bc3
  2. 01 Jul, 2018 1 commit
  3. 22 Nov, 2017 1 commit
  4. 24 May, 2016 1 commit
    • seraphime's avatar
      Fix: #12084 deprecate old profiling flags · 1956cbf1
      seraphime authored
      Change help message so it doesn't specify -auto-all.
      Make old profiling flags deprecated as they are no longer
      documented.
      Update Makefile and documentation accordingly.
      Update release notes for ghc 8.2
      
      Test Plan:
      ./verify; `ghc --help` shouldn't specify the -auto-all
      flag. Furthermore `ghc -fprof -auto-all` should emit a warning
      
      Reviewed By: thomie, austin
      
      Differential Revision: https://phabricator.haskell.org/D2257
      
      GHC Trac Issues: #12084
      
      Update submodule nofib
      1956cbf1
  5. 26 Jan, 2016 1 commit
    • thomie's avatar
      Fix segmentation fault when .prof file not writeable · 6d2bdfd8
      thomie authored
      There are two ways to do retainer profiling. Quoting from the user's guide:
        1. `+RTS -hr` "Breaks down the graph by retainer set"
        2. `+RTS -hr<cc> -h<x>`, where `-h<x>` is one of normal heap profiling
           break-down options (e.g. `-hc`), and `-hr<cc> means "Restrict the
           profile to closures with retainer sets containing cost-centre
           stacks with one of the specified cost centres at the top."
      
      Retainer profiling writes to a .hp file, like the other heap profiling
      options, but also to a .prof file. Therefore, when the .prof file is not
      writeable for whatever reason, retainer profiling should be turned off
      completely.
      
      This worked ok when running the program with `+RTS -hr` (option 1), but a
      segfault would occur when using `+RTS -hr<cc> -h<x>`, with `x!=r` (option 2).
      
      This commit fixes that.
      
      Reviewed by: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1849
      
      GHC Trac Issues: #11489
      6d2bdfd8
  6. 20 Jul, 2011 1 commit
  7. 20 Apr, 2011 1 commit
    • Simon Peyton Jones's avatar
      Add TEST_HC_OPTS to every Makefile invocation of TEST_HC · 6c32ee85
      Simon Peyton Jones authored
      In the testsuite there are numerous Makefiles that invoke $(TEST_HC).
      But, unlike the tests invoked directly by the harness, they didn't pass
      -dno-debug-output, or $(EXTRA_HC_OPTS).
      
      This patch goes part-way towards the goal of making the two consistent:
      
      * Almost all invocations in the Makefiles now go
          '$(TEST_HC)' $(TEST_HC_OPTS)
      
      * In test.mk we initialise
           TEST_HC_OPTS = -dno-debug-output $(EXTRA_HC_OPTS)
      
      Still to come (I don't know how to do these)
      
      * The invocations of TEST_HC via cabal are not treated
        (eg cabal01, cabal04), and they should be
      
      * TEST_HC_OPTS should probably be initialised the same way
        as the Python script computes the flags to pass to the
        TEST_HC that it calls directly
      6c32ee85
  8. 18 Oct, 2010 1 commit
  9. 08 May, 2007 1 commit
  10. 22 Aug, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-08-22 10:42:32 by simonmar] · 6011b4e5
      simonmar authored
      Use makefiles in the subdirectories to ease running the test driver in
      a subdirectory.  It can be run in the following ways:
      
       	make		-- run all the tests in the current directory
       	make verbose	-- as make test, but up the verbosity
       	make accept	-- run the tests, accepting the current output
      
      and you can also set some variables on the command line, eg.
      
      	make accept TESTS=arr001  -- accept an individual test
      	make EXTRA_HC_OPTS='-v'   -- extra flags to the haskell compiler
      	make CONFIG=<config>	  -- use a different test config
      
      this will all go in the docs at some point.
      6011b4e5