summaryrefslogtreecommitdiff
path: root/rts/sm/GCTDecl.h
Commit message (Collapse)AuthorAgeFilesLines
* - fix gc_thread related compilation failure on Solaris/i386 platformKarel Gardas2015-12-231-1/+2
| | | | | | | | | | | | | Summary: This patch fixes gc_thread related compilation failure on Solaris/i386 platform. It uses Linux way of __thread declared gc_thread variable for register starving i386 from now. Reviewers: bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1688
* Revert "rts: add Emacs 'Local Variables' to every .c file"Simon Marlow2014-09-291-8/+0
| | | | This reverts commit 39b5c1cbd8950755de400933cecca7b8deb4ffcd.
* rts: add Emacs 'Local Variables' to every .c fileAustin Seipp2014-07-281-0/+8
| | | | | | | | This will hopefully help ensure some basic consistency in the forward by overriding buffer variables. In particular, it sets the wrap length, the offset to 4, and turns off tabs. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Remove ios_HOST check for GCTDecl.hAustin Seipp2014-02-061-1/+1
| | | | | | | Following 298a25bdf and #8722 as Peter mentioned, this probably isn't needed anymore. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix iOS build (fallout from 28b031c506)Austin Seipp2014-01-301-2/+5
| | | | | | | | As Luke Iannini reported, the Clang iOS cross compiler apparently doesn't support __thread for some bizarre reason, so unfortunately they too must fall back to pthread_{get,set}specific. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Refactor GCTDecl.h, and mitigate #7602 a bitAustin Seipp2014-01-281-59/+93
| | | | | | | | | | | | | | | | | | | | | | | | | This basically cleans a lot of GCTDecl up - I found it quite hard to read and a bit confusing. The changes are mostly cosmetic: better delineation between the alternative cases and light touchups, and tries to make every branch as consistent as possible. However, this patch does have one significant effect: it will ensure that any LLVM-based compilers will use __thread if they support it. Before, they would simply always use pthread_getspecific and pthread_setspecific, which are almost surely even *more* inefficient. The details are a bit too long and boring to go into here; see #7602. After talking with Simon, we decided to play it safe - __thread can at least be optimized by future clang releases even further on OS X if they choose, and it's safer until we can investigate the pthread implementation further on Mavericks. For Linux, the story isn't so bleak if you use Clang (for whatever reason) - Linux directly writes to `%fs` for __thread slots (while OS X will perform a load followed by an indirect call.) So it should still be fairly competitive, speed-wise. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-1/+1
|
* Hopefully fix breakage on OS X w/ LLVMSimon Marlow2013-01-171-1/+1
| | | | | | | Reordering of includes in GC.c broke on OS X because gctKey is declared in Task.h and is needed in the storage manager. This is really the wrong place for it anyway, so I've moved the gctKey pieces to where they should be.
* Enable pthread_getspecific() tls for LLVM compilerDavid M Peixotto2011-10-071-2/+13
| | | | | | | | | | | | | LLVM does not support the __thread attribute for thread local storage and may generate incorrect code for global register variables. We want to allow building the runtime with LLVM-based compilers such as llvm-gcc and clang, particularly for MacOS. This patch changes the gct variable used by the garbage collector to use pthread_getspecific() for thread local storage when an llvm based compiler is used to build the runtime.
* Refactoring and tidy upSimon Marlow2011-04-111-0/+98
This is a port of some of the changes from my private local-GC branch (which is still in darcs, I haven't converted it to git yet). There are a couple of small functional differences in the GC stats: first, per-thread GC timings should now be more accurate, and secondly we now report average and maximum pause times. e.g. from minimax +RTS -N8 -s: Tot time (elapsed) Avg pause Max pause Gen 0 2755 colls, 2754 par 13.16s 0.93s 0.0003s 0.0150s Gen 1 769 colls, 769 par 3.71s 0.26s 0.0003s 0.0059s