1. 07 Oct, 2006 1 commit
  2. 29 Sep, 2006 1 commit
  3. 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
  4. 23 Aug, 2006 2 commits
  5. 07 Jun, 2006 1 commit
  6. 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
  7. 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
  8. 26 Apr, 2006 1 commit
  9. 18 Apr, 2006 1 commit
  10. 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
  11. 28 Mar, 2006 1 commit
  12. 06 Mar, 2006 1 commit
  13. 09 Feb, 2006 1 commit
  14. 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
  15. 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
  16. 23 Jan, 2006 1 commit
  17. 18 Jan, 2006 1 commit
  18. 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
  19. 28 Oct, 2005 1 commit
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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.
      e792bb84
  25. 15 Jul, 2005 1 commit
  26. 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.
      0af6ff59
  27. 09 Jul, 2005 1 commit
  28. 13 Jun, 2005 2 commits
    • wolfgang's avatar
      [project @ 2005-06-13 02:44:22 by wolfgang] · c26a153c
      wolfgang authored
      Darwin:
      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
      alignment.
      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.
      c26a153c
    • wolfgang's avatar
      [project @ 2005-06-13 00:16:44 by wolfgang] · cd22d3c7
      wolfgang authored
      Darwin/x86: support GHCi.
      cd22d3c7
  29. 07 Jun, 2005 1 commit
  30. 25 May, 2005 1 commit
  31. 18 May, 2005 1 commit
  32. 11 May, 2005 1 commit
  33. 05 May, 2005 1 commit
    • sof's avatar
      [project @ 2005-05-05 18:14:27 by sof] · e96f56a1
      sof authored
      ocResolve_PEi386():
          when fixing up REL32 relocations, _add_ displacement to value at the
          given offset. The existing value has so far been assumed to be zero
          (which we've asserted for), but curiously wxhaskell-0.9.4's wx.o
          contains lots of interesting non-zero values. Information / specifications
          are awfully thin on the ground as to how to precisely handle these
          relocations, but adding rather than overwriting seems to have a
          generally healthy effect; unable to crash wxhaskell-0.9.4 with a 6.4 build.
      
      Merge to STABLE.
      e96f56a1
  34. 29 Apr, 2005 1 commit
  35. 22 Apr, 2005 1 commit
    • sof's avatar
      [project @ 2005-04-22 17:00:48 by sof] · ecb1a539
      sof authored
      [mingw only]
      Better handling of I/O request abortions upon throwing an exception
      to a Haskell thread. As was, a thread blocked on an I/O request was
      simply unblocked, but its corresponding worker thread wasn't notified
      that the request had been abandoned.
      
      This manifested itself in GHCi upon Ctrl-C being hit at the prompt -- the
      worker thread blocked waiting for input on stdin prior to Ctrl-C would
      stick around even though its corresponding Haskell thread had been
      thrown an Interrupted exception. The upshot was that the worker would
      consume the next character typed in after Ctrl-C, but then just dropping
      it. Dealing with this turned out to be even more interesting due to
      Win32 aborting any console reads when Ctrl-C/Break events are delivered.
      
      The story could be improved upon (at the cost of portability) by making
      the Scheduler able to abort worker thread system calls; as is, requests
      are cooperatively abandoned. Maybe later.
      
      Also included are other minor tidyups to Ctrl-C handling under mingw.
      
      Merge to STABLE.
      ecb1a539