| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
- The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
- The Persistent Linker State in the dynamic linker is extended in a similar way.
Finally, these two sources of information are consulted by:
> Linker.recoverDataCon :: a -> TcM Name
|
|
|
|
|
|
|
|
| |
- infoPtr# :: a -> Addr#
- closurePayload# :: a -> (# Array b, ByteArr# #)
These prim ops provide the magic behind the ':print' command
|
| |
|
|
|
|
|
|
|
|
| |
The main goal here is to reduce fragmentation, which turns out to be
the case of #743. While I was here I found some opportunities to
improve performance too. The code is rather more complex, but it also
contains a long comment describing the strategy, so please take a look
at that for the details.
|
|
|
|
|
|
|
| |
- Added HPCRIX support for passing tracer filename.
- Added thread tracing support.
- Cleaned up use of HsFFI.h
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #637.
The implications of this change are:
- threadDelay on Windows no longer creates a new OS thread each time,
instead it communicates with the IO manager thread in the same way as
on Unix.
- deadlock detection now works the same way on Windows as on Unix; that
is the timer interrupt wakes up the IO manager thread, which causes
the scheduler to check for deadlock.
- Console events now get sent to the IO manager thread, in the same way as
signals do on Unix. This means that console events should behave more
reliably with -threaded on Windows.
All this applies only with -threaded. Without -threaded, the old
ConsoleEvent code is still used.
After some testing, this could be pushed to the 6.6 branch.
|
| |
|
|
|
|
|
| |
I'm not sure where the latter version came from, but it apparently
doesn't generate a legal instruction on Solaris.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
architectures
|
| |
|
|
|
|
| |
Fixes stage 2 build with -fvia-C
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This large checkin is the new ghc version of Haskell
Program Coverage, an expression-level coverage tool for Haskell.
Parts:
- Hpc.[ch] - small runtime support for Hpc; reading/writing *.tix files.
- Coverage.lhs - Annotates the HsSyn with coverage tickboxes.
- New Note's in Core,
- TickBox -- ticked on entry to sub-expression
- BinaryTickBox -- ticked on exit to sub-expression, depending
-- on the boolean result.
- New Stg level TickBox (no BinaryTickBoxes, though)
You can run the coverage tool with -fhpc at compile time.
Main must be compiled with -fhpc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for parallel GC, split up the monolithic GC.c file into
smaller parts. Also in this patch (and difficult to separate,
unfortunatley):
- Don't include Stable.h in Rts.h, instead just include it where
necessary.
- consistently use STATIC_INLINE in source files, and INLINE_HEADER
in header files. STATIC_INLINE is now turned off when DEBUG is on,
to make debugging easier.
- The GC no longer takes the get_roots function as an argument.
We weren't making use of this generalisation.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
I don't think this can ever be useful, because to add more roots you
need to do it consistently for every GC. The right way to add roots
is to use newStablePtr.
|
|
|
|
|
|
|
|
| |
A GHC binary can generally build either registerised or unregisterised
code, unless it is unregisterised only.
The previous changes broke this, but I think I've now restored it.
|
|
|
|
|
|
|
|
| |
We were constructing info tables designed for TABLES_NEXT_TO_CODE,
but were building without TABLES_NEXT_TO_CODE.
This patch also fixes a bug when we are unregisterised on amd64 and
have code with an address above 2^32.
|
| |
|
|
|
|
|
| |
We were assuming we could multiply 2 32-bit numbers without overflowing
a 64-bit number, but we can't as the top bit is the sign bit.
|
| |
|
|
|
|
|
|
|
|
| |
These closure types aren't used/needed, as far as I can tell. The
commoning up of Chars/Ints happens by comparing info pointers, and
the info table for a dynamic C#/I# is CONSTR_0_1. The RTS seemed
a little confused about whether CONSTR_CHARLIKE/CONSTR_INTLIKE were
supposed to be static or dynamic closures, too.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
HpAlloc was not being set when returning to the scheduler via MAYBE_GC(),
which at the least was just wrong (the scheduler might allocate a large
block more than once), and at worst could lead to crashes if HpAlloc contains
garbage.
Fixes at least one threaded2 test on Windows.
|
| |
|
| |
|
|
|
|
| |
Contributed by: Thiemo Seufer <ths@networkno.de>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From David's email:
The problem is that the inline assembler code was placing the result
of an operation in a register that is used as input later in the code.
At the bottom of this message I've extracted a short short code
fragment that you can run through gcc (on a powerpc machine) to see
the generated assembly output.
The changes to fix the problem are fairly simple. The first adds an
ampersand to the output list of the assembly fragment ("=r" (result)
--> "=&r" (result)) The ampersand just tells gcc that result can not
be placed in a register used for any of the input parameters (o, n, or
p). Otherwise, it feels free to place output parameters in the same
registers used by the inputs -- but because of the flow of control
here we need everything in a distinct register. This change fixes the
TVar program above.
The second change adds a clobber list (the :"cc", "memory"). This
tells gcc that the condition code (due to the compare) and memory (due
to the store) might be changed during the asm execution. The lack of
a clobber list did not seem to be causing any trouble, but without it
gcc is free to assume that no state is changed during the execution.
|
| |
|
|
|
|
| |
See #753
|
|
|
|
|
| |
Patch mostly from Lennart Augustsson in #803, with additions to
Task.c by me.
|
| |
|
|
|
|
| |
So that we can build the RTS with the NCG.
|
|
|
|
|
| |
so that we can calculate deterministic offsets to some of the fields
of Capability.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes throwTo work with -threaded, and also refactors large
parts of the concurrency support in the RTS to clean things up. We
have some new files:
RaiseAsync.{c,h} asynchronous exception support
Threads.{c,h} general threading-related utils
Some of the contents of these new files used to be in Schedule.c,
which is smaller and cleaner as a result of the split.
Asynchronous exception support in the presence of multiple running
Haskell threads is rather tricky. In fact, to my annoyance there are
still one or two bugs to track down, but the majority of the tests run
now.
|
| |
|
| |
|