1. 04 Apr, 2017 1 commit
  2. 03 Apr, 2017 1 commit
  3. 02 Apr, 2017 1 commit
    • Simon Marlow's avatar
      Report heap overflow in the same way as stack overflow · 61ba4518
      Simon Marlow authored
      Now that we throw an exception for heap overflow, we should only print
      the heap overflow message in the main thread when the HeapOverflow
      exception is caught, rather than as a side effect in the GC.
      
      Stack overflows were already done this way, I just made heap overflow
      consistent with stack overflow, and did some related cleanup.
      
      Fixes broken T2592(profasm) which was reporting the heap overflow
      message twice (you would only notice when building with profiling
      libs enabled).
      
      Test Plan: validate
      
      Reviewers: bgamari, niteria, austin, DemiMarie, hvr, erikd
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3394
      61ba4518
  4. 01 Apr, 2017 1 commit
  5. 29 Mar, 2017 1 commit
  6. 28 Mar, 2017 2 commits
  7. 27 Mar, 2017 6 commits
    • Gabor Greif's avatar
      Don't redefine typedef names · a6675a93
      Gabor Greif authored
      instead define the structs referred to by
       - SectionFormatInfo
       - ObjectCodeFormatInfo
      
      that were only forward-declared earlier.
      
      This fixes redefinition errors with gcc4.4
      a6675a93
    • Moritz Angermann's avatar
      Adds aarch64 linker for mach-o files. · e8a27410
      Moritz Angermann authored
      This is the final commit that ties them all together. Here we
      add the aarch64 linker for macho files.
      
      - In D3238 we started allowing preloading object code with mmap
        in iOS, where we can't have r+w+x.
      - In D3239 we introduced a richer extension of the object code
        data type to make working with mach-o files easier.
      - In D3240 we set the stage to allow loading archives (.a) on iOS
      - In D3251 we added init and deinit functions to populate and
        depopulate the enriched object code data structure for mach-o
        files.
      - In D3252 we refactored most of the MachO.c file to use the
        new types and datastructure.
      
      This commit will than finally add the aarch64 (arm64) linker
      for mach-o files to ghc, using the improved foundation we
      have constructed above.
      
      The dependency structure therefore is as follows
      
      ```
        .- D3240
        v
      This <- D3252 <- D3251 <- D3239
        ^
        '- D3238
      ```
      
      Depends: D3252, D3240, D3238
      
      Test Plan:
      To test this with iOS, we also need the remote-iserv
      diff D3233. With all that in place, proceed as follows:
      
      - Build ghc for the host
      
      ```
        ghc $ ./configure --prefix=/test/opt \
          --disable-large-address-space \
          --with-llc=/path/to/llvm-3.9/bin/llc \
          --with-opt=/path/to/llvm-3.9/bin/opt
        # edit mk/build.mk to specify quick
        ghc $ make && make install
      ```
      
      - Build ghc for ios
      
      ```
        ghc $ ./configure --target=aarch64-apple-darwin14 \
          --prefix=/test/opt \
          --disable-large-address-space \
          --with-llc=/path/to/llvm-3.9/bin/llc \
          --with-opt=/path/to/llvm-3.9/bin/opt \
          --with-ghc=/test/bin/ghc \
          --enable-bootstrap-with-devel-snapshot
        # edit mk/build.mk to specify quick-cross
        ghc $ make && make install
      
      ```
      - Obtain the iOS wrapper scripts from
      https://github.com/angerman/ghc-ios-scripts
        and place them in PATH.
      
      - Build iserv-proxy for the host
      
      ```
        ghc/iserv $ cabal install -fproxy -flibrary
      
      ```
      - Build iserv-library for the target
      
      ```
        # build cryptonite without integer-gmp
        ghc/iserv $ aarch64-apple-darwin14-cabal install cryptonite
      -f-integer-gmp
        ghc/iserv $ aarch64-apple-darwin14-cabal install -flibrary
      ```
      
      - Create an iOS application with the following `main.m`:
      ```
        #import <UIKit/UIKit.h>
        #include "HsFFI.h"
        extern void startSlave(bool, int, const char *);
      
        int main(int argc, char * argv[]) {
          const char * documents_path = [[[NSFileManager defaultManager]
      URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]
      firstObject].path.UTF8String;
      
          hs_init(NULL, NULL);
      
          startSlave(false, 5000, documents_path);
      
          @autoreleasepool {
              return UIApplicationMain(argc, argv, nil, nil);
          }
        }
      ```
      
        and link it with: the iserv archive from
      `~/.cabal/lib/aarch64-ios-ghc`
        as well as all dependent archives.
      
      - Build, Install and Launch the iserv-slave application on your iphone
      
      - Compile some Template Haskell code with the
      `aarch64-apple-darwin14-ghc`,
        through the `iserv-proxy`
      
      ```
        app $ aarch64-apple-darwin14-ghc Module.hs \
         -threaded -staticlib \
         -outputdir build/aarch64 -pgmlibtool libtool-quiet -stubdir . \
         -fexternal-interpreter \
         -pgmi=$HOME/.cabal/bin/iserv-proxy \
         -opti10.0.0.1 \
         -opti5000
      ```
        where 10.0.0.1 is the ip of your iserv-slave.
      
        magic.
      
      Reviewers: rwbarton, bgamari, austin, hvr, erikd, simonmar
      
      Subscribers: thomie, erikd, ryantrinkle
      
      Differential Revision: https://phabricator.haskell.org/D3255
      e8a27410
    • Moritz Angermann's avatar
      Refactor MachO.c · f1ce2766
      Moritz Angermann authored
      - Rename existing structs with typedefs from MachOTypes.
      - Update the following functions to make use of the
        extended ObjectCode structure:
        - ocAllocateSymbolExtras_MachO
        - resolveImports
        - ocGetNames_MachO
        - ocResolve_MachO
        - ocRunInit_MachO
      - repalce int with size_t for fread
      - Add aarch64 to the 64bit magic header check.
      
      Depends on D3239, D3251
      
      This is just one of the pieces for the rts linker
      support for ios (aarch64-macho)
      
      ---
      
      The following diagram and legend tries to explain the dependencies a
      bit:
      ```
        .- D3240
        v
      D3255 <- This <- D3251 <- D3239
        ^
        '- D3238
      ```
      
      - In D3238 we started allowing preloading object code with mmap
        in iOS, where we can't have r+w+x.
      - In D3239 we introduced a richer extension of the object code
        data type to make working with mach-o files easier.
      - In D3240 we set the stage to allow loading archives (.a) on iOS
      - In D3251 we added init and deinit functions to populate and
        depopulate the enriched object code data structure for mach-o
        files.
      - In D3252 we refactored most of the MachO.c file to use the
        new types and data structure.
      - in D3255 we finally introduce the aarch64-mach-o linker.
      
      Reviewers: austin, rwbarton, erikd, simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3252
      f1ce2766
    • Moritz Angermann's avatar
      Add ocInit_MachO · 938392c8
      Moritz Angermann authored
      This adds ocInit_MachO function, used to populate the extended
      ObjectCode structure, and the corresponding stgFree.
      
      It also adds defines for iOS, such that MachO.o is also compiled for iOS
      targets.
      
      Depends on D3239
      
      ---
      
      This is just one of the pieces for the rts linker
      support for ios (aarch64-macho)
      
      ---
      
      The following diagram and legend tries to explain the dependencies a
      bit:
      ```
        .- D3240
        v
      D3255 <- D3252 <- This <- D3239
        ^
        '- D3238
      ```
      
      - In D3238 we started allowing preloading object code with mmap
        in iOS, where we can't have r+w+x.
      - In D3239 we introduced a richer extension of the object code
        data type to make working with mach-o files easier.
      - In D3240 we set the stage to allow loading archives (.a) on iOS
      - In D3251 we added init and deinit functions to populate and
        depopulate the enriched object code data structure for mach-o
        files.
      - In D3252 we refactored most of the MachO.c file to use the
        new types and data structure.
      - in D3255 we finally introduce the aarch64-mach-o linker.
      
      Reviewers: rwbarton, bgamari, austin, erikd, simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3251
      938392c8
    • Moritz Angermann's avatar
      rts linker: Introduce MachOTypes · 8ed29b50
      Moritz Angermann authored
      This diff introduces MachOTypes, to reduce the need to typing `struct`
      all the time.  It also coaleces the 64 and non 64 structs. It also adds
      additional fiedls to the object code structure for macho, which makes
      working with macho object code much simpler and requires less passing
      around of variabls or address recomputation for the header, symbol
      table, etc...
      
      Furthermore this diff introduces a type for a linked list of stubs.
      
      I had to move the #ifdef from the bottom of the file up, to be able to
      extend the object code structure conditional on the use of the macho file format.
      
      This is just one of the pieces for the rts linker
      support for ios (aarch64-macho)
      
      ---
      
      The following diagram and legend tries to explain the dependencies a
      bit:
      ```
        .- D3240
        v
      D3255 <- D3252 <- D3251 <- This
        ^
        '- D3238
      ```
      
      - In D3238 we started allowing preloading object code with mmap
        in iOS, where we can't have r+w+x.
      - In D3239 we introduced a richer extension of the object code
        data type to make working with mach-o files easier.
      - In D3240 we set the stage to allow loading archives (.a) on iOS
      - In D3251 we added init and deinit functions to populate and
        depopulate the enriched object code data structure for mach-o
        files.
      - In D3252 we refactored most of the MachO.c file to use the
        new types and data structure.
      - in D3255 we finally introduce the aarch64-mach-o linker.
      
      Reviewers: austin, erikd, simonmar, rwbarton, bgamari
      
      Subscribers: rwbarton, thomie, ryantrinkle
      
      Differential Revision: https://phabricator.haskell.org/D3239
      8ed29b50
    • Moritz Angermann's avatar
      Make mmap r+w only during preload for iOS. · fdbbd63d
      Moritz Angermann authored
      While we do not yet enable mmap for ios builds.  If we later do, we must
      not try to mmap r+w+x, on iOS as that clearly fails.
      
      This diff also adds a check for the successful mmaping.
      
      I don't think we can blanket change this to r+w for every case, unless
      we are absolutely sure that we are going to remap this and set +x where
      needed.
      
      This is just one of the pieces for the rts linker support for ios
      (aarch64-macho)
      
      ---
      
      The following diagram and legend tries to explain the dependencies a
      bit:
      ```
        .- D3240
        v
      D3255 <- D3252 <- D3251 <- D3239
        ^
        '- This
      ```
      
      - In D3238 we started allowing preloading object code with mmap
        in iOS, where we can't have r+w+x.
      - In D3239 we introduced a richer extension of the object code
        data type to make working with mach-o files easier.
      - In D3240 we set the stage to allow loading archives (.a) on iOS
      - In D3251 we added init and deinit functions to populate and
        depopulate the enriched object code data structure for mach-o
        files.
      - In D3252 we refactored most of the MachO.c file to use the
        new types and data structure.
      - in D3255 we finally introduce the aarch64-mach-o linker.
      
      Reviewers: ezyang, austin, erikd, simonmar, bgamari, rwbarton
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, ryantrinkle, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3238
      fdbbd63d
  8. 26 Mar, 2017 3 commits
  9. 20 Mar, 2017 1 commit
    • Tamar Christina's avatar
      Fix Windows x86 build · 713ff920
      Tamar Christina authored
      Summary:
      Fix some `-Werror` failures and work around a
      bug in the `x86` version of `mingw-w64-crt`'s libraries.
      
      The bump in the `win32` submodule is required for this.
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3362
      713ff920
  10. 17 Mar, 2017 1 commit
  11. 03 Mar, 2017 1 commit
    • Moritz Angermann's avatar
      Allow iOS to load archives through the linker · d5e0b4bd
      Moritz Angermann authored
      This basically just adds ios where darwin already was, and is just one
      of the pieces for the rts linker support for ios (aarch64-macho)
      
      ---
      
      The following diagram and legend tries to explain the dependencies a
      bit:
      ```
        .- This
        v
      D3255 <- D3252 <- D3251 <- D3239
        ^
        '- D3238
      ```
      
      - In D3238 we started allowing preloading object code with mmap
        in iOS, where we can't have r+w+x.
      - In D3239 we introduced a richer extension of the object code
        data type to make working with mach-o files easier.
      - In D3240 we set the stage to allow loading archives (.a) on iOS
      - In D3251 we added init and deinit functions to populate and
        depopulate the enriched object code data structure for mach-o
        files.
      - In D3252 we refactored most of the MachO.c file to use the
        new types and data structure.
      - in D3255 we finally introduce the aarch64-mach-o linker.
      
      Reviewers: bgamari, austin, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: thomie, ryantrinkle
      
      Differential Revision: https://phabricator.haskell.org/D3240
      d5e0b4bd
  12. 02 Mar, 2017 2 commits
    • Tamar Christina's avatar
      Extend Windows runtime loader libsearch · f56fc7f7
      Tamar Christina authored
      This adds `.obj` extension to the list of valid
      object file (we really shouldn't be using extensions
      but instead trying to read the file and see if the header
      makes sense.). Microsoft compilers use .obj instead of .o
      for object files.
      
      This also adds support to finding static archives when the
      "lib" prefix is already in the filename. e.g. `-llibfoo` to
      find `libfoo.a`. This is inline with binutils.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, erikd, bgamari, hvr, austin
      
      Reviewed By: bgamari
      
      Subscribers: RyanGlScott, thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D3082
      f56fc7f7
    • Ben Gamari's avatar
      SymbolExtras: A bit of spring cleaning · 55f6353f
      Ben Gamari authored
      Const-hygiene and use bool when possible.
      55f6353f
  13. 01 Mar, 2017 1 commit
    • Ben Gamari's avatar
      rts: Fix build · b86d226f
      Ben Gamari authored
      I evidently neglected to consider that validate doesn't build profiled
      ways. Arg.
      b86d226f
  14. 28 Feb, 2017 3 commits
    • Moritz Angermann's avatar
      Drop copy step from the rts/ghc.mk · 3e33d334
      Moritz Angermann authored
      Recently I've used a different build system for building the
      rts (Xcode).  And in doing so, I looked through the rts/ghc.mk
      to figure out how to build the rts.
      
      In general it's quite straight forward to just compile all the
      c files with the proper flags.
      
      However there is one rather awkward copy step that copies some
      files for special handling for the rts way.
      
      I'm wondering if the proposed solution in this diff is better
      or worse than the current situation?
      
      The idea is to keep the files, but use #includes to produce
      identical files with just an additional define. It does however
      produce empty objects for non threaded ways.
      
      Reviewers: ezyang, bgamari, austin, erikd, simonmar, rwbarton
      
      Reviewed By: bgamari, simonmar, rwbarton
      
      Subscribers: rwbarton, thomie, snowleopard
      
      Differential Revision: https://phabricator.haskell.org/D3237
      3e33d334
    • Ben Gamari's avatar
      rts: Allow profile output path to be specified on RTS command line · db2a6676
      Ben Gamari authored
      This introduces a RTS option, -po, which allows the user to override the stem
      used to form the output file names of the heap profile and cost center summary.
      
      It's a bit unclear to me whether this is really the interface we want.
      Alternatively we could just allow the user to specify the `.hp` and `.prof` file
      names separately. This would arguably be a bit more straightforward and would
      allow the user to name JSON output with an appropriate `.json` suffix if they so
      desired. However, this would come at the cost of taking more of the option
      space, which is a somewhat precious commodity.
      
      Test Plan: Validate, try using `-po` RTS option
      
      Reviewers: simonmar, austin, erikd
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3182
      db2a6676
    • Ben Gamari's avatar
      configure: detect whether -lpthreads is necessary for pthreads · e94bfb67
      Ben Gamari authored
      Some platforms have pthreads support available without linking against
      libpthread (and indeed don't even offer a libpthread to link against).
      One example of this is Android's bionic library. Teach the RTS about
      this case.
      
      Test Plan: Validate while cross-compiling targetting Android on aarch64
      
      Reviewers: simonmar, austin, hvr, erikd, rwbarton
      
      Subscribers: danharaj, thomie, erikd, snowleopard
      
      Differential Revision: https://phabricator.haskell.org/D3149
      e94bfb67
  15. 26 Feb, 2017 3 commits
    • Ben Gamari's avatar
      rts: Usage message wibbles · 97b15059
      Ben Gamari authored
      97b15059
    • Tamar Christina's avatar
      Make list of deprecated symbols on Windows weak. · 9968502d
      Tamar Christina authored
      We have a unfortunate workaround in place for the fact that most
      packages out there use POSIX names for symbols even on Windows.  This
      means that we have to recognize e.g. both `_ungetch` and `ungetch`.
      
      The former is the actual symbol name on windows and the latter is the
      POSIX variant. The problem is that on normal windows programs `ungetch`
      should not be in the global namespace.
      
      To work around this, we now mark the deprecated symbols as weak symbols
      in the global namespace. This provides the flexibility we need:
      
      * If you use the symbol without defining it, we assume you meant to use
        the POSIX variant.
      * If you actually define the symbol, we'll hence forth use that
        definition and assume you didn't mean to use POSIX code. This is how
        MingW64's wrapper also works.
      
      This requires D3028.
      
      Fixes #13210.
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D3154
      9968502d
    • Tamar Christina's avatar
      Load dependent dlls. · 41e54b4b
      Tamar Christina authored
      When the `GCC` driver envokes the pipeline a `SPEC` is used to determine
      how to configure the compiler and which libraries to pass along.
      
      For Windows/mingw, this specfile is
      https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/mingw32.h
      
      This has a lot of interesting things that we need to emulate in order to
      be able to link as many things out of the box as GCC. In particular this
      is why you never need to specify `-lgcc_s` when compiling, but you do
      when using `GHCi`.
      
      Unfortunately due to time constraints I can't set up the framework
      required in `GHC` to do this before the feature freeze.
      
      So I suggest this alternate implementation:
      When we load a dll, also bring it's dependencies into scope of the
      interpeter.
      
      This has pros and cons. Pro is, we'll fix many packages on hackage which
      specify just `-lstdc++`. Since this points to `libstdc++-6.dll` which
      will bring `libgcc` into scope.
      
      The downside is, we'll be more lenient than GCC, in that the interpreter
      will link much easier since it has implicit dependencies in scope.
      Whereas for compilation to work you will have to specify it as an
      argument to GHC.
      
      This will make the Windows runtime linker more consistent with the unix
      ones. The difference in semantics came about because of the differences
      between `dlsym` and `GetProcAddress`.  The former seems to search the
      given library and all it's dependencies, while the latter only searches
      the export table of the library. So we need some extra manual work to
      search the dependencies which this patch provides.
      
      Test Plan:
      ```
      ./validate
      ```
      ```
      $ echo :q | inplace/bin/ghc-stage2.exe --interactive +RTS -Dl -RTS
      -lstdc++ 2>&1 | grep "Loading dependency"
      ```
      
      ```
      $ echo :q | ../inplace/bin/ghc-stage2.exe --interactive -lstdc++ +RTS
      -Dl -RTS 2>&1 | grep "Loading dependency"
      Loading dependency *.exe -> GDI32.dll.
      Loading dependency GDI32.dll -> ntdll.dll.
      Loading dependency *.exe -> KERNEL32.dll.
      Loading dependency KERNEL32.dll -> KERNELBASE.dll.
      Loading dependency *.exe -> msvcrt.dll.
      Loading dependency *.exe -> SHELL32.dll.
      Loading dependency SHELL32.dll -> USER32.dll.
      Loading dependency USER32.dll -> win32u.dll.
      Loading dependency *.exe -> WINMM.dll.
      Loading dependency WINMM.dll -> WINMMBASE.dll.
      Loading dependency *.exe -> WSOCK32.dll.
      Loading dependency WSOCK32.dll -> WS2_32.dll.
      Loading dependency WS2_32.dll -> RPCRT4.dll.
      Loading dependency libstdc++-6.dll -> libwinpthread-1.dll.
      Loading dependency libstdc++-6.dll -> libgcc_s_seh-1.dll.
      ```
      
      Trac tickets: #13093, #13189
      
      Reviewers: simonmar, rwbarton, austin, bgamari, erikd
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, RyanGlScott, thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D3028
      41e54b4b
  16. 23 Feb, 2017 4 commits
  17. 15 Feb, 2017 1 commit
  18. 14 Feb, 2017 3 commits
    • Tamar Christina's avatar
      Fix ExtraSymbols jump table on Windows. · 2f1017b9
      Tamar Christina authored
      This corrects the `jump islands` calculations for Windows.  The code was
      incorrectly creating a new entry for every `usage` of a symbol instead
      of every used symbol. e.g. if a symbol is used 5 times it used to create
      5 jump islands. This is incorrect and not in line with what the `ELF`
      and `Mach-O` linkers do. Also since we allocate `n` spaces where `n` is
      number of symbols, we would quickly run out of space and abort.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, hvr, erikd, bgamari, austin
      
      Reviewed By: bgamari
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D3026
      2f1017b9
    • Tamar Christina's avatar
      Expand list of always loaded Windows shared libs · 04f67c99
      Tamar Christina authored
      When the `GCC` driver envokes the pipeline a `SPEC` is used to determine
      how to configure the compiler and which libraries to pass along.
      
      For Windows/mingw, this specfile is
      https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/mingw32.h
      
      This expands the list of base DLLs with the ones that GCC always links,
      and adds extra sibling dlls of `stdc++` in case it is linked in.
      
      Following D3028 this patch only needs to load the always load only the
      top level individual shared libs.
      
      Test Plan: ./validate
      
      Reviewers: RyanGlScott, austin, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: RyanGlScott, thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D3029
      04f67c99
    • Siddharth's avatar
      Typecast covers entire expression to fix format warning. · 60c49861
      Siddharth authored
      - Fixes (#12636).
      - changes all the typecasts to _unsinged long long_ to
        have the format specifiers work.
      
      Reviewers: austin, bgamari, erikd, simonmar, Phyx
      
      Reviewed By: erikd, Phyx
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3129
      60c49861
  19. 12 Feb, 2017 3 commits
    • olsner's avatar
      Apply SplitSections to all C compilations · a50082c1
      olsner authored
      Previously this was added only to the RTS's C files (those are the bulk
      of it though), but there are C bits in ghc-prim, integer-gmp and base
      too.
      
      Followup for #8405, allows the large table of character properties in
      base to be stripped when not used.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: thomie, snowleopard
      
      Differential Revision: https://phabricator.haskell.org/D3121
      a50082c1
    • Ben Gamari's avatar
      rts/Profiling: Factor out report generation · 56c9bb39
      Ben Gamari authored
      Here we move the actual report generation logic to
      `rts/ProfilerReport.c`. This break is actually quite clean,
      
          void writeCCSReport( FILE *prof_file, CostCentreStack const *ccs,
                               ProfilerTotals totals );
      
      This is more profiler refactoring in preparation for machine-readable
      output.
      
      Test Plan: Validate
      
      Reviewers: austin, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3097
      56c9bb39
    • Ben Gamari's avatar
      rts/Profiling: Kill a few globals and add consts · 1a14d384
      Ben Gamari authored
      Previously it was quite difficult to follow the dataflow through this
      file due to global mutation and rather non-descriptive types.
      
      This is a cleanup in preparation for factoring out the report-generating
      logic, which is itself in preparation for somedayteaching the profiler
      to produce more machine-readable reports (JSON perhaps?).
      
      Test Plan: Validate
      
      Reviewers: austin, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3096
      1a14d384
  20. 10 Feb, 2017 1 commit