- 05 Apr, 2005 1 commit
-
-
simonmar authored
Some multi-processor hackery, including - Don't hang blocked threads off BLACKHOLEs any more, instead keep them all on a separate queue which is checked periodically for threads to wake up. This is good because (a) we don't have to worry about locking the closure in SMP mode when we want to block on it, and (b) it means the standard update code doesn't need to wake up any threads or check for a BLACKHOLE_BQ, simplifying the update code. The downside is that if there are lots of threads blocked on BLACKHOLEs, we might have to do a lot of repeated list traversal. We don't expect this to be common, though. conc023 goes slower with this change, but we expect most programs to benefit from the shorter update code. - Fixing up the Capability code to handle multiple capabilities (SMP mode), and related changes to get the SMP mode at least building.
-
- 27 Mar, 2005 1 commit
-
-
panne authored
* Some preprocessors don't like the C99/C++ '//' comments after a directive, so use '/* */' instead. For consistency, a lot of '//' in the include files were converted, too. * UnDOSified libraries/base/cbits/runProcess.c. * My favourite sport: Killed $Id$s.
-
- 15 Mar, 2005 1 commit
-
-
krasimir authored
Without semicolon after "foundit:" at least mingw32-gcc raises "error: label at end of compound statement".
-
- 09 Mar, 2005 1 commit
-
-
wolfgang authored
Retain all CAFs when dynamic Haskell libraries are used from GHCi. The Linker usually replaces references to newCAF with references to newDynCAF, but the system dynamic linker won't do that for us. Also, the situation is slightly different - we never want CAFs from dylibs to be reverted, because the dylibs might be used both by the interpreted program and by GHCi itself. So instead of just caf_list, there's now both caf_list and revertible_caf_list. newDynCAF adds a CAF to revertible_caf_list, and newCAF either adds the CAF to caf_list or to the mutable list, depending on whether we are in GHCi. This hack is only active when Linker.c has loaded libHSbase_dyn.[so|dylib], but for now, it applies to all CAFs, not just dynamically-linked ones. If that is worth fixing, we could do that by checking whether the the CAF closure or it's info pointer is in the main executable's address range. MERGE TO STABLE
-
- 08 Mar, 2005 2 commits
-
-
wolfgang authored
Mac OS X: Kill HaskellSupport.framework. Instead, look for GMP.framework (a framework-version of libgmp), else look for a normal -lgmp as usual. The other part of HaskellSupport.framework, dlcompat, is no longer needed (as of Mac OS X 10.3, it's included in libSystem). It's enough to just use the normal configure tests for -ldl. MERGE TO STABLE
-
wolfgang authored
Mach-O Linker: eradicate some warnings MERGE TO STABLE
-
- 07 Mar, 2005 1 commit
-
-
simonmar authored
Add missing hs_* symbols
-
- 05 Mar, 2005 1 commit
-
-
panne authored
Nuked dead code. Now the RTS is free of warnings, except for failed inlinings of thread_obj, processHeapClosureForDead, pop, and push. Should we remove their "inline" modifier?
-
- 19 Feb, 2005 1 commit
-
-
desrt authored
Linker.c: ELF: Added two utility functions findElfSectionIndexByName and findElfSectionByName that are used by the PPC64 linker currently being worked on. These functions should be used in other (generic) ELF code too.
-
- 17 Feb, 2005 1 commit
-
-
desrt authored
LinkerInternals.h: all platforms: changed 'image' pointer in ObjectCode from (void *) to (char *). Linker.c: linux/ppc: added mremap() support to unbreak the build when USE_MMAP is defined on linux/ppc (as it now is.)
-
- 10 Feb, 2005 1 commit
-
-
simonmar authored
GC changes: instead of threading old-generation mutable lists through objects in the heap, keep it in a separate flat array. This has some advantages: - the IND_OLDGEN object is now only 2 words, so the minimum size of a THUNK is now 2 words instead of 3. This saves some amount of allocation (about 2% on average according to my measurements), and is more friendly to the cache by squashing objects together more. - keeping the mutable list separate from the IND object will be necessary for our multiprocessor implementation. - removing the mut_link field makes the layout of some objects more uniform, leading to less complexity and special cases. - I also unified the two mutable lists (mut_once_list and mut_list) into a single mutable list, which lead to more simplifications in the GC.
-
- 29 Jan, 2005 1 commit
-
-
stolz authored
USE_MMAP on FreeBSD as well
-
- 28 Jan, 2005 2 commits
-
-
krasimir authored
- The output from uncaught exceptions handler is redirected to RTS's errorBelch. - The output from Debug.Trace is redirected to RTS's debugBelch - Usually errorBelch and debugBelch messages go to stderr except for Windows GUI applications. For GUI applications the Debug.Trace output is redirected to debug console and the exceptions message is displayed in message box.
-
simonmar authored
Rationalise the BUILD,HOST,TARGET defines. Recall that: - build is the platform we're building on - host is the platform we're running on - target is the platform we're generating code for The change is that now we take these definitions as applying from the point of view of the particular source code being built, rather than the point of view of the whole build tree. For example, in RTS and library code, we were previously testing the TARGET platform. But under the new rule, the platform on which this code is going to run is the HOST platform. TARGET only makes sense in the compiler sources. In practical terms, this means that the values of BUILD, HOST & TARGET may vary depending on which part of the build tree we are in. Actual changes: - new file: includes/ghcplatform.h contains platform defines for the RTS and library code. - new file: includes/ghcautoconf.h contains the autoconf settings only (HAVE_BLAH). This is so that we can get hold of these settings independently of the platform defines when necessary (eg. in GHC). - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h. - MachRegs.h, which is included into both the compiler and the RTS, now has to cope with the fact that it might need to test either _TARGET_ or _HOST_ depending on the context. - the compiler's Makefile now generates stage{1,2,3}/ghc_boot_platform.h which contains platform defines for the compiler. These differ depending on the stage, of course: in stage2, the HOST is the TARGET of stage1. This was wrong before. - The compiler doesn't get platform info from Config.hs any more. Previously it did (sometimes), but unless we want to generate a new Config.hs for each stage we can't do this. - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically in CPP'd Haskell source. - ghcplatform.h defines *_TARGET_* for backwards compatibility (ghcplatform.h is included by ghcconfig.h, which is included by config.h, so code which still #includes config.h will get the TARGET settings as before). - The Users's Guide is updated to mention *_HOST_* rather than *_TARGET_*. - coding-style.html in the commentary now contains a section on platform defines. There are further doc updates to come. Thanks to Wolfgang Thaller for pointing me in the right direction.
-
- 18 Jan, 2005 1 commit
-
-
simonmar authored
USE_MMAP on Linux too: this is needed for sparc64-unknown-linux at least, and since it seems to work on i386-unknown-linux too we might as well enable it. We should probably use it on more arches/OSs too.
-
- 06 Jan, 2005 1 commit
-
-
igloo authored
Fix for ghci on sparc.
-
- 08 Dec, 2004 1 commit
-
-
simonmar authored
Fix bug #1073501: checkProddableBlock: invalid fixup in runtime linker The bug manifested when trying to load an object with debugging info (compiled with gcc -g) into GHCi. The problem was that the object loader was ignoring the sections containing debugging info, but then it was later trying to do relocations for those sections, and its own sanity checking code correctly detected that the relocations were in unknown parts of the object file. The fix is to ignore relocations whose target section isn't one of the sections that we're interested in, using the same test in both cases (the code to test section kind has been extracted). The code could probably benefit from more refactoring: it looks like the list of sections we build up in the first phase isn't even used in the second phase, instead we traverse the section table in the image again. This looks like cruft leftover from when the GC used to check whether an address was in text or data space.
-
- 02 Dec, 2004 1 commit
-
-
wolfgang authored
Mac OS X/Darwin/Mach-O: Improve handling of object files without dynamic symbol tables.
-
- 19 Nov, 2004 1 commit
-
-
simonpj authored
Add missing symbol for InstallConsoleEvent
-
- 18 Nov, 2004 1 commit
-
-
tharris authored
Support for atomic memory transactions and associated regression tests conc041-048
-
- 07 Oct, 2004 1 commit
-
-
wolfgang authored
Position Independent Code and Dynamic Linking Support, Part 1 This commit allows generation of position independent code (PIC) that fully supports dynamic linking on Mac OS X and PowerPC Linux. Other platforms are not yet supported, and there is no support for actually linking or using dynamic libraries - so if you use the -fPIC or -dynamic code generation flags, you have to type your (platform-specific) linker command lines yourself. nativeGen/PositionIndependentCode.hs: New file. Look here for some more comments on how this works. cmm/CLabel.hs: Add support for DynamicLinkerLabels and PIC base labels - for use inside the NCG. needsCDecl: Case alternative labels now need C decls, see the codeGen/CgInfoTbls.hs below for details cmm/Cmm.hs: Add CmmPicBaseReg (used in NCG), and CmmLabelDiffOff (used in NCG and for offsets in info tables) cmm/CmmParse.y: support offsets in info tables cmm/PprC.hs: support CmmLabelDiffOff Case alternative labels now need C decls (see the codeGen/CgInfoTbls.hs for details), so we need to pprDataExterns for info tables. cmm/PprCmm.hs: support CmmLabelDiffOff codeGen/CgInfoTbls.hs: no longer store absolute addresses in info tables, instead, we store offsets. Also, for vectored return points, emit the alternatives _after_ the vector table. This is to work around a limitation in Apple's as, which refuses to handle label differences where one label is at the end of a section. Emitting alternatives after vector info tables makes sure this never happens in GHC generated code. Case alternatives now require prototypes in hc code, though (see changes in PprC.hs, CLabel.hs). main/CmdLineOpts.lhs: Add a new option, -fPIC. main/DriverFlags.hs: Pass the correct options for PIC to gcc, depending on the platform. Only for powerpc for now. nativeGen/AsmCodeGen.hs: Many changes... Mac OS X-specific management of import stubs is no longer, it's now part of a general mechanism to handle such things for all platforms that need it (Darwin [both ppc and x86], Linux on ppc, and some platforms we don't support). Move cmmToCmm into its own monad which can accumulate a list of imported symbols. Make it call cmmMakeDynamicReference at the right places. nativeGen/MachCodeGen.hs: nativeGen/MachInstrs.hs: nativeGen/MachRegs.lhs: nativeGen/PprMach.hs: nativeGen/RegAllocInfo.hs: Too many changes to enumerate here, PowerPC specific. nativeGen/NCGMonad.hs: NatM still tracks imported symbols, as more labels can be created during code generation (float literals, jump tables; on some platforms all data access has to go through the dynamic linking mechanism). driver/mangler/ghc-asm.lprl: Mangle absolute addresses in info tables to offsets. Correctly pass through GCC-generated PIC for Mac OS X and powerpc linux. includes/Cmm.h: includes/InfoTables.h: includes/Storage.h: includes/mkDerivedConstants.c: rts/GC.c: rts/GCCompact.c: rts/HeapStackCheck.cmm: rts/Printer.c: rts/RetainerProfile.c: rts/Sanity.c: Adapt to the fact that info tables now contain offsets. rts/Linker.c: Mac-specific: change machoInitSymbolsWithoutUnderscore to support PIC.
-
- 04 Oct, 2004 1 commit
-
-
wolfgang authored
Mac OS X: Make the Linker deal properly with object files that lack a symbol table or a dynamic symbol table. Objects that don't import any symbols don't get a dynamic symbol table, which caused GHCi to crash. MERGE TO STABLE
-
- 02 Oct, 2004 1 commit
-
-
dons authored
When linking against libpthreads, raise(3) can behave strangely on some platforms (OpenBSD at least, maybe other BSDs, not Linux). So use pthread_kill() to generate signals when running the threaded rts, instead of raise(), when System.Posix.Signals.raiseSignal is called. raiseSignal will call genericRaise, in the rts, which knows which function to use.
-
- 29 Sep, 2004 1 commit
-
-
wolfgang authored
Mac OS X: Fix a serious bug in the linker's handling of Mach-O's GENERIC_RELOC_VANILLA relocations. MERGE TO STABLE
-
- 27 Sep, 2004 2 commits
- 09 Sep, 2004 1 commit
-
-
simonpj authored
Fix apparent typo in call to debugBelch; Win32 only I think
-
- 03 Sep, 2004 1 commit
-
-
simonmar authored
Cleanup: all (well, most) messages from the RTS now go through the functions in RtsUtils: barf(), debugBelch() and errorBelch(). The latter two were previously called belch() and prog_belch() respectively. See the comments for the right usage of these message functions. One reason for doing this is so that we can avoid spurious uses of stdout/stderr by Haskell apps on platforms where we shouldn't be using them (eg. non-console apps on Windows).
-
- 31 Aug, 2004 1 commit
-
-
sof authored
RTS_SYMBOLS: added closure_flags (innards-peeking user code may use this); merge to STABLE
-
- 22 Aug, 2004 1 commit
-
-
panne authored
Removed a few "use of cast expressions as lvalues is deprecated" warnings. Note that gcc is really pedantic nowadays, so we have to go via a temporary to avoid "cast does not match function type" warnings.
-
- 20 Aug, 2004 1 commit
-
-
simonmar authored
Fixes
-
- 13 Aug, 2004 1 commit
-
-
simonmar authored
Merge backend-hacking-branch onto HEAD. Yay!
-
- 18 Jun, 2004 1 commit
-
-
dons authored
Have loadObj ignore requests to load an object more than once, instead of actually loading the object, then dying. This change lets user-land loaders safely work inside GHCi, when they would have no way to know what packages had already been loaded. Help from SimonM and Andre Pang.
-
- 16 Jun, 2004 1 commit
-
-
dons authored
Add linker symbols into linker symbol table. This lets things that bind to the linker run in GHCi. Tested on OSX and OpenBSD. Thanks to Andre Pang.
-
- 12 Jun, 2004 1 commit
-
-
panne authored
Tell the linker that we barf in lockFile now. Nuked an evil $Id$ on the way.
-
- 15 May, 2004 1 commit
-
-
dons authored
Enable GHCi on OpenBSD 1. fix dlopen(NULL, ..) not working 2. set USE_MMAP to overcome malloc'd memory not being executable
-
- 22 Mar, 2004 1 commit
-
-
simonmar authored
Fix uninitialised ref. Submitted by: Julian Seward (who else!)
-
- 15 Feb, 2004 1 commit
-
-
krasimir authored
Remove unused hooks
-
- 05 Jan, 2004 1 commit
-
-
simonmar authored
Instead of grabbing the handle to the executable by calling dlopen(NULL,...), use RTLD_DEFAULT as the handle to lookup symbols if it is available. It seems that RTLD_DEFAULT may be required on certain systems, although I'm not sure it is available everywhere, so I've left the old code as fallback in case it isn't available.
-
- 23 Dec, 2003 1 commit
-
-
simonmar authored
Add performMajorGC
-