- 13 Feb, 2002 1 commit
-
-
sof authored
moved defn of RTS_SUPPORTS_THREADS from Rts.h to Stg.h
-
- 06 Dec, 2001 1 commit
-
-
sewardj authored
Remove mention of PrimOpHelpers.h.
-
- 05 Dec, 2001 1 commit
-
-
sewardj authored
-------------------------------------------- Translate out PrimOps at the AbstractC level -------------------------------------------- This is the first in what might be a series of changes intended to make GHC less dependent on its C back end. The main change is to translate PrimOps into vanilla abstract C inside the compiler, rather than having to duplicate that work in each code generation route. The main changes are: * A new type, MachOp, in compiler/absCSyn/MachOp.hs. A MachOp is a primitive operation which we can reasonably expect the native code generators to implement. The set is quite small and unlikely to change much, if at all. * Translations from PrimOps to MachOps, at the end of absCSyn/AbsCUtils. This should perhaps be moved to a different module, but it is hard to see how to do this without creating a circular dep between it and AbsCUtils. * The x86 insn selector has been updated to track these changes. The sparc insn selector remains to be done. As a result of this, it is possible to compile much more code via the NCG than before. Almost all the Prelude can be compiled with it. Currently it does not know how to do 64-bit code generation. Once this is fixed, the entire Prelude should be compilable that way. I also took the opportunity to clean up the NCG infrastructure. The old Stix data type has been split into StixStmt (statements) and StixExpr (now denoting values only). This removes a class of impossible constructions and clarifies the NCG. Still to do, in no particular order: * String and literal lifting, currently done in the NCG at the top of nativeGen/MachCode, should be done in the AbstractC flattener, for the benefit of all targets. * Further cleaning up of Stix assignments. * Remove word-size dependency from Abstract C. (should be easy). * Translate out MagicIds in the AbsC -> Stix translation, not in the Stix constant folder. (!) Testsuite failures caused by this: * memo001 - fails (segfaults) for some unknown reason now. * arith003 - wrong answer in gcdInt boundary cases. * arith011 - wrong answer for shifts >= word size. * cg044 - wrong answer for some FP boundary cases. These should be fixed, but I don't think they are mission-critical for anyone.
-
- 26 Nov, 2001 1 commit
-
-
simonmar authored
Profiling cleanup. This commit eliminates some duplication in the various heap profiling subsystems, and generally centralises much of the machinery. The key concept is the separation of a heap *census* (which is now done in one place only instead of three) from the calculation of retainer sets. Previously the retainer profiling code also did a heap census on the fly, and lag-drag-void profiling had its own census machinery. Value-adds: - you can now restrict a heap profile to certain retainer sets, but still display by cost centre (or type, or closure or whatever). - I've added an option to restrict the maximum retainer set size (+RTS -R<size>, defaulting to 8). - I've cleaned up the heap profiling options at the request of Simon PJ. See the help text for details. The new scheme is backwards compatible with the old. - I've removed some odd bits of LDV or retainer profiling-specific code from various parts of the system. - the time taken doing heap censuses (and retainer set calculation) is now accurately reported by the RTS when you say +RTS -Sstderr. Still to come: - restricting a profile to a particular biography (lag/drag/void/use). This requires keeping old heap censuses around, but the infrastructure is now in place to do this.
-
- 25 Nov, 2001 1 commit
-
-
sof authored
extend the scope of the doNothing() macro; can now be used in Stg headers
-
- 22 Nov, 2001 1 commit
-
-
simonmar authored
Retainer Profiling / Lag-drag-void profiling. This is mostly work by Sungwoo Park, who spent a summer internship at MSR Cambridge this year implementing these two types of heap profiling in GHC. Relative to Sungwoo's original work, I've made some improvements to the code: - it's now possible to apply constraints to retainer and LDV profiles in the same way as we do for other types of heap profile (eg. +RTS -hc{foo,bar} -hR -RTS gives you a retainer profiling considering only closures with cost centres 'foo' and 'bar'). - the heap-profile timer implementation is cleaned up. - heap profiling no longer has to be run in a two-space heap. - general cleanup of the code and application of the SDM C coding style guidelines. Profiling will be a little slower and require more space than before, mainly because closures have an extra header word to support either retainer profiling or LDV profiling (you can't do both at the same time). We've used the new profiling tools on GHC itself, with moderate success. Fixes for some space leaks in GHC to follow...
-
- 27 Oct, 2001 1 commit
-
-
sof authored
Move extern declaration for 'environ' from Stg.h into HsPosix.h
-
- 29 Aug, 2001 1 commit
-
-
qrczak authored
Remove annoying warnings about using a deprecated extension when compiling via gcc-3.0. #if __GNUC__ >= 3 /* Assume that a flexible array member at the end of a struct * can be defined thus: T arr[]; */ #define FLEXIBLE_ARRAY #else /* Assume that it must be defined thus: T arr[0]; */ #define FLEXIBLE_ARRAY 0 #endif A test program (hsking) compiled fine with gcc-3.0!
-
- 14 Aug, 2001 1 commit
-
-
sewardj authored
Change the story about POSIX headers in C compilation. Until now, all C code in the RTS and library cbits has by default been compiled with settings for POSIXness enabled, that is: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199309L #define _ISOC9X_SOURCE If you wanted to negate this, you'd have to define NON_POSIX_SOURCE before including headers. This scheme has some bad effects: * It means that ccall-unfoldings exported via interfaces from a module compiled with -DNON_POSIX_SOURCE may not compile when imported into a module which does not -DNON_POSIX_SOURCE. * It overlaps with the feature tests we do with autoconf. * It seems to have caused borkage in the Solaris builds for some considerable period of time. The New Way is: * The default changes to not-being-in-Posix mode. * If you want to force a C file into Posix mode, #include as the **first** include the new file ghc/includes/PosixSource.h. Most of the RTS C sources have this include now. * NON_POSIX_SOURCE is almost totally expunged. Unfortunately we have to retain some vestiges of it in ghc/compiler so that modules compiled via C on Solaris using older compilers don't break.
-
- 01 Mar, 2001 1 commit
-
-
rrt authored
Apply stat fix for mingw. It's ugly, it's implausible, but it seems to work. Unlike Cygwin...(missing no. 3).
-
- 09 Feb, 2001 1 commit
-
-
simonmar authored
Remove all vestiges of INTERPRETER and __HUGS__.
-
- 04 Dec, 2000 1 commit
-
-
simonmar authored
merge recent changes from before-ghci-branch onto the HEAD
-
- 07 Nov, 2000 1 commit
-
-
simonmar authored
Clean ups: - reduce the namespace pollution of StgTypes.h, it doesn't define the shorthand versions any more (W_, I_ etc.). These are moved into Stg.h. StgTypes.h also defines StgClosure as an "opaque" struct. - RtsAPI.h is now standalone, and includes HsFFI.h and thereby config.h & StgTypes.h. Now we don't need to #include "Stg.h" in *_stub.c. - all the rts_mkXXXX and rts_getXXXX functions are defined in terms of the HsXXXX types rather than random C types (this fixes some potential bugs in our foreign export support). - added HsWord type, to match StgWord. The Haskell version of this type isn't "documented", but perhaps it should be.
-
- 27 May, 2000 1 commit
-
-
panne authored
Bug or feature? Changed `envyron' back to `environ', otherwise hslibs/posix/cbits/env.c can't be compiled. If this breaks something on M$, it must be #ifdef-ed somehow, but not simply be renamed.
-
- 26 May, 2000 1 commit
-
-
sewardj authored
Changes to allow Hugs to be built with mingw32, not cygwin. Also, updates so that DietHEP works properly for mingw32. Most changes are trivial (assert --> ASSERT), etc. For hugs, have deleted queries about the width of a terminal window, and so the printing of dots as progress indicators is gone too. No great loss. Zapped various other out-of-date platform-specific junk in machdep.c.
-
- 18 May, 2000 1 commit
-
-
panne authored
Make stackOverflow prototype available Haskell compilation
-
- 14 Apr, 2000 3 commits
-
-
sewardj authored
Change NO_MACHREGS back to NO_REGS -- I misunderstood the problem.
-
simonmar authored
back off from _POSIX_C_SOURCE=199506L to 199309L, because the former causes a bunch of extra functions thread-related to be compiled into each module on Solaris.
-
simonmar authored
#define _POSIX_C_SOURCE 199506L #define _ISOC9X_SOURCE
-
- 13 Apr, 2000 1 commit
-
-
sewardj authored
Changed NO_REGS to NO_MACHREGS to avoid inexplicable gcc warnings when building the rts for Hugs.
-
- 03 Apr, 2000 1 commit
-
-
simonmar authored
misc profiling cleanups
-
- 14 Mar, 2000 1 commit
-
-
sof authored
Simplified prog_* externs a little
-
- 13 Mar, 2000 1 commit
-
-
simonmar authored
Move Prelude.h from ghc/includes into ghc/rts. It's essentially a list of the things from the Prelude that the RTS depends on, and isn't relevant to STG code. Furthermore, this helps to clarify which parts of the RTS depend on things from the Prelude (by an explicity #include).
-
- 13 Jan, 2000 1 commit
-
-
hwloidl authored
Merged GUM-4-04 branch into the main trunk. In particular merged GUM and SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.
-
- 09 Nov, 1999 2 commits
-
-
simonmar authored
Fix up some problems with the IN_STG_CODE macro.
-
simonmar authored
A slew of SMP-related changes. - New locking scheme for thunks: we now check whether the thunk being entered is in our private allocation area, and if so we don't lock it. Well, that's the upshot. In practice it's a lot more fiddly than that. - I/O blocking is handled a bit more sanely now (but still not properly, methinks) - deadlock detection is back - remove old pre-SMP scheduler code - revamp the timing code. We actually get reasonable-looking timing info for SMP programs now. - fix a bug in the garbage collector to do with IND_OLDGENs appearing on the mutable list of the old generation. - move BDescr() function from rts/BlockAlloc.h to includes/Block.h. - move struct generation and struct step into includes/StgStorage.h (sigh) - add UPD_IND_NOLOCK for updating with an indirection where locking the black hole is not required.
-
- 05 Nov, 1999 1 commit
-
-
simonmar authored
_ccall_GC wibbles
-
- 02 Nov, 1999 1 commit
-
-
simonmar authored
This commit adds in the current state of our SMP support. Notably, this allows the new way 's' to be built, providing support for running multiple Haskell threads simultaneously on top of any pthreads implementation, the idea being to take advantage of commodity SMP boxes. Don't expect to get much of a speedup yet; due to the excessive locking required to synchronise access to mutable heap objects, you'll see a slowdown in most cases, even on a UP machine. The best I've seen is a 1.6-1.7 speedup on an example that did no locking (two optimised nfibs in parallel). - new RTS -N flag specifies how many pthreads to start. - new driver -smp flag, tells the driver to use way 's'. - new compiler -fsmp option (not for user comsumption) tells the compiler not to generate direct jumps to thunk entry code. - largely rewritten scheduler - _ccall_GC is now done by handing back a "token" to the RTS before executing the ccall; it should now be possible to execute blocking ccalls in the current thread while allowing the RTS to continue running Haskell threads as normal. - you can only call thread-safe C libraries from a way 's' build, of course. Pthread support is still incomplete, and weird things (including deadlocks) are likely to happen.
-
- 06 Jul, 1999 2 commits
- 05 Jul, 1999 1 commit
-
-
sof authored
Stg.h contains all the defs and protos that are visible when compiling .hc code (==> .hs code). Augment this set with the externally visible RTS API.
-
- 25 Jun, 1999 2 commits
-
-
simonmar authored
Comment about TABLES_NEXT_TO_CODE.
-
simonmar authored
New define: TABLES_NEXT_TO_CODE says whether info tables are assumed to reside just before the code for a function. We used to use USE_MINIINTERPRETER for this function, but it makes sense in certain cases to separate the use of tail-calls from tables-next-to-code. StgMacros: add a couple of missing macros to support update in place.
-
- 11 May, 1999 1 commit
-
-
keithw authored
(this is number 8 of 9 commits to be applied together) The CPP flag LAZY_BLACKHOLING has been moved up from options.h into Stg.h, so GHC can see it as well as the interpreter, and EAGER_BLACKHOLING has been added. The default is still LAZY_BLACKHOLING && !EAGER_BLACKHOLING.
-
- 10 May, 1999 1 commit
-
-
sof authored
Added a DllMain() which starts up RTS upon DLL load.
-
- 04 May, 1999 1 commit
-
-
sof authored
Moved DLL-related macros out of Stg.h and into separate .h file
-
- 15 Mar, 1999 1 commit
-
-
simonm authored
Remove flags field from info tables; create a separate table of flags indexed by the closure type in the RTS.
-
- 03 Mar, 1999 1 commit
-
-
sof authored
DLL_IMPORT_DATA_VAR fix
-
- 02 Mar, 1999 1 commit
-
-
sof authored
- misc changes to support DLLs - StgNat* --> StgWord*
-
- 05 Feb, 1999 1 commit
-
-
simonm authored
Copyright police.
-