| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Today's hardware is much faster, so it makes sense to report timings
with more precision, and possibly help reduce rounding-induced
fluctuations in the nofib statistics.
This commit increases the precision of all timings previously reported
with a granularity of 10ms to 1ms. For instance, the `+RTS -S` output is
now rendered as:
Alloc Copied Live GC GC TOT TOT Page Flts
bytes bytes bytes user elap user elap
641936 59944 158120 0.000 0.000 0.013 0.001 0 0 (Gen: 0)
517672 60840 158464 0.000 0.000 0.013 0.002 0 0 (Gen: 0)
517256 58800 156424 0.005 0.005 0.019 0.007 0 0 (Gen: 1)
670208 9520 158728 0.000 0.000 0.019 0.008 0 0 (Gen: 0)
...
Tot time (elapsed) Avg pause Max pause
Gen 0 24 colls, 0 par 0.002s 0.002s 0.0001s 0.0002s
Gen 1 3 colls, 0 par 0.011s 0.011s 0.0038s 0.0055s
TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)
SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)
INIT time 0.001s ( 0.001s elapsed)
MUT time 0.005s ( 0.006s elapsed)
GC time 0.014s ( 0.014s elapsed)
EXIT time 0.001s ( 0.001s elapsed)
Total time 0.032s ( 0.020s elapsed)
Note that this change also requires associated changes in the nofib
submodule.
Test Plan: tested with modified nofib
Reviewers: simonmar, nomeata, austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D97
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: (for the same reason that we acquire all the other mutexes)
Test Plan: validate
Reviewers: simonmar, austin, duncan
Reviewed By: simonmar, austin, duncan
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D60
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Documented in more detail inline with the change.
Test Plan: validate
Reviewers: austin, simonmar, duncan
Reviewed By: austin, simonmar, duncan
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D59
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Avoid unnecessary clock_gettime() syscalls in GC stats.
Test Plan: Use strace.
Reviewers: simonmar, austin
Reviewed By: simonmar, austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D39
|
|
|
|
|
|
|
| |
The TL;DR is that by adding this, we can distinguish GHC 7.8.3 from
7.8.2, which had a buggy implementation. See the ticket for details.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
| |
* fix links to the User's Guide in ghc and ghci --help messages
* fix default stack size info in RTS help message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: A redundant condition checking is removed, as discussed in http://www.haskell.org/pipermail/ghc-devs/2014-June/005088.html
Test Plan: validate
Reviewers: simonmar, austin
Reviewed By: austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D37
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Check for integer overflow in allocate() (#9172)
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D36
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the second attempt to add this functionality. The first
attempt was reverted in 950fcae46a82569e7cd1fba1637a23b419e00ecd, due
to register allocator failure on x86. Given how the register
allocator currently works, we don't have enough registers on x86 to
support cmpxchg using complicated addressing modes. Instead we fall
back to a simpler addressing mode on x86.
Adds the following primops:
* atomicReadIntArray#
* atomicWriteIntArray#
* fetchSubIntArray#
* fetchOrIntArray#
* fetchXorIntArray#
* fetchAndIntArray#
Makes these pre-existing out-of-line primops inline:
* fetchAddIntArray#
* casIntArray#
|
|
|
|
|
|
| |
This reverts commit 2f8b4c9330b455d4cb31c186c747a7db12a69251.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
| |
This commit caused the register allocator to fail on i386.
This reverts commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and
04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 (the second being a fix to
the first).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add more primops for atomic ops on byte arrays
Adds the following primops:
* atomicReadIntArray#
* atomicWriteIntArray#
* fetchSubIntArray#
* fetchOrIntArray#
* fetchXorIntArray#
* fetchAndIntArray#
Makes these pre-existing out-of-line primops inline:
* fetchAddIntArray#
* casIntArray#
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the patch any call to 'select()' with 'bad_fd' led to:
- unblocking of all threads
- hiding exception for 'threadWaitRead bad_fd'
The patch fixes both cases in this way:
after 'select()' failure we iterate over each blocked descriptor
and poll individually to see it's actual status, which is:
- READY (move to run queue)
- BLOCKED (leave in blocked queue)
- INVALID (send an IOErrror exception)
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
See Note [RTLD_LOCAL] for a summary of the problem and solution, and
|
|
|
|
|
|
| |
Fixes #9080
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
| |
This fixes #9078.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Submitted by: tomgr
|
|
|
|
|
|
|
|
| |
Problems were found on 32-bit platforms, I'll commit again when I have a fix.
This reverts the following commits:
54b31f744848da872c7c6366dea840748e01b5cf
b0534f78a73f972e279eed4447a5687bd6a8308e
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit b0534f78a73f972e279eed4447a5687bd6a8308e added new exported rts symbols,
but slightly misspelled them.
Observer on first compiled program:
> Linking dist/build/haskell-updater/haskell-updater ...
> /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(Schedule.o): In function `scheduleWaitThread':
> (.text+0xc4c): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
> /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(RtsStartup.o): In function `hs_init_ghc':
> (.text+0x2fa): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
> collect2: error: ld returned 1 exit status
CC: Simon Marlow <marlowsd@gmail.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tracks the amount of memory allocation by each thread in a
counter stored in the TSO. Optionally, when the counter drops below
zero (it counts down), the thread can be sent an asynchronous
exception: AllocationLimitExceeded. When this happens, given a small
additional limit so that it can handle the exception. See
documentation in GHC.Conc for more details.
Allocation limits are similar to timeouts, but
- timeouts use real time, not CPU time. Allocation limits do not
count anything while the thread is blocked or in foreign code.
- timeouts don't re-trigger if the thread catches the exception,
allocation limits do.
- timeouts can catch non-allocating loops, if you use
-fno-omit-yields. This doesn't work for allocation limits.
I couldn't measure any impact on benchmarks with these changes, even
for nofib/smp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function was inlined at two places already. And the function is
having the STATIC_INLINE annotation, so the assembly output should.
be the same.
To convince myself, I did diff the output of the object files before
and after the patch and they matched on my 64-bit Ubuntu 13.10 machine,
running gcc 4.8.1-10ubuntu9.
Also, I had to move scavenge_small_bitmap up a bit since it's not in any
.h-file.
While I was at it, I also applied the analogous patch for Compact.c.
Though I had to write `thread_small_bitmap` instead of just moving it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long debate is in issue #8742, but the main motivation is that this
allows for applying a patch to reuse the function scavenge_small_bitmap
without changing the .o-file output.
Similarly, I changed the types in rts/sm/Compact.c, so I can create
a STATIC_INLINE function for the redundant code block:
while (size > 0) {
if ((bitmap & 1) == 0) {
thread((StgClosure **)p);
}
p++;
bitmap = bitmap >> 1;
size--;
}
|
|
|
|
|
|
| |
Issue discovered by Coverity Scan, CID 43168.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
Issue discovered by Coverity Scan, CID 43171.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
This reverts commit 4539400a72ded7fa69149b28cfa9c84464f4739d.
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
The new stg_gc_prim_p_ll stack frame was missing an info table. This
is a regression since 7.6, because this stuff was part of a cleanup
that happened in 7.7.
|
|
|
|
|
|
|
| |
Issue discovered by Coverity scan, CID 43163. This should fix CID 43172 as a
side-effect as well.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
Issue discovered by Coverity scan, CID 43142.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
CID 43178
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
| |
n_capabilities is declared as unsigned int (32bit), and so multiplication
is 32-bit before being stored in a 64bit integer (StgWord).
Instead, cast n_capabilities to StgWord before multiplying.
Discovered by Coverity. CID 43164.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
Discovered by Coverity. CID 43166.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
I don't want to fall back to gettimeofday(), because that might have a
different absolute value.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a patch from FB's internal build of GHC that I'm pushing
upstream.
Author: Andrew Gallagher <agallagher@fb.com>
This diff adds simple thin archive support to ghc's linker code, which
basically just entails finding the member data from disk rather than
from inside the archive (except for the case of the symbol index and
gnu filename index, where the member data is still inline).
|
| |
|
|
|
|
|
| |
Harmonize the indentation amount. The file mixed 4, 2, and in some
cases 3 spaces for indentation.
|
|
|
|
| |
The copy array family of primops were moved out-of-line.
|