summaryrefslogtreecommitdiff
path: root/rts
Commit message (Collapse)AuthorAgeFilesLines
* Refactor CLabel pretty-printingSylvain Henry2020-07-311-2/+2
| | | | | | | | Pretty-printing CLabel relies on sdocWithDynFlags that we want to remove (#10143, #17957). It uses it to query the backend and the platform. This patch exposes Clabel ppr functions specialised for each backend so that backend code can directly use them.
* Use allocate, not ALLOC_PRIM_P for unpackClosure#Michalis Pardalos2020-07-271-5/+7
| | | | | | | ALLOC_PRIM_P fails for large closures, by directly using allocate we can handle closures which are larger than the block size. Fixes #12492
* winio: remove dead argument to stg_newIOPortzhTamar Christina2020-07-261-1/+1
|
* rts/win32: Exit with EXIT_HEAPOVERFLOW if memory commit failsBen Gamari2020-07-261-1/+1
| | | | | | | | Since switching to the two-step allocator, the `outofmem` test fails via `osCommitMemory` failing to commit. However, this was previously exiting with `EXIT_FAILURE`, rather than `EXIT_HEAPOVERFLOW`. I think the latter is a more reasonable exit code for this case and matches the behavior on POSIX platforms.
* winio: restore console cp on exitTamar Christina2020-07-242-2/+38
|
* [linker] Fix out of range relocations.Moritz Angermann2020-07-238-28/+122
| | | | | | | | | | | | mmap may return address all over the place. mmap_next will ensure we get the next free page after the requested address. This is especially important for linking on aarch64, where the memory model with PIC admits relocations in the +-4GB range, and as such we can't work with arbitrary object locations in memory. Of note: we map the rts into process space, so any mapped objects must not be ouside of the 4GB from the processes address space.
* Revert "[linker/rtsSymbols] More linker symbols"wip/angerman/revert-symbolswip/T18272Moritz Angermann2020-07-201-206/+17
| | | | | | This reverts commit 686e72253aed3880268dd6858eadd8c320f09e97. Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
* Revert "better if guards."Moritz Angermann2020-07-201-1/+1
| | | | | | This reverts commit 3f60b94de1f460ca3f689152860b108a19ce193e. Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
* Revert "Fix (1)"Moritz Angermann2020-07-201-1/+1
| | | | | | This reverts commit 7abffced01f5680efafe44f6be2733eab321b039. Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
* Revert "AArch32 symbols only on aarch32."Moritz Angermann2020-07-201-6/+5
| | | | | | This reverts commit cdfeb3f24f76e8fd30452016676e56fbc827789a. Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
* rts: Add --copying-gc flag to reverse effect of --nonmoving-gcBen Gamari2020-07-181-0/+11
| | | | Fixes #18281.
* winio: update lockfile signature and remove mistaken symbol in rts.Tamar Christina2020-07-154-7/+2
|
* winio: clarify wording on conditional variables.Tamar Christina2020-07-151-1/+2
|
* winio: Remove obsolete comment about cond. variablesAndreas Klebinger2020-07-151-5/+0
|
* winio: Minor comments/renamingsBen Gamari2020-07-153-4/+4
|
* winio: Fix rebase artifactsTamar Christina2020-07-151-14/+7
|
* winio: Various fixes related to rebase and testdriverTamar Christina2020-07-151-6/+14
|
* winio: Remove outstanding_requests from runner.Andreas Klebinger2020-07-151-18/+10
| | | | | | | | | | | | | | | | We used a variable to keep track of situations where we got entries from the IO port, but all of them had already been canceled. While we can avoid some work that way this case seems quite rare. So we give up on tracking this and instead always assume at least one of the returned entries is valid. If that's not the case no harm is done, we just perform some additional work. But it makes the runner easier to reason about. In particular we don't need to care if another thread modifies oustanding_requests after we return from waiting on the IO Port.
* winio: Refactor non-threaded runner thread and scheduler interface.Andreas Klebinger2020-07-153-99/+151
| | | | | | | | Only use a single communication point (registerAlertableWait) to inform the C side aobut both timeouts to use as well as outstanding requests. Also queue a haskell processing thread after each return from alertable waits. This way there is no risk of us missing a timer event.
* winio: Display thread labels when tracing scheduler events.Andreas Klebinger2020-07-151-18/+24
|
* winio: Always lock win32 event queueAndreas Klebinger2020-07-151-10/+17
|
* winio: Update placeholder comment with actual function name.Andreas Klebinger2020-07-151-1/+1
|
* winio: Queue IO processing threads at the front of the queue.Andreas Klebinger2020-07-153-1/+13
| | | | | This will unblock the IO thread sooner hopefully leading to higher throughput in some situations.
* winio: Add an exported isHeapAlloced function to the RTSAndreas Klebinger2020-07-151-0/+9
|
* winio: nonthreaded: Create io processing threads in main thread.Andreas Klebinger2020-07-153-34/+90
| | | | | | | | | | | | | | | | | | | | We now set a flag in the IO thread. The scheduler when looking for work will check the flag and create/queue threads accordingly. We used to create these in the IO thread. This improved performance but caused frequent segfaults. Thread creation/allocation is only safe to do if nothing currently accesses the storeagemanager. However without locks in the non-threaded runtime this can't be guaranteed. This shouldn't change performance all too much. In the past we had: * IO: Create/Queue thread. * Scheduler: Runs a few times. Eventually picks up IO processing thread. Now it's: * IO: Set flag to queue thread. * Scheduler: Pick up flag, if set create/queue thread. Eventually picks up IO processing thread.
* winio: Make last_event a local variableAndreas Klebinger2020-07-151-3/+8
|
* winio: Mark outstanding_service_requests volatile.Andreas Klebinger2020-07-151-2/+8
| | | | | | | | | | | | | | | As far as I know C(99) gives no guarantees for code like bool condition; ... while(condition) sleep(); that condition will be updated if it's changed by another thread. So we are explicit here and mark it as volatile, this will force a reload from memory on each iteration.
* winio: Properly check for the tso of an incall to be zero.Andreas Klebinger2020-07-151-1/+1
|
* winio: A few more improvements to the IOPort primitives.Andreas Klebinger2020-07-151-11/+41
|
* winio: Clean up code surrounding IOPort primitives.Andreas Klebinger2020-07-155-31/+80
| | | | | | | | | | | | | | According to phyx these should only be read and written once per object. Not neccesarily in that order. To strengthen that guarantee the primitives will now throw an exception if we violate this invariant. As a consequence we can eliminate some code from their primops. In particular code dealing with multiple queued readers/writers now simply checks the invariant and throws an exception if it was violated. That is in contrast to mvars which will do things like wake up all readers, queue multi writers etc.
* winio: Expand comments describing non-threaded loopAndreas Klebinger2020-07-151-5/+37
|
* winio: Remove some barf statements that are a bit strict.Tamar Christina2020-07-151-2/+0
|
* winio: Fix issues with non-threaded I/O manager after split.Tamar Christina2020-07-151-0/+3
|
* winio: Relaxing some constraints in io-manager.Tamar Christina2020-07-151-1/+1
|
* winio: Fix a scheduler bug with the threaded-runtime.Tamar Christina2020-07-151-13/+6
|
* winio: core non-threaded I/O managerTamar Christina2020-07-154-0/+844
|
* winio: Multiple refactorings and support changes.Tamar Christina2020-07-1515-476/+134
|
* winio: Init Windows console Codepage to UTF-8.Tamar Christina2020-07-151-0/+22
|
* winio: Add new io-manager cmdline optionsTamar Christina2020-07-152-0/+68
|
* winio: Add IOPort synchronization primitiveTamar Christina2020-07-1511-10/+231
|
* winio: Flush event logs eagerly.Tamar Christina2020-07-152-0/+3
|
* winio: Small linker comment and ifdef cleanupsTamar Christina2020-07-152-7/+3
|
* winio: Use SlimReaderLocks and ConditonalVariables provided by the OS ↵Tamar Christina2020-07-158-168/+117
| | | | instead of emulated ones
* winio: Drop Windows Vista support, require Windows 7Tamar Christina2020-07-152-2/+10
|
* rts/Disassembler.c: Use FMT_HexWord for printing values in hex formatStefan Schulze Frielinghaus2020-07-141-8/+5
|
* Escape backslashes in json profiling reports properly.Andreas Klebinger2020-07-141-19/+45
| | | | | | | I also took the liberty to do away the fixed buffer size for escaping. Using a fixed size here can only lead to issues down the line. Fixes #18438.
* rts linker: teach the linker about GLIBC's special handling of *stat, mknod ↵Adam Sandberg Ericsson2020-07-071-3/+31
| | | | and atexit functions #7072
* AArch32 symbols only on aarch32.Moritz Angermann2020-07-071-5/+6
|
* Fix (1)Moritz Angermann2020-07-071-1/+1
|
* better if guards.Moritz Angermann2020-07-071-1/+1
|