1. 27 Apr, 2014 1 commit
  2. 12 Apr, 2011 1 commit
    • Simon Marlow's avatar
      Change the way module initialisation is done (#3252, #4417) · a52ff761
      Simon Marlow authored
      Previously the code generator generated small code fragments labelled
      with __stginit_M for each module M, and these performed whatever
      initialisation was necessary for that module and recursively invoked
      the initialisation functions for imported modules.  This appraoch had
       - FFI users had to call hs_add_root() to ensure the correct
         initialisation routines were called.  This is a non-standard,
         and ugly, API.
       - unless we were using -split-objs, the __stginit dependencies would
         entail linking the whole transitive closure of modules imported,
         whether they were actually used or not.  In an extreme case (#4387,
         #4417), a module from GHC might be imported for use in Template
         Haskell or an annotation, and that would force the whole of GHC to
         be needlessly linked into the final executable.
      So now instead we do our initialisation with C functions marked with
      __attribute__((constructor)), which are automatically invoked at
      program startup time (or DSO load-time).  The C initialisers are
      emitted into the stub.c file.  This means that every time we compile
      with -prof or -hpc, we now get a stub file, but thanks to #3687 that
      is now invisible to the user.
      There are some refactorings in the RTS (particularly for HPC) to
      handle the fact that initialisers now get run earlier than they did
      The __stginit symbols are still generated, and the hs_add_root()
      function still exists (but does nothing), for backwards compatibility.
  3. 28 Oct, 2010 1 commit
  4. 30 Mar, 2010 1 commit
  5. 03 Feb, 2010 1 commit
  6. 02 Aug, 2009 1 commit
    • Simon Marlow's avatar
      RTS tidyup sweep, first phase · a2a67cd5
      Simon Marlow authored
      The first phase of this tidyup is focussed on the header files, and in
      particular making sure we are exposinng publicly exactly what we need
      to, and no more.
       - Rts.h now includes everything that the RTS exposes publicly,
         rather than a random subset of it.
       - Most of the public header files have moved into subdirectories, and
         many of them have been renamed.  But clients should not need to
         include any of the other headers directly, just #include the main
         public headers: Rts.h, HsFFI.h, RtsAPI.h.
       - All the headers needed for via-C compilation have moved into the
         stg subdirectory, which is self-contained.  Most of the headers for
         the rest of the RTS APIs have moved into the rts subdirectory.
       - I left MachDeps.h where it is, because it is so widely used in
         Haskell code.
       - I left a deprecated stub for RtsFlags.h in place.  The flag
         structures are now exposed by Rts.h.
       - Various internal APIs are no longer exposed by public header files.
       - Various bits of dead code and declarations have been removed
       - More gcc warnings are turned on, and the RTS code is more
       - More source files #include "PosixSource.h", and hence only use
         standard POSIX (1003.1c-1995) interfaces.
      There is a lot more tidying up still to do, this is just the first
      pass.  I also intend to standardise the names for external RTS APIs
      (e.g use the rts_ prefix consistently), and declare the internal APIs
      as hidden for shared libraries.
  7. 01 Jul, 2008 1 commit
  8. 11 Apr, 2008 1 commit
  9. 08 Apr, 2008 1 commit
  10. 23 Oct, 2007 2 commits
  11. 18 Oct, 2007 1 commit
  12. 17 Sep, 2007 2 commits
  13. 27 Jun, 2007 1 commit
  14. 26 Jun, 2007 1 commit
  15. 12 Jun, 2007 1 commit
    • andy@galois.com's avatar
      Adding new ffi calls into the Hpc rts subsystem · df58c2a5
      andy@galois.com authored
      foreign import ccall unsafe hs_hpc_write :: CString -> IO ()
      foreign import ccall unsafe hs_hpc_read  :: CString -> IO ()
      These write a Hpc description of the state of the world to a file, 
      or read a description into the current Hpc tickbox subsystem.
  16. 30 Apr, 2007 1 commit
    • andy@galois.com's avatar
      Changing internal data structures used by Hpc · 55a5d8d9
      andy@galois.com authored
       - .tix files are now a list of MixModule, which contain a hash of the contents of the .mix file.
       - .mix files now have (the same) hash number.
      This changes allow different binaries that use the same module compiled in the same way
      to share coverage information.
  17. 13 Feb, 2007 2 commits
  18. 10 Jan, 2007 1 commit
    • andy@galois.com's avatar
      Changing bootstrapping for pipes between debugger and debuggee · 75580f64
      andy@galois.com authored
       - Now we use two pipes and a fork rather than use named pipes
       - We use the HPCRIX env var to send the pipe numbers in %d:%d format
       - We now always breakpoint for special events
       - We check to see we are the original process before each breakpoint event
         sub processes are not debugged; this lets us debug the debugger.
  19. 09 Jan, 2007 2 commits
  20. 14 Dec, 2006 1 commit
  21. 13 Dec, 2006 2 commits
  22. 09 Dec, 2006 1 commit
  23. 30 Nov, 2006 1 commit
  24. 10 Nov, 2006 1 commit
  25. 25 Oct, 2006 1 commit
  26. 24 Oct, 2006 1 commit
    • andy@galois.com's avatar
      Haskell Program Coverage · d5934bbb
      andy@galois.com authored
      This large checkin is the new ghc version of Haskell
      Program Coverage, an expression-level coverage tool for Haskell.
       - Hpc.[ch] - small runtime support for Hpc; reading/writing *.tix files.
       - Coverage.lhs - Annotates the HsSyn with coverage tickboxes.
        - New Note's in Core,
            - TickBox      -- ticked on entry to sub-expression
            - BinaryTickBox  -- ticked on exit to sub-expression, depending
      	       	     -- on the boolean result.
        - New Stg level TickBox (no BinaryTickBoxes, though) 
      You can run the coverage tool with -fhpc at compile time. 
      Main must be compiled with -fhpc.