summaryrefslogtreecommitdiff
path: root/includes/RtsFlags.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup sweep and fix a bug in RTS flag processing.Simon Marlow2011-04-121-5/+0
| | | | | | | | | | | | | This code has accumulated a great deal of cruft over the years, this pass cleans up a lot of the surrounding cruft but leaves the actual argument processing alone - so there's still more that could be done. Bug fixed: - ghc_rts_opts should not be subject to the --rtsopts setting. If the programmer explicitly declares options with ghc_rts_opts, they shouldn't also have to accept command-line RTS options to make them work.
* Eliminate mkdependCIan Lynagh2009-12-091-0/+3
| | | | We now just call gcc to get the dependencies directly
* RTS tidyup sweep, first phaseSimon Marlow2009-08-021-239/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.
* Remove old GUM/GranSim codeSimon Marlow2009-06-021-169/+1
|
* Set thread affinity with +RTS -qa (only on Linux so far)Simon Marlow2009-03-181-0/+1
|
* Add fast event loggingSimon Marlow2009-03-171-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Generate binary log files from the RTS containing a log of runtime events with timestamps. The log file can be visualised in various ways, for investigating runtime behaviour and debugging performance problems. See for example the forthcoming ThreadScope viewer. New GHC option: -eventlog (link-time option) Enables event logging. +RTS -l (runtime option) Generates <prog>.eventlog with the binary event information. This replaces some of the tracing machinery we already had in the RTS: e.g. +RTS -vg for GC tracing (we should do this using the new event logging instead). Event logging has almost no runtime cost when it isn't enabled, though in the future we might add more fine-grained events and this might change; hence having a link-time option and compiling a separate version of the RTS for event logging. There's a small runtime cost for enabling event-logging, for most programs it shouldn't make much difference. (Todo: docs)
* Use work-stealing for load-balancing in the GCSimon Marlow2009-03-131-0/+1
| | | | | | | | | | | | | | | | | New flag: "+RTS -qb" disables load-balancing in the parallel GC (though this is subject to change, I think we will probably want to do something more automatic before releasing this). To get the "PARGC3" configuration described in the "Runtime support for Multicore Haskell" paper, use "+RTS -qg0 -qb -RTS". The main advantage of this is that it allows us to easily disable load-balancing altogether, which turns out to be important in parallel programs. Maintaining locality is sometimes more important that spreading the work out in parallel GC. There is a side benefit in that the parallel GC should have improved locality even when load-balancing, because each processor prefers to take work from its own queue before stealing from others.
* Add a --machine-readable RTS flagIan Lynagh2008-11-231-0/+1
| | | | Currently it only affects the -t flag output
* Use mutator threads to do GC, instead of having a separate pool of GC threadsSimon Marlow2008-11-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the GC had its own pool of threads to use as workers when doing parallel GC. There was a "leader", which was the mutator thread that initiated the GC, and the other threads were taken from the pool. This was simple and worked fine for sequential programs, where we did most of the benchmarking for the parallel GC, but falls down for parallel programs. When we have N mutator threads and N cores, at GC time we would have to stop N-1 mutator threads and start up N-1 GC threads, and hope that the OS schedules them all onto separate cores. It practice it doesn't, as you might expect. Now we use the mutator threads to do GC. This works quite nicely, particularly for parallel programs, where each mutator thread scans its own spark pool, which is probably in its cache anyway. There are some flag changes: -g<n> is removed (-g1 is still accepted for backwards compat). There's no way to have a different number of GC threads than mutator threads now. -q1 Use one OS thread for GC (turns off parallel GC) -qg<n> Use parallel GC for generations >= <n> (default: 1) Using parallel GC only for generations >=1 works well for sequential programs. Compiling an ordinary sequential program with -threaded and running it with -N2 or more should help if you do a lot of GC. I've found that adding -qg0 (do parallel GC for generation 0 too) speeds up some parallel programs, but slows down some sequential programs. Being conservative, I left the threshold at 1. ToDo: document the new options.
* Attempt to fix #2512 and #2063; add +RTS -xm<address> -RTS optionSimon Marlow2008-11-171-0/+2
| | | | | | | | | | | | | | | | | On x86_64, the RTS needs to allocate memory in the low 2Gb of the address space. On Linux we can do this with MAP_32BIT, but sometimes this doesn't work (#2512) and other OSs don't support it at all (#2063). So to work around this: - Try MAP_32BIT first, if available. - Otherwise, try allocating memory from a fixed address (by default 1Gb) - We now provide an option to configure the address to allocate from. This allows a workaround on machines where the default breaks, and also provides a way for people to test workarounds that we can incorporate in future releases.
* Experimental "mark-region" strategy for the old generationSimon Marlow2008-06-091-0/+2
| | | | Sometimes better than the default copying, enabled by +RTS -w
* Add +RTS -vg flag for requesting some GC trace messages, outside DEBUGSimon Marlow2008-04-161-0/+1
| | | | | | | DEBUG imposes a significant performance hit in the GC, yet we often want some of the debugging output, so -vg gives us the cheap trace messages without the sanity checking of DEBUG, just like -vs for the scheduler.
* improvements to PAPI supportsimonmar@microsoft.com2007-11-201-2/+7
| | | | | | | - major (multithreaded) GC is measured separately from minor GC - events to measure can now be specified on the command line, e.g prog +RTS -a+PAPI_TOT_CYC
* Refactoring of the GC in preparation for parallel GCSimon Marlow2007-10-311-0/+1
| | | | | | | | | | | | This patch localises the state of the GC into a gc_thread structure, and reorganises the inner loop of the GC to scavenge one block at a time from global work lists in each "step". The gc_thread structure has a "workspace" for each step, in which it collects evacuated objects until it has a full block to push out to the step's global list. Details of the algorithm will be on the wiki in due course. At the moment, THREADED_RTS does not compile, but the single-threaded GC works (and is 10-20% slower than before).
* +RTS -xbXXXXX sets the "heap base" to 0xXXXXXXSimon Marlow2007-06-271-0/+2
| | | | | | | | | | When debugging the GC and storage manager we often want repeated runs of the program to allocate memory at the same addresses, so that we can set watch points. Unfortunately the OS doesn't always give us memory at predictable addresses. This flag gives the OS a hint as to where we would like our memory allocated. Previously I did this by changing the HEAP_BASE setting in MBlock.h and recompiling, this patch just adds a flag so I don't have to recompile.
* Basic heap profile support without -profSimon Marlow2007-04-271-2/+1
| | | | | | | | | | | | | | Now that constructor info tables contain the name of the constructor, we can generate useful heap profiles without requiring the whole program and libraries to be compiled with -prof. So now, "+RTS -hT" generates a heap profile for any program, dividing the profile by constructor. It wouldn't be hard to add support for grouping constructors by module, or to restrict the profile to certain constructors/modules/packages. This means that for the first time we can get heap profiles for GHCi, which was previously impossible because the byte-code interpreter and linker don't work with -prof.
* Add an --install-signal-handlers=<yes|no> RTS flag; fixes trac #804Ian Lynagh2007-03-221-0/+1
|
* Using RTS debug tracing support inside Hpc.candy@galois.com2007-02-131-0/+1
|
* One more PAPI measurement, dropped precise cycle counting and replaced it ↵Alexey Rodriguez2006-12-211-0/+1
| | | | with instructions.
* Selection of PAPI events via RTS command linemrchebas@gmail.com2006-11-091-0/+15
|
* rts_ccs_lengthRavi Nanavati2006-09-291-0/+2
| | | | | | | | Add the -L RTS flag to control the length of the cost-centre stacks reported in a heap profile. Please include this change in the 6.6 branch as well as HEAD
* new RTS flag: -V to modify the resolution of the RTS timerIan Lynagh2006-09-051-1/+6
| | | | | | | | | Fixed version of an old patch by Simon Marlow. His description read: Also, now an arbitrarily short context switch interval may now be specified, as we increase the RTS ticker's resolution to match the requested context switch interval. This also applies to +RTS -i (heap profiling) and +RTS -I (the idle GC timer). +RTS -V is actually only required for increasing the resolution of the profile timer.
* Add new RTS flags for tracing:Simon Marlow2006-06-081-0/+5
| | | | | | | | | -vs Trace scheduler events (see also -Ds with -debug) -vt Time-stamp trace messages the intention is that we will pipe the -vs output into a profile-generating tool. This commit includes the flags only, functionality to follow.
* codegen debug flag (+RTS -Dc) was unused; remove itSimon Marlow2006-06-071-1/+0
|
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+357
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.