summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix return type of FUN_INFO_PTR_TO_STRUCT.Erik de Castro Lopo2012-08-281-1/+1
| | | | Return type was correct when TABLES_NEXT_TO_CODE was defined.
* More CPP macros -> inline functionsIan Lynagh2012-08-251-11/+15
| | | | | | | | All the wibble seem to have cancelled out, and (non-debug) object sizes are back to where they started. I'm not 100% sure that the types are optimal, but at least now the functions have types and we can fix them if necessary.
* More CPP macros -> inline functionsIan Lynagh2012-08-251-17/+15
|
* More CPP macro -> inline functionIan Lynagh2012-08-251-2/+4
|
* Convert a couple more macros to inline functionsIan Lynagh2012-08-251-2/+7
| | | | | | | | | | This caused a couple of .o files to change size. I had a look at one, and it seems to be caused by the difference in size of these two instructions: 49 8b 5d 08 mov 0x8(%r13),%rbx 49 8b 5c 24 08 mov 0x8(%r12),%rbx (with a few nops being added or removed later in the file, presumably for alignment reasons).
* Make a function for get_itbl, rather than using a CPP macroIan Lynagh2012-08-251-6/+7
| | | | | | | | | | | | This has several advantages: * It can be called from gdb * There is more type information for the user, and type checking for the compiler * Less opportunity for things to go wrong, e.g. due to missing parentheses or repeated execution The sizes of the non-debug .o files hasn't changed (other than Inlines.o), so I'm pretty sure the compiled code is identical.
* Add haveRegBase to CodeGen.PlatformIan Lynagh2012-08-211-0/+7
|
* Move activeStgRegs into CodeGen.PlatformIan Lynagh2012-08-211-0/+64
|
* Fix the generation of CallerSaves; fixes #7163Ian Lynagh2012-08-211-27/+27
| | | | | | | | | Simon Marlow spotted that we were #include'ing MachRegs.h several times, but that doesn't work as (a) it uses ifdeffery to avoid being included multiple times, and (b) even if we work around that, then the #define's from previous inclusions are still defined when we #include it again. So we now put the platform code for each platform in a separate .hs file.
* move startProfTimer() and stopProfTimer() to the public headersSimon Marlow2012-08-211-0/+9
|
* Define callerSaves for all platformsIan Lynagh2012-08-071-0/+81
| | | | | | | | This means that we now generate the same code whatever platform we are on, which should help avoid changes on one platform breaking the build on another. It's also another step towards full cross-compilation.
* Start separating out the RTS and Haskell imports of MachRegs.hIan Lynagh2012-08-066-44/+121
| | | | No functional differences yet
* Don't define STOLEN_X86_REGS in Cmm.hIan Lynagh2012-08-061-1/+0
| | | | | | We weren't defining it in the other places that MachRegs.h gets imported, which seems a little suspicious. And if it's not defined then it defaults to 4 anyway, so this define doesn't seem necessary.
* Fix #7087 (integer overflow in getDelayTarget())Simon Marlow2012-07-311-0/+2
|
* GHCConstants.h should not contain preprocessor definitionsGabor Greif2012-07-291-0/+25
|
* typoGabor Greif2012-07-291-1/+1
|
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-07-195-9/+441
|\
| * First batch of file additions for cross-compiler:Gabor Greif2012-07-182-0/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new file: ghc/ghc-cross.wrapper new file: includes/mkDerivedConstants.cross.awk new file: includes/mkSizeMacros.cross.awk new file: rules/cross-compiling.mk These are expected to sit quietly in the tree until the rest of the machinery matures on an (upcoming) branch. Reviews will begin to make sense as soon as that has happened. Anyway, comments are welcome. See <http://www.haskell.org/pipermail/cvs-ghc/2012-July/074456.html> for background. Disclaimer: these source files are not (yet) up to the quality standards set by the rest of the tree. Cleanups, move-arounds and rewrites (i.e. .awk -> .hs), as well as additional comments and documentation will happen as soon as the basic functionality of a cross-compiler is working reliably.
| * comment-only typoGabor Greif2012-07-181-2/+2
| |
| * use idiomatic typeGabor Greif2012-07-181-2/+2
| |
| * made comments C-style, so that no gcc-extension is neededGabor Greif2012-07-181-5/+5
| | | | | | | | | | | | | | | | | | | | also removed an unnecessary 'struct' tag (since the struct is not recursive); this is in line with the other struct definitions fixed a typo, updated copyright it remains to remove the tabs and align the structure members accordingly
* | Define the task-tracking eventsDuncan Coutts2012-07-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on initial patches by Mikolaj Konarski <mikolaj@well-typed.com> These new eventlog events are to let profiling tools keep track of all the OS threads that belong to an RTS capability at any moment in time. In the RTS, OS threads correspond to the Task abstraction, so that is what we track. There are events for tasks being created, migrated between capabilities and deleted. In particular the task creation event also records the kernel thread id which lets us match up the OS thread with data collected by others tools (in the initial use case with Linux's perf tool, but in principle also with DTrace).
* | New functions to get kernel thread Id + serialisable task IdDuncan Coutts2012-07-071-2/+25
|/ | | | | | | | | | | | | | | | | | | | On most platforms the userspace thread type (e.g. pthread_t) and kernel thread id are different. Normally we don't care about kernel thread Ids, but some system tools for tracing/profiling etc report kernel ids. For example Solaris and OSX's DTrace and Linux's perf tool report kernel thread ids. To be able to match these up with RTS's OSThread we need a way to get at the kernel thread, so we add a new function for to do just that (the implementation is system-dependent). Additionally, strictly speaking the OSThreadId type, used as task ids, is not a serialisable representation. On unix OSThreadId is a typedef for pthread_t, but pthread_t is not guaranteed to be a numeric type. Indeed on some systems pthread_t is a pointer and in principle it could be a structure type. So we add another new function to get a serialisable representation of an OSThreadId. This is only for use in log files. We use the function to serialise an id of a task, with the extra feature that it works in non-threaded builds by always returning 1.
* Define W_TO_LONG in Cmm.hIan Lynagh2012-06-201-0/+6
|
* Add getGCStatsEnabled function.Paolo Capriotti2012-06-191-0/+1
|
* Fix build on Win64Ian Lynagh2012-05-091-0/+4
|
* Enable FileLock for win32 (#4363)Paolo Capriotti2012-05-081-4/+2
|
* Fix RTS DLL references on Win64Ian Lynagh2012-05-061-4/+17
|
* Working towards fixing DLLs on Win64Ian Lynagh2012-05-062-3/+3
|
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-04-271-0/+1
|\
| * Add a new primop mkWeakNoFinalizer (#5879)Simon Marlow2012-04-271-0/+1
| |
* | Fix build on OS XIan Lynagh2012-04-271-8/+14
| |
* | Fix build on Win32, and handle the FMT_* #defines in a slightly nicer wayIan Lynagh2012-04-272-20/+16
| |
* | Simplify format specifiersIan Lynagh2012-04-271-27/+4
| | | | | | | | | | It turns out that we can use %zu and %llu on Win32, provided we include PosixSource everywhere we want to use them.
* | OS X build fixesIan Lynagh2012-04-261-3/+12
| | | | | | | | | | OS X doesn't understand 'gnu_printf', so we need to onyl use it conditionally.
* | Fix build on OSX: Use the 'z' format specifier modifier when possibleIan Lynagh2012-04-261-15/+9
| | | | | | | | | | On Win32 it's not recognised, so we unfortunately can't use it unconditionally.
* | Build fixesIan Lynagh2012-04-261-0/+2
| |
* | Fix warnings on Win64Ian Lynagh2012-04-264-9/+18
| | | | | | | | | | | | Mostly this meant getting pointer<->int conversions to use the right sizes. lnat is now size_t, rather than unsigned long, as that seems a better match for how it's used.
* | Win64 warning fixIan Lynagh2012-04-241-0/+1
| |
* | A couple of build fixes for Win64Ian Lynagh2012-04-241-1/+1
| |
* | Use gnu_printf rather than just printf in function format attributesIan Lynagh2012-04-241-3/+3
|/ | | | | On Windows, gcc thinks that printf means ms_printf, which is not the case when we #define _POSIX_SOURCE 1.
* Improve the handling of threadDelay in the non-threaded RTSSimon Marlow2012-04-111-1/+1
| | | | | | | Firstly, we were rounding up too much, such that the smallest delay was 20ms. Secondly, there is no need to use millisecond resolution on a 64-bit machine where we have room in the TSO to use the normal nanosecond resolution that we use elsewhere in the RTS.
* Add the GC_GLOBAL_SYNC event marking that all caps are stopped for GCMikolaj2012-04-041-2/+3
| | | | | | | | | Quoting design rationale by dcoutts: The event indicates that we're doing a stop-the-world GC and all other HECs should be between their GC_START and GC_END events at that moment. We don't want to use GC_STATS_GHC for that, because GC_STATS_GHC is for extra GHC-specific info, not something we have to rely on to be able to match the GC pauses across HECs to a particular global GC.
* Adjust the eventlog description header for the spark counter eventDuncan Coutts2012-04-041-1/+1
| | | | | | | The EventLogFormat.h described the spark counter fields in a different order to that which ghc emits (the GC'd and fizzled fields were reversed). At this stage it is easier to fix the ghc-events lib and to have ghc continue to emit them in the current order.
* Add new eventlog events for various heap and GC statisticsDuncan Coutts2012-04-041-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They cover much the same info as is available via the GHC.Stats module or via the '+RTS -s' textual output, but via the eventlog and with a better sampling frequency. We have three new generic heap info events and two very GHC-specific ones. (The hope is the general ones are usable by other implementations that use the same eventlog system, or indeed not so sensitive to changes in GHC itself.) The general ones are: * total heap mem allocated since prog start, on a per-HEC basis * current size of the heap (MBlocks reserved from OS for the heap) * current size of live data in the heap Currently these are all emitted by GHC at GC time (live data only at major GC). The GHC specific ones are: * an event giving various static heap paramaters: * number of generations (usually 2) * max size if any * nursary size * MBlock and block sizes * a event emitted on each GC containing: * GC generation (usually just 0,1) * total bytes copied * bytes lost to heap slop and fragmentation * the number of threads in the parallel GC (1 for serial) * the maximum number of bytes copied by any par GC thread * the total number of bytes copied by all par GC threads (these last three can be used to calculate an estimate of the work balance in parallel GCs)
* Change the presentation of parallel GC work balance in +RTS -sDuncan Coutts2012-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | Also rename internal variables to make the names match what they hold. The parallel GC work balance is calculated using the total amount of memory copied by all GC threads, and the maximum copied by any individual thread. You have serial GC when the max is the same as copied, and perfectly balanced GC when total/max == n_caps. Previously we presented this as the ratio total/max and told users that the serial value was 1 and the ideal value N, for N caps, e.g. Parallel GC work balance: 1.05 (4045071 / 3846774, ideal 2) The downside of this is that the user always has to keep in mind the number of cores being used. Our new presentation uses a normalised scale 0--1 as a percentage. The 0% means completely serial and 100% is perfect balance, e.g. Parallel GC work balance: 4.56% (serial 0%, perfect 100%)
* Add eventlog/trace stuff for capabilities: create/delete/enable/disableDuncan Coutts2012-04-041-4/+10
| | | | | | | | | | | | | | | | | | | | | | | Now that we can adjust the number of capabilities on the fly, we need this reflected in the eventlog. Previously the eventlog had a single startup event that declared a static number of capabilities. Obviously that's no good anymore. For compatability we're keeping the EVENT_STARTUP but adding new EVENT_CAP_CREATE/DELETE. The EVENT_CAP_DELETE is actually just the old EVENT_SHUTDOWN but renamed and extended (using the existing mechanism to extend eventlog events in a compatible way). So we now emit both EVENT_STARTUP and EVENT_CAP_CREATE. One day we will drop EVENT_STARTUP. Since reducing the number of capabilities at runtime does not really delete them, it just disables them, then we also have new events for disable/enable. The old EVENT_SHUTDOWN was in the scheduler class of events. The new EVENT_CAP_* events are in the unconditional class, along with the EVENT_CAPSET_* ones. Knowing when capabilities are created and deleted is crucial to making sense of eventlogs, you always want those events. In any case, they're extremely low volume.
* Merge branch 'master' of win:c:/m64/reg4/.Ian Lynagh2012-03-232-4/+8
|\
| * Fix ASSIGN_DBL on Win64Ian Lynagh2012-03-231-4/+4
| | | | | | | | | | We were comparing ALIGNMENT_DOUBLE to ALIGNMENT_LONG, but really we cared about W_ values, and sizeof(long) /= sizeof(void *) on Win64
| * Fix caller/callee register saving on Win64Ian Lynagh2012-03-231-0/+4
| |