1. 31 Jan, 2007 1 commit
  2. 28 Jan, 2007 1 commit
    • Ian Lynagh's avatar
      Fix GHCi on PowerPC OS X · e576ba5d
      Ian Lynagh authored
      David Kirkman and Peter Tanski noticed that a line had been removed during
      a patch merge which meant that oc->image pointed to the wrong place and
      ultimately caused an error from realloc.
      e576ba5d
  3. 11 Dec, 2006 2 commits
  4. 10 Dec, 2006 1 commit
    • mnislaih's avatar
      Retrieving the datacon of an arbitrary closure · ab5b8aa3
      mnislaih authored
      This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
      - The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
      - The Persistent Linker State in the dynamic linker is extended in a similar way.
      
      Finally, these two sources of information are consulted by:
      
      > Linker.recoverDataCon :: a -> TcM Name
      ab5b8aa3
  5. 13 Dec, 2006 1 commit
  6. 12 Dec, 2006 1 commit
  7. 04 Dec, 2006 1 commit
  8. 24 Nov, 2006 1 commit
  9. 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.
      354672b0
    • 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.
      0329ca6d
  10. 15 Nov, 2006 1 commit
  11. 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,
      unfortunatley):
        
        - Don't include Stable.h in Rts.h, instead just include it where
          necessary.
        
        - 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.
      ab0e778c
  12. 07 Oct, 2006 1 commit
  13. 29 Sep, 2006 1 commit
  14. 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>
      069495a3
  15. 23 Aug, 2006 2 commits
  16. 07 Jun, 2006 1 commit
  17. 30 May, 2006 2 commits
    • simonmar@microsoft.com's avatar
      Win32: add _imp__tzname · 4285fd96
      simonmar@microsoft.com authored
      4285fd96
    • 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
      empty.
      e3c55aeb
  18. 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
      82807c21
  19. 26 Apr, 2006 1 commit
  20. 18 Apr, 2006 1 commit
  21. 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.
      0065d5ab
  22. 28 Mar, 2006 1 commit
  23. 06 Mar, 2006 1 commit
  24. 09 Feb, 2006 1 commit
  25. 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
      measurements).  
      
      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).
      04db0e9f
    • simonpj@microsoft.com's avatar
      badd5d76
  26. 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.
      beb5737b
  27. 23 Jan, 2006 1 commit
  28. 18 Jan, 2006 1 commit
  29. 15 Dec, 2005 1 commit
    • desrt's avatar
      [project @ 2005-12-15 23:32:29 by desrt] · 12694df2
      desrt authored
      (( PLEASE MERGE TO STABLE ))
      
      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.
      12694df2
  30. 28 Oct, 2005 1 commit
  31. 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)
      2909e6fb
    • 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
      addProddableBlock().
      Not directly harmful, but triggers ASSERT() failure w/ DEBUG.
      
      Merge to STABLE.
      53068b73
  32. 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
          implementations.
      
        - 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
      03a9ff01
  33. 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.
      3d8a0867
  34. 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
      commit.
      
      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.
      68f5bad2