1. 13 Dec, 2006 1 commit
  2. 12 Dec, 2006 1 commit
  3. 04 Dec, 2006 1 commit
  4. 24 Nov, 2006 1 commit
  5. 21 Nov, 2006 2 commits
    • David Himmelstrup's avatar
      Remove the concept of stableRoots. · 354672b0
      David Himmelstrup authored
      StableRoots opened new possibilities in the world
      of plugins with their ability to link partially
      applied closures against object code.
      Exporting '(fn pluginwideState)' severely reduced
      the complexity of HIDE's plugin system. The previous
      system of global variables was both fragile and hard
      to scale.
      Good bye, StableRoots. We sure had some fun.
    • wolfgang.thaller@gmx.net's avatar
      Fix printf$LDBLStub workaround for Darwin · 0329ca6d
      wolfgang.thaller@gmx.net authored
      Apparently, the original fix never really worked due to typos and oversights.
  6. 15 Nov, 2006 1 commit
  7. 24 Oct, 2006 1 commit
    • Simon Marlow's avatar
      Split GC.c, and move storage manager into sm/ directory · ab0e778c
      Simon Marlow authored
      In preparation for parallel GC, split up the monolithic GC.c file into
      smaller parts.  Also in this patch (and difficult to separate,
        - Don't include Stable.h in Rts.h, instead just include it where
        - consistently use STATIC_INLINE in source files, and INLINE_HEADER
          in header files.  STATIC_INLINE is now turned off when DEBUG is on,
          to make debugging easier.
        - The GC no longer takes the get_roots function as an argument.
          We weren't making use of this generalisation.
  8. 07 Oct, 2006 1 commit
  9. 29 Sep, 2006 1 commit
  10. 21 Sep, 2006 1 commit
    • Don Stewart's avatar
      Use --export-dynamic to ensure ghci works on newer openbsds · 069495a3
      Don Stewart authored
      Changes to the RTLD_DEFAULT semantics broke the trick we used to ensure
      libc symbols were available to the ghci linker, in OpenBSD 4.0. We can
      fix this by linking the ghc binary itself with --export-dynamic on this
      system, removing the need for any magic Linker.c games.
      GHCi now works on OpenBSD 4.0
      Contributed by Eric Mertens <emertens at gmail.com>
  11. 23 Aug, 2006 2 commits
  12. 07 Jun, 2006 1 commit
  13. 30 May, 2006 2 commits
    • simonmar@microsoft.com's avatar
      Win32: add _imp__tzname · 4285fd96
      simonmar@microsoft.com authored
    • Simon Marlow's avatar
      replace stgMallocBytesRWX() with our own allocator · e3c55aeb
      Simon Marlow authored
      See bug #738
      Allocating executable memory is getting more difficult these days.  In
      particular, the default SELinux policy on Fedora Core 5 disallows
      making the heap (i.e. malloc()'d memory) executable, although it does
      apparently allow mmap()'ing anonymous executable memory by default.
      Previously, stgMallocBytesRWX() used malloc() underneath, and then
      tried to make the page holding the memory executable.  This was rather
      hacky and fails with Fedora Core 5.  
      This patch adds a mini-allocator for executable memory, based on the
      block allocator.  We grab page-sized blocks and make them executable,
      then allocate small objects from the page.  There's a simple free
      function, that will free whole pages back to the system when they are
  14. 16 May, 2006 1 commit
    • duncan.coutts@worc.ox.ac.uk's avatar
      Let GHCi work with with Sparc32+/V8+ .o files · 82807c21
      duncan.coutts@worc.ox.ac.uk authored
      Currently the GHCi linker looks exclusively for V7 ABI .o files.
      You can generate V8+ ABI .o files using flags to gcc such as:
       -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc
      Note that this allows gcc to generate hardware integer division and
      hardware floating point instructions rather than using software emulation.
      All recent sparc hardware is V8+ or later. Perhaps we should check for the
      cpu generation in configure and use the later ABI if possible.
      Tested briefly on a SunBlade 100 (TI UltraSparc IIe) sparc-unknown-linux
  15. 26 Apr, 2006 1 commit
  16. 18 Apr, 2006 1 commit
  17. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
  18. 28 Mar, 2006 1 commit
  19. 06 Mar, 2006 1 commit
  20. 09 Feb, 2006 1 commit
  21. 28 Feb, 2006 2 commits
    • Simon Marlow's avatar
      pass arguments to unknown function calls in registers · 04db0e9f
      Simon Marlow authored
      We now have more stg_ap entry points: stg_ap_*_fast, which take
      arguments in registers according to the platform calling convention.
      This is faster if the function being called is evaluated and has the
      right arity, which is the common case (see the eval/apply paper for
      We still need the stg_ap_*_info entry points for stack-based
      application, such as an overflows when a function is applied to too
      many argumnets.  The stg_ap_*_fast functions actually just check for
      an evaluated function, and if they don't find one, push the args on
      the stack and invoke stg_ap_*_info.  (this might be slightly slower in
      some cases, but not the common case).
    • simonpj@microsoft.com's avatar
  22. 08 Feb, 2006 1 commit
    • Simon Marlow's avatar
      make the smp way RTS-only, normal libraries now work with -smp · beb5737b
      Simon Marlow authored
      We had to bite the bullet here and add an extra word to every thunk,
      to enable running ordinary libraries on SMP.  Otherwise, we would have
      needed to ship an extra set of libraries with GHC 6.6 in addition to
      the two sets we already ship (normal + profiled), and all Cabal
      packages would have to be compiled for SMP too.  We decided it best
      just to take the hit now, making SMP easily accessible to everyone in
      GHC 6.6.
      Incedentally, although this increases allocation by around 12% on
      average, the performance hit is around 5%, and much less if your inner
      loop doesn't use any laziness.
  23. 23 Jan, 2006 1 commit
  24. 18 Jan, 2006 1 commit
  25. 15 Dec, 2005 1 commit
    • desrt's avatar
      [project @ 2005-12-15 23:32:29 by desrt] · 12694df2
      desrt authored
      Linker.c: linux/ppc: We call mmap() to allocate additional pages to
                           create jump islands.  In the case where no
                           additional memory was needed the mmap call was
                           being made with a size of 0 which would fail.
                           The call is now conditionalised and documentation
                           has been added to the code.  Closes trac #439.
  26. 28 Oct, 2005 1 commit
  27. 27 Oct, 2005 2 commits
    • sof's avatar
      [project @ 2005-10-27 01:39:40 by sof] · 2909e6fb
      sof authored
      [mingw/msys only]
      Undo long-standing workaround for buggy GNU ld's on mingw/msys; i.e.,
      the linker wasn't correctly generating relocatable object files when
      the number of relocs exceeded 2^16. Worked around the issue by
      hackily splitting up the GHCi object file for the larger packages
      ('base', 'ObjectIO' and 'win32') into a handful of object files,
      each with a manageable number of relocs. Tiresome and error-prone
      (but the hack has served us well!)
      This commit imposes a restriction on the 'ld' you use to compile
      up GHC with; it now has to be ld-2.15.x or later (something GHC
      binary dists have shipped with since 6.2.2)
    • sof's avatar
      [project @ 2005-10-27 01:27:37 by sof] · 53068b73
      sof authored
      ocGetNames_PEi386(): fix bug in previous commit to this function;
      the correct .bss size for object files wasn't being passed to
      Not directly harmful, but triggers ASSERT() failure w/ DEBUG.
      Merge to STABLE.
  28. 21 Oct, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-10-21 14:02:17 by simonmar] · 03a9ff01
      simonmar authored
      Big re-hash of the threaded/SMP runtime
      This is a significant reworking of the threaded and SMP parts of
      the runtime.  There are two overall goals here:
        - To push down the scheduler lock, reducing contention and allowing
          more parts of the system to run without locks.  In particular,
          the scheduler does not require a lock any more in the common case.
        - To improve affinity, so that running Haskell threads stick to the
          same OS threads as much as possible.
      At this point we have the basic structure working, but there are some
      pieces missing.  I believe it's reasonably stable - the important
      parts of the testsuite pass in all the (normal,threaded,SMP) ways.
      In more detail:
        - Each capability now has a run queue, instead of one global run
          queue.  The Capability and Task APIs have been completely
          rewritten; see Capability.h and Task.h for the details.
        - Each capability has its own pool of worker Tasks.  Hence, Haskell
          threads on a Capability's run queue will run on the same worker
          Task(s).  As long as the OS is doing something reasonable, this
          should mean they usually stick to the same CPU.  Another way to
          look at this is that we're assuming each Capability is associated
          with a fixed CPU.
        - What used to be StgMainThread is now part of the Task structure.
          Every OS thread in the runtime has an associated Task, and it
          can ask for its current Task at any time with myTask().
        - removed RTS_SUPPORTS_THREADS symbol, use THREADED_RTS instead
          (it is now defined for SMP too).
        - The RtsAPI has had to change; we must explicitly pass a Capability
          around now.  The previous interface assumed some global state.
          SchedAPI has also changed a lot.
        - The OSThreads API now supports thread-local storage, used to
          implement myTask(), although it could be done more efficiently
          using gcc's __thread extension when available.
        - I've moved some POSIX-specific stuff into the posix subdirectory,
          moving in the direction of separating out platform-specific
        - lots of lock-debugging and assertions in the runtime.  In particular,
          when DEBUG is on, we catch multiple ACQUIRE_LOCK()s, and there is
          also an ASSERT_LOCK_HELD() call.
      What's missing so far:
        - I have almost certainly broken the Win32 build, will fix soon.
        - any kind of thread migration or load balancing.  This is high up
          the agenda, though.
        - various performance tweaks to do
        - throwTo and forkProcess still do not work in SMP mode
  29. 19 Oct, 2005 1 commit
    • sof's avatar
      [project @ 2005-10-19 16:04:38 by sof] · 3d8a0867
      sof authored
      ocGetNames_PEi386(): correctly allocate .bss sections in relocatable
       object files. See commit for details; fixes misc GHCi crashes reported
       against 6.4.1.
      Merge to STABLE.
  30. 12 Oct, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-10-12 02:12:34 by wolfgang] · 68f5bad2
      wolfgang authored
      Mac OS X/Darwin PowerPC: Fix a problem introduced by the recent Darwin/x86
      Make the code that allocates jump islands for PowerPC aware of how we shift
      .o files in memory to compensate for Mach-O's lax alignment rules.
  31. 25 Jul, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-07-25 14:12:48 by simonmar] · e792bb84
      simonmar authored
      Remove the ForeignObj# type, and all its PrimOps.  The new efficient
      representation of ForeignPtr doesn't use ForeignObj# underneath, and
      there seems no need to keep it.
  32. 15 Jul, 2005 1 commit
  33. 11 Jul, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-07-11 13:53:24 by simonmar] · 0af6ff59
      simonmar authored
      GHCi staggers to its feet on x86_64.
      The problem is that in the small code model on x86_64, all symbol
      relocations are 32-bit, because the program is assumed to fit into
      2Gb.  However, shared libraries are linked outside the 2Gb range, and
      the linker arranges that references to shared library symbols either
      go via a jump table (for code references) or are copied into the 2Gb
      area (for data references).
      In GHCi's linker, We can use a jump table for the function symbols,
      but we can't copy the data symbols because they've already been
      relocated to point to the shared library.  What's more, we can't tell
      whether a symbol reference is to code or data - this information is
      only available from the shared library itself.
      Fortunately, at least HSbase.o doesn't have any data references to
      shared libraries (at least on the Linux distro I'm using), so I can at
      least get GHCi up and limping.
  34. 09 Jul, 2005 1 commit
  35. 13 Jun, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-06-13 02:44:22 by wolfgang] · c26a153c
      wolfgang authored
      Deal with the fact that the code and data in a .o file might not be
      16-byte aligned even if it contains instructions that require 16-byte
      This fixes floating point related crashes on Darwin/x86; there might
      also have been problems on Darwin/ppc if people load .o files with
      AltiVec code into GHCi.