This patch changes the STG code so that %rsp to be aligned to a 16-byte boundary + 8. This is the alignment required by the x86_64 ABI on entry to a function. Previously we kept %rsp aligned to a 16-byte boundary, but this was causing problems for the LLVM backend (see #4211). We now don't need to invoke llvm stack mangler on x86_64 targets. Since the stack is now 16+8 byte algined in STG land on x86_64, we don't need to mangle the stack manipulations with the llvm mangler. This patch only modifies the alignement for x86_64 backends.
We now put the libffi objects into the RTS library, rather than trying to mangle libffi into being a ghc package itself. It would be nicer to make it a separate library (but not a ghc package), but for now hopefully this will get the build going through on Windows again.
Now that we always link in an extra object, we may as well always define rtsOptsEnabled in it, rather than having a default value in rts/hooks/RtsOptsEnabled.c.
…aries: * RWX --- --- home/prefix/gentoo/usr/lib/ghc-7.2.1/ghc * !WX --- --- home/prefix/gentoo/usr/lib/ghc-7.2.1/libHSrts.a:AdjustorAsm.o More info can be found here: http://www.gentoo.org/proj/en/hardened/gnu-stack.xml Signed-off-by: Sergei Trofimovich <firstname.lastname@example.org>
maskUninterruptible state instead of ordinary mask, due to a misinterpretation of the way the TSO_INTERRUPTIBLE flag works. Remarkably this must have been broken for quite some time. Indeed we even had a test that demonstrated the wrong behaviour (conc015a) but presumably I didn't look hard enough at the output to notice that it was wrong.
discard all the sparks from each Capability, but we were forgetting to account for the discarded sparks in the stats, leading to a failure of the assertion that tests the spark invariant. I've moved the discarding of sparks to just before the GC, to avoid race conditions, and counted the discarded sparks as GC'd.
When the bootstrap compiler does not include this patch, you must add this line to mk/build.mk, otherwise the ARM architecture cannot be detected due to a -undef option given to the C pre-processor. SRC_HC_OPTS = -pgmP 'gcc -E -traditional'
This patch fixes RTS' pushWSDeque function. We need to invoke write barrier after element is added to the queue and before moving bottom. The reason for this is possible write reordering on modern CPUs (e.g. ARMv7MP) where setting of element might be done later after moving bottom. When such situation happen other thread might be waiting to steal data from the queue and when bottom is moved it eagerly steals undefined data from the queue since setting of element has not happened yet.
This patch adds mapping for STG floating point registers using ARM VFPv3. Since I'm using just d8-d11 also processors with just VFPv3-D16 implemented should work (e.g. NVidia Tegra2, Marvell Dove)
on mutable list" after a call to tryPutMVar#. I don't think this leads to any problems without -debug.
being woken already has its wakeup flag set, don't bother signalling its condition variable again.
We add a new RTS flag -T for collecting statistics but not giving any new inputs. There is one new struct in rts/storage/GC.h: GCStats. We add two new global counters current_residency and current_slop, which are useful for in-program GC statistics. See GHC.Stats in base for a Haskell interface to this functionality. Signed-off-by: Edward Z. Yang <email@example.com>
Signed-off-by: Edward Z. Yang <firstname.lastname@example.org>
Heap census now happens during GC, so that time is already accounted for in GC_tot_cpu.
Now that the heap census runs in the middle of garbage collections, the "CPU time" it was calculating included any CPU time used so far in the current GC. This could cause CPU time to appear to go down, which means hp2ps complained about "samples out of sequence". I'm not sure if this is the nicest way to solve this (maybe resurrecting mut_user_time_during_GC would be better?) but it gets things working again.
+RTS -hT and -threaded.
calling resurrectThreads() (fixes #5314). This avoids a lot of problems, because resurrectThreads() may overwrite some closures in the heap, leaving slop behind. The bug in instances, this fix avoids them all in one go.