This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 16 Dec, 2009 1 commit
    • howard_b_golden@yahoo.com's avatar
      FIX #2615 (linker scripts in .so files) · e020e387
      howard_b_golden@yahoo.com authored
      This patch does not apply to Windows. It only applies to systems with
      ELF binaries.
      
      This is a patch to rts/Linker.c to recognize linker scripts in .so
      files and find the real target .so shared library for loading.
      e020e387
  2. 12 Dec, 2009 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Expose all EventLog events as DTrace probes · 015d3d46
      chak@cse.unsw.edu.au. authored
      - Defines a DTrace provider, called 'HaskellEvent', that provides a probe
        for every event of the eventlog framework.
      - In contrast to the original eventlog, the DTrace probes are available in
        all flavours of the runtime system (DTrace probes have virtually no
        overhead if not enabled); when -DTRACING is defined both the regular
        event log as well as DTrace probes can be used.
      - Currently, Mac OS X only.  User-space DTrace probes are implemented
        differently on Mac OS X than in the original DTrace implementation.
        Nevertheless, it shouldn't be too hard to enable these probes on other
        platforms, too.
      - Documentation is at http://hackage.haskell.org/trac/ghc/wiki/DTrace
      015d3d46
  3. 01 Dec, 2009 1 commit
  4. 14 Nov, 2009 1 commit
  5. 29 Aug, 2009 1 commit
    • Simon Marlow's avatar
      Unify event logging and debug tracing. · a5288c55
      Simon Marlow authored
        - tracing facilities are now enabled with -DTRACING, and -DDEBUG
          additionally enables debug-tracing.  -DEVENTLOG has been
          removed.
      
        - -debug now implies -eventlog
      
        - events can be printed to stderr instead of being sent to the
          binary .eventlog file by adding +RTS -v (which is implied by the
          +RTS -Dx options).
      
        - -Dx debug messages can be sent to the binary .eventlog file
          by adding +RTS -l.  This should help debugging by reducing
          the impact of debug tracing on execution time.
      
        - Various debug messages that duplicated the information in events
          have been removed.
      a5288c55
  6. 30 Aug, 2009 1 commit
  7. 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
         warning-clean.
      
       - 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.
      a2a67cd5
  8. 29 May, 2009 1 commit
  9. 04 Jun, 2009 1 commit
  10. 02 Jun, 2009 1 commit
  11. 23 Apr, 2009 1 commit
  12. 17 Mar, 2009 1 commit
    • Simon Marlow's avatar
      Add fast event logging · 8b18faef
      Simon Marlow authored
      Generate binary log files from the RTS containing a log of runtime
      events with timestamps.  The log file can be visualised in various
      ways, for investigating runtime behaviour and debugging performance
      problems.  See for example the forthcoming ThreadScope viewer.
      
      New GHC option:
      
        -eventlog   (link-time option) Enables event logging.
      
        +RTS -l     (runtime option) Generates <prog>.eventlog with
                    the binary event information.
      
      This replaces some of the tracing machinery we already had in the RTS:
      e.g. +RTS -vg  for GC tracing (we should do this using the new event
      logging instead).
      
      Event logging has almost no runtime cost when it isn't enabled, though
      in the future we might add more fine-grained events and this might
      change; hence having a link-time option and compiling a separate
      version of the RTS for event logging.  There's a small runtime cost
      for enabling event-logging, for most programs it shouldn't make much
      difference.
      
      (Todo: docs)
      8b18faef
  13. 19 Feb, 2009 1 commit
    • Simon Marlow's avatar
      Rewrite of signal-handling (ghc patch; see also base and unix patches) · 7ed3f755
      Simon Marlow authored
      The API is the same (for now).  The new implementation has the
      capability to define signal handlers that have access to the siginfo
      of the signal (#592), but this functionality is not exposed in this
      patch.
      
      #2451 is the ticket for the new API.
      
      The main purpose of bringing this in now is to fix race conditions in
      the old signal handling code (#2858).  Later we can enable the new
      API in the HEAD.
      
      Implementation differences:
      
       - More of the signal-handling is moved into Haskell.  We store the
         table of signal handlers in an MVar, rather than having a table of
         StablePtrs in the RTS.
      
       - In the threaded RTS, the siginfo of the signal is passed down the
         pipe to the IO manager thread, which manages the business of
         starting up new signal handler threads.  In the non-threaded RTS,
         the siginfo of caught signals is stored in the RTS, and the
         scheduler starts new signal handler threads.
      7ed3f755
  14. 10 Dec, 2008 1 commit
  15. 01 Oct, 2008 1 commit
  16. 02 Sep, 2008 1 commit
  17. 09 Jul, 2008 1 commit
    • Simon Marlow's avatar
      FIX part of #2301, and #1619 · addff19a
      Simon Marlow authored
      2301: Control-C now causes the new exception (AsyncException
      UserInterrupt) to be raised in the main thread.  The signal handler
      is set up by GHC.TopHandler.runMainIO, and can be overriden in the
      usual way by installing a new signal handler.  The advantage is that
      now all programs will get a chance to clean up on ^C.
      
      When UserInterrupt is caught by the topmost handler, we now exit the
      program via kill(getpid(),SIGINT), which tells the parent process that
      we exited as a result of ^C, so the parent can take appropriate action
      (it might want to exit too, for example).
      
      One subtlety is that we have to use a weak reference to the ThreadId
      for the main thread, so that the signal handler doesn't prevent the
      main thread from being subject to deadlock detection.
      
      1619: we now ignore SIGPIPE by default.  Although POSIX says that a
      SIGPIPE should terminate the process by default, I wonder if this
      decision was made because many C applications failed to check the exit
      code from write().  In Haskell a failed write due to a closed pipe
      will generate an exception anyway, so the main difference is that we
      now get a useful error message instead of silent program termination.
      See #1619 for more discussion.
      addff19a
  18. 16 Apr, 2008 1 commit
  19. 20 Nov, 2007 1 commit
    • simonmar@microsoft.com's avatar
      improvements to PAPI support · 8db56c86
      simonmar@microsoft.com authored
      - major (multithreaded) GC is measured separately from minor GC
      - events to measure can now be specified on the command line, e.g
           prog +RTS -a+PAPI_TOT_CYC
      8db56c86
  20. 31 Oct, 2007 1 commit
  21. 29 May, 2008 1 commit
  22. 12 May, 2008 1 commit
  23. 28 Feb, 2008 1 commit
    • Simon Marlow's avatar
      Enable -prof -threaded (#886) · 50c4d039
      Simon Marlow authored
      It turns out that -prof -threaded works (modulo some small changes),
      because all the data structures used in profiling are only accessed by
      one thread at a time, at long as we don't use +RTS -N2 or higher.  So
      this patch enables the use of -prof -threaded, but an error is given
      if you ask for more than one CPU with +RTS -N.
      50c4d039
  24. 20 Nov, 2007 1 commit
    • Simon Marlow's avatar
      Move file locking into the RTS, fixing #629, #1109 · 1d026619
      Simon Marlow authored
      File locking (of the Haskell 98 variety) was previously done using a
      static table with linear search, which had two problems: the array had
      a fixed size and was sometimes too small (#1109), and performance of
      lockFile/unlockFile was suboptimal due to the linear search.
      Also the algorithm failed to count readers as required by Haskell 98
      (#629).
      
      Now it's done using a hash table (provided by the RTS).  Furthermore I
      avoided the extra fstat() for every open file by passing the dev_t and
      ino_t into lockFile.  This and the improvements to the locking
      algorithm result in a healthy 20% or so performance increase for
      opening/closing files (see openFile008 test).
      1d026619
  25. 03 Sep, 2007 1 commit
    • Simon Marlow's avatar
      FIX #1623: disable the timer signal when the system is idle (threaded RTS only) · 8d71be7c
      Simon Marlow authored
      Having a timer signal go off regularly is bad for power consumption,
      and generally bad practice anyway (it means the app cannot be
      completely swapped out, for example).  Fortunately the threaded RTS
      already had a way to detect when the system was idle, so that it can
      trigger a GC and thereby find deadlocks.  After performing the GC, we
      now turn off timer signals, and re-enable them again just before
      running any Haskell code.
      8d71be7c
  26. 24 Aug, 2007 1 commit
  27. 17 Aug, 2007 1 commit
  28. 25 Jul, 2007 1 commit
    • Simon Marlow's avatar
      FIX #1177, partially at least. · eb5791fe
      Simon Marlow authored
      Now we don't wait for outstanding IO requests when shutting down at
      program exit time, but we still wait when shutting down a DLL (via
      hs_exit()).  There ought to be a better way to do this, but
      terminating the threads forcibly is not a good idea (it never is: the
      thread might be holding a mutex when it dies, for example).
      
      I plan to add some docs to the user guide to describe how to shut
      down a DLL properly.
      eb5791fe
  29. 24 Jul, 2007 1 commit
    • Simon Marlow's avatar
      hs_exit()/shutdownHaskell(): wait for outstanding foreign calls to complete before returning · 681aad99
      Simon Marlow authored
      This is pertinent to #1177.  When shutting down a DLL, we need to be
      sure that there are no OS threads that can return to the code that we
      are about to unload, and previously the threaded RTS was unsafe in
      this respect.
      
      When exiting a standalone program we don't have to be quite so
      paranoid: all the code will disappear at the same time as any running
      threads.  Happily exiting a program happens via a different path:
      shutdownHaskellAndExit().  If we're about to exit(), then there's no
      need to wait for foreign calls to complete.
      681aad99
  30. 17 Jul, 2007 1 commit
  31. 01 Jun, 2007 1 commit
  32. 08 May, 2007 1 commit
  33. 27 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Basic heap profile support without -prof · cbeb99ef
      Simon Marlow authored
      Now that constructor info tables contain the name of the constructor,
      we can generate useful heap profiles without requiring the whole
      program and libraries to be compiled with -prof.  So now, "+RTS -hT"
      generates a heap profile for any program, dividing the profile by
      constructor.  It wouldn't be hard to add support for grouping
      constructors by module, or to restrict the profile to certain
      constructors/modules/packages.
      
      This means that for the first time we can get heap profiles for GHCi,
      which was previously impossible because the byte-code
      interpreter and linker don't work with -prof.
      cbeb99ef
  34. 22 Mar, 2007 1 commit
  35. 07 Feb, 2007 1 commit
    • chevalier@alum.wellesley.edu's avatar
      Lightweight ticky-ticky profiling · 5ddee764
      chevalier@alum.wellesley.edu authored
      The following changes restore ticky-ticky profiling to functionality
      from its formerly bit-rotted state. Sort of. (It got bit-rotted as part
      of the switch to the C-- back-end.)
      
      The way that ticky-ticky is supposed to work is documented in Section 5.7
      of the GHC manual (though the manual doesn't mention that it hasn't worked
      since sometime around 6.0, alas). Changes from this are as follows (which
      I'll document on the wiki):
      
      * In the past, you had to build all of the libraries with way=t in order to
      use ticky-ticky, because it entailed a different closure layout. No longer.
      You still need to do make way=t in rts/ in order to build the ticky RTS,
      but you should now be able to mix ticky and non-ticky modules.
      
      * Some of the counters that worked in the past aren't implemented yet.
      I was originally just trying to get entry counts to work, so those should
      be correct. The list of counters was never documented in the first place,
      so I hope it's not too much of a disaster that some don't appear anymore.
      Someday, someone (perhaps me) should document all the counters and what 
      they do. For now, all of the counters are either accurate (or at least as
      accurate as they always were), zero, or missing from the ticky profiling
      report altogether.
      
      This hasn't been particularly well-tested, but these changes shouldn't
      affect anything except when compiling with -fticky-ticky (famous last
      words...)
      
      Implementation details:
      
      I got rid of StgTicky.h, which in the past had the macros and declarations 
      for all of the ticky counters. Now, those macros are defined in Cmm.h.
      StgTicky.h was still there for inclusion in C code. Now, any remaining C
      code simply cannot call the ticky macros -- or rather, they do call those
      macros, but from the perspective of C code, they're defined as no-ops. 
      (This shouldn't be too big a problem.)
      
      I added a new file TickyCounter.h that has all the declarations for ticky
      counters, as well as dummy macros for use in C code. Someday, these 
      declarations should really be automatically generated, since they need
      to be kept consistent with the macros defined in Cmm.h.
      
      Other changes include getting rid of the header that was getting added to
      closures before, and getting rid of various code having to do with eager
      blackholing and permanent indirections (the changes under compiler/ 
      and rts/Updates.*).
      5ddee764
  36. 15 Dec, 2006 2 commits
  37. 11 Dec, 2006 2 commits
    • Ian Lynagh's avatar
      Add freeScheduler/freeTaskManager and call it later than exitScheduler · cf6b495d
      Ian Lynagh authored
      We were freeing the tasks in exitScheduler (stopTaskManager) before
      exitStorage (stat_exit), but the latter needs to walk down the list
      printing stats. Resulted in segfaults with commands like
          ghc -v0 -e main q.hs -H32m -H32m +RTS -Sstderr
      (where q.hs is trivial), but very sensitive to exact commandline and
      libc version or something.
      cf6b495d
    • Ian Lynagh's avatar
      When debugging, have the allocator help us a bit · d5265047
      Ian Lynagh authored
      We now check for freeing memory that isn't allocated, and overwrite memory
      we are about to free with 0xaa.
      It might be nice to also have a flag to control whether the memory
      actually gets free'd.
      d5265047
  38. 01 Dec, 2006 1 commit
    • Simon Marlow's avatar
      Add support for the IO manager thread on Windows · 80a766fd
      Simon Marlow authored
      Fixes #637.
      The implications of this change are:
        - threadDelay on Windows no longer creates a new OS thread each time,
          instead it communicates with the IO manager thread in the same way as
          on Unix.
        - deadlock detection now works the same way on Windows as on Unix; that
          is the timer interrupt wakes up the IO manager thread, which causes
          the scheduler to check for deadlock.
        - Console events now get sent to the IO manager thread, in the same way as
          signals do on Unix.  This means that console events should behave more
          reliably with -threaded on Windows.
      
      All this applies only with -threaded.  Without -threaded, the old
      ConsoleEvent code is still used.
      
      After some testing, this could be pushed to the 6.6 branch.
      80a766fd