- 04 Feb, 2002 11 commits
-
-
sof authored
wibble
-
sof authored
startupHaskell: Scheduler startup now handles task creation
-
sof authored
Factor out the task handling into separate 'module'. [Tasks represent native threads that execute STG code, with this module providing the API which the Scheduler uses to control their creation and destruction.]
-
sof authored
- sm_mutex is now a Mutex (not a pthread_mutex_t). - sm_mutex lock/unlocks are only done for SMP builds.
-
sof authored
- renamed MutexVar to Mutex, CondVar to Condition. - added yieldThread(). - simplified/specialised type of entry point to new (native) threads; now takes no args & returns no result.
-
sof authored
simplified startup of this 'sub-system', initCapabilities() takes care of it all
-
sof authored
stat_getElapsedTime(): now visible when RTS_SUPPORTS_THREADS is defined (was: SMP only)
-
sewardj authored
Adding section descriptions, for ELF: don't record sections satisfying size == 0 || kind `notElem` [SECTIONKIND_CODE_OR_RODATA, SECTIONKIND_RWDATA] The latter condition is really an optimisation based on knowledge of what queries will be made of the table. Still, seems to work, and reduces the number of sections in the list by about a factor of 3, so hopefully will improve GC performance in GHCi. If you get wierd GC problems in GHCi ... this may be to blame.
-
simonmar authored
wibble
-
simonmar authored
HC_OPTS is now used in both .c and .hc compilations (again).
-
simonmar authored
oops, fix HC_OBJS for non-normal ways.
-
- 01 Feb, 2002 2 commits
-
-
simonmar authored
When distinguishing between code & data pointers, rather than testing for membership of the text section, test for not membership of one of the data sections. The reason for this change is that testing for membership of the text section was fragile: we could only test whether a value was smaller than the end address, because there doesn't appear to be a portable way to find the beginning of the text section. Indeed, the test breaks on very recent Linux kernels which mmap() memory below the program text. In fact, the reversed test may be faster because the expected common case is when the pointer is into the dynamic heap, and we eliminate these case immediately in the new test. A quick test shows no measurable performance difference with the change. MERGE TO STABLE
-
sof authored
Add URLs and other pointers to resources on the PE COFF format.
-
- 31 Jan, 2002 3 commits
-
-
sof authored
Win32 implementation, first pass.
-
sof authored
First steps towards implementing better interop between Concurrent Haskell and native threads. - factored out Capability handling into a separate source file (only the SMP build uses multiple capabilities tho). - factored out OS/native threads handling into a separate source file, OSThreads.{c,h}. Currently, just a pthreads-based implementation; Win32 version to follow. - scheduler code now distinguishes between multi-task threaded code (SMP) and single-task threaded code ('threaded RTS'), but sharing code between these two modes whenever poss. i.e., just a first snapshot; the bulk of the transitioning code remains to be implemented.
-
sof authored
got tired of seeing gcc trigraph warning
-
- 30 Jan, 2002 2 commits
-
-
simonmar authored
Set $(HC) *after* including boilerplate.mk, which re-defines it.
-
simonmar authored
Clean up this Makefile: - Use the enhanced automatic source-finding machinery from paths.mk rather than rolling our own, - Turn on UseGhcForCc to get our C files compiled with GHC. This fixes some obscure bugs caused by the fact that we were re-initializing $(CC_OPTS) in this Makefile using :=, when it had previously already been set with = (apparently different versions of GNU make behave differently presented with this kind of mixed assigment).
-
- 29 Jan, 2002 4 commits
-
-
simonmar authored
Inline mpz_cmp_si() into cmpIntegerInt#, and mpz_cmp() into cmpInteger# to offset recent performance degradation caused by outlining of these primitives. Also remove heap checks in these primitives: they don't do any allocation, so no heap check is necessary.
-
simonmar authored
Fix highly obscure bug. The heap check in cmpIntegerzh_fast was erroneously passing cmpIntegerIntzh_fast as the resumption point instead of cmpIntegerzh_fast, with the result that if a heap-check happened to strike in cmpIntegerzh_fast then we would end up resuming in cmpIntegerIntzh and returning an incorrect comparison result. One symptom is that very occasionally floating point numbers would print incorrectly (ending in an 'a').
-
sof authored
Update comments re: reloc overflow. A careful re-read of the PE spec did prove useful; Sec 4.1 (last para) describes how overflow is handled.
-
sof authored
PEi386/COFF: handle relocation overflows, i.e., if a section is marked with the flag (MY)IMAGE_SCN_LNK_NRELOC_OVFL, then the first entry in the relocation table holds the 32-bit relocation count rather than 16-bit number in the section header. Apparently, a version of the MS PE spec exists that spells this out, but haven't been able to locate it (perhaps people on the 'inside' could try to locate an up-to-date version...?) winnt.h is clear enough about it though (as is the GNU libbfd sources). This is the Right Way to compute the relocation count, but unfortunately libbfd / GNU ld is generating bogus output when the reloc field overflows (causing objdump/nm etc. to crash when trying to read the generated output!) Looking into it. Once this has been cleared up/fixed, the splitting up of HSstd.o (and HSwin32.o) should be a thing of the past. I've taken the liberty of disabling the suspiciously-large-reloc-section test already.
-
- 26 Jan, 2002 2 commits
-
-
rje authored
Minor tweak to use the new names. X_ret_info -> X_info. Just so the mangler finds things more easily. For more info, see the commit to HeapStackCheck.hc
-
rje authored
This is a simple fix for a rather obscure bug. In the heap/stack checking code, we were creating info tables with names of the form stg_gc_X_ret_info, and giving them entry points with names of the form stg_gc_X_ret. Unfortunately, the mangler expects that if an info table is called Y_info, the entry point should be called Y_ret or Y_entry. In this case, the mangler thus looks for stg_gc_X_ret_ret and stg_gc_X_ret_entry, neither of which exists. As a result, the entry points aren't placed directly after the info tables. Fortunately, the code for the entry points was defined emmediately after the info table definition, and so was *usually* in the right place already. However, in certain circumstances (that can result from some tweaks on my private tree, and might possibly occur by other means), this was not happening, and thus any attempts to enter the entry point for this info table will cause problems. The fix is quite simple: rename the info tables so that the mangler finds the entry points and puts them in the right places. I don't think this commit is likely to have a notable effect on anything else.
-
- 25 Jan, 2002 2 commits
- 24 Jan, 2002 5 commits
-
-
sof authored
SMP: misc tasks timing stats fixes
-
sof authored
SMP: hack-and-slash to bring BaseReg into scope
-
sof authored
SMP: disable spark support (only a little bit of header file re-jigging is reqd to get it going again, I suspect.)
-
sof authored
SMP: bunch of triv. changes to account for the fact that a Capability is no longer just a RegTable
-
sof authored
Way 's': add -DSMP to HC_ and CC_OPTS
-
- 23 Jan, 2002 1 commit
-
-
sewardj authored
Fix two problems with the ELF linker: 1. Determine section attributes by examining various bits in the section header tables, rather than from the section names. This makes it robust against future changes / additions to the set of section names. 2. Handle local symbols differently. Do not add them to our own local symbol table for this object, since that's (a) wrong -- multiple local symbols can have the same name so long as each is in a different section, so if we just dump them into the local symbol table we'll wind up with apparently duplicate symbols (b) totally unnecessary, since the relocations against local symbols simply specify an index into the ELF symbol table for the object, from whence the address can be calculated without reference to the name. TODO: Test on sparc-solaris Investigate whether PEi386 linker needs fixing similarly and then MERGE TO STABLE
-
- 22 Jan, 2002 1 commit
-
-
simonmar authored
Deadlock is now an exception instead of a return status from rts_evalIO(). The current behaviour is as follows, and can be changed if necessary: in the event of a deadlock, the top main thread is taken from the main thread queue, and if it is blocked on an MVar or an Exception (for throwTo), then it receives a Deadlock exception. If it is blocked on a BLACKHOLE, we instead send it the NonTermination exception. Note that only the main thread gets the exception: it is the responsibility of the main thread to unblock other threads if necessary. There's a slight difference in the SMP build: *all* the main threads get an exception, because clearly none of them may make progress (compared to the non-SMP situation, where all but the top main thread are usually blocked).
-
- 21 Jan, 2002 1 commit
-
-
sof authored
multi-slurp protect
-
- 15 Jan, 2002 1 commit
-
-
sof authored
updates & fixes to hc-bootstrapping story; from Thomas Nordin
-
- 08 Jan, 2002 1 commit
-
-
sof authored
Make better use of the -M<size> setting under Win32. Use it to guide the amount of VM to reserve -- the default is (still) 256M, but the user will now have a way of overriding this setting.
-
- 07 Jan, 2002 1 commit
-
-
ken authored
On the alpha, __divq() in libc.a clobbers $s6, so StgRun() needs to save $s6. While we are at it, let us save $f8 and $f9 as well. MERGE TO STABLE
-
- 29 Dec, 2001 1 commit
-
-
sof authored
add raft of missing symbols to RTS_SYMBOLS
-
- 20 Dec, 2001 1 commit
-
-
sewardj authored
Outline freeStablePtr, so NCG-generated code actually has something to call :) Also remove the presumably-defunct splitStablePtr.
-
- 19 Dec, 2001 1 commit
-
-
simonmar authored
Remove some temporary debugging code.
-