| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8626d76a72 added checking of the return value when reading from
the `timer_fd` and calling `sysErrorBelch` to print a warning message.
However some error causes (like EINTR) are benign and should just be
ignored.
Test Plan: validate
Reviewers: hvr, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2040
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch cleans up various POSIX and XOPEN defines.
We aim to switch to C99 solely and for this the lowest version
of supported POSIX/XOPEN is:
_XOPEN_SOURCE 600
_POSIX_C_SOURCE 200112L
Test Plan:
tested on Solaris 11 and OpenBSD 5.9. Should be good
also on Solaris 10, FreeBSD and DragonFlyBSD. We need to test
on Mac OS X, Linux and MinGW
Reviewers: austin, bgamari, erikd, hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2056
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Solaris is quite picky about C and POSIX version combination.
For recent change to C99 we need to switch _XPG6 on which means
_XOPEN_SOURCE should be defined to 600
Reviewers: austin, bgamari, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2053
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DEC OSF/1 (aka Tru64 UNIX) has been discontinued a few years ago already[1].
This removes the undoubtedly bitrotten support for `OSOsf3 :: OS` from GHC's
code-base.
Support for `ArchAlpha :: Arch` may be removed at some later point, as there
may still be users out there running a more or less recent Linux/alpha
distribution on their more-than-a-decade old Alpha hardware...
[1]: https://en.wikipedia.org/wiki/Tru64_UNIX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Long time ago, IRIX was way ahead of its time in the last century with
its SMP capabilities of scaling up to 1024 processors and other features
such as XFS or OpenGL that originated in IRIX and live on to this day in
other operating systems.
However, IRIX's last software update was in 2006 and support ended
around 2013 according to [1], so it's considered an extinct platform by
now. So this commit message is effectively an obituary for GHC's IRIX
support.
R.I.P. IRIX
[1]: https://en.wikipedia.org/wiki/IRIX
|
|
|
|
|
|
|
|
|
| |
At some point there may have been a reason for the
`INLINE_ME` macro, but not anymore...
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D2041
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extends the previous work to revive the unregisterised GHC build
for AIX/ppc32. Strictly speaking, AIX runs on POWER4 (and later)
hardware, but the PPC32 instructions implemented in the PPC NCG
represent a compatible subset of the POWER4 ISA.
IBM AIX follows the PowerOpen ABI (and shares many similiarites with the
Linux PPC64 ELF V1 NCG backend) but uses the rather limited XCOFF
format (compared to ELF).
This doesn't support dynamic libraries yet.
A major limiting factor is that the AIX assembler does not support the
`@ha`/`@l` relocation types nor the ha16()/lo16() functions Darwin's
assembler supports. Therefore we need to avoid emitting those. In case
of numeric literals we simply compute the functions ourselves, while for
labels we have to use local TOCs and hope everything fits into a 16bit
offset (for ppc32 this gives us at most 16384 entries per TOC section,
which is enough to compile GHC).
Another issue is that XCOFF doesn't seem to have a relocation type for
label-differences, and therefore the label-differences placed into
tables-next-to-code can't be relocated, but the linker may rearrange
different sections, so we need to place all read-only sections into the
same `.text[PR]` section to workaround this.
Finally, the PowerOpen ABI distinguishes between function-descriptors
and actualy entry-point addresses. For AIX we need to be specific when
emitting assembler code whether we want the address of the function
descriptor `printf`) or for the entry-point (`.printf`). So we let the
asm pretty-printer prefix a dot to all emitted subroutine
calls (i.e. `BL`) on AIX only. For now, STG routines' entry-point labels
are not prefixed by a label and don't have any associated
function-descriptor.
Reviewers: austin, trommler, erikd, bgamari
Reviewed By: trommler, erikd, bgamari
Differential Revision: https://phabricator.haskell.org/D2019
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately (for inline `__asm__()` uses), IBM's `as` doesn't seem to support
local labels[1] like GNU `as` does so we need to workaround this when on AIX.
[1]: https://sourceware.org/binutils/docs/as/Symbol-Names.html#Symbol-Names
Turns out this also addresses the long-standing bug #485
Reviewed By: bgamari, trommler
Differential Revision: https://phabricator.haskell.org/D2029
|
|
|
|
|
| |
This reverts commit 6c2c853b11fe25c106469da7b105e2be596c17de which was
supposed to be merged as individual commits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this Diff contains small, self-contained changes as I work towards
fixing #10613. It is mostly created to let harbormaster do its job, but
feedback is welcome as well.
Please do not merge this via arc; I’d like to push the individual
patches as layed out here. I might push mostly trivial ones even without
review, as long as the build passes.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2014
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: T9405
Reviewers: simonmar, austin, bgamari
Reviewed By: simonmar, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2008
GHC Trac Issues: #9405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is valid behaviour for `malloc()` according to ISO C99 and POSIX,
and there's at least one operating system (AIX) which actually does return
NULL for 0-sized allocations.
The `createAdjustor()` routine is currently the only known use-site of
`stgMallocBytes` which may call `stgMallocBytes()` requesting a 0-size
allocation.
Reviewed By: bgamari, austin
Differential Revision: https://phabricator.haskell.org/D2022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The heap census now handles large ARR_WORDS objects which have
been shrunk by shrinkMutableByteArray# or resizeMutableByteArray#.
Test Plan: ./validate && make test WAY=profasm
Reviewers: hvr, bgamari, austin, thomie
Reviewed By: thomie
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2005
GHC Trac Issues: #11627
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stg_stack_underflow_frame had an incorrect
call of C function 'threadStackUnderflow':
("ptr" ret_off) =
foreign "C" threadStackUnderflow(
MyCapability(),
CurrentTSO);
Which means it's prototype is:
void * (*) (W_, void*);
While real prototype is:
W_ (*) (Capability *cap, StgTSO *tso);
The fix is simple. Fix type annotations:
(ret_off) =
foreign "C" threadStackUnderflow(
MyCapability() "ptr",
CurrentTSO "ptr");
Noticed when debugged T9045 test failure
on m68k target which distincts between
pointer and non pointer return types
(uses different registers)
While at it noticed and fixed return types
for 'throwTo' and 'findSpark'.
Trac #11395
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Ubuntu libc's `read` function is marked with attribute
`warn_unused_result` which was causing build failures on
Harbourmaster.
Test Plan: validate on Harbourmaster
Reviewers: austin, hvr, bgamari
Reviewed By: hvr, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1993
GHC Trac Issues: #11697
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch brings in two improvements:
a) m32_allocator will now reuse the pages that are no longer
used by anyone else.
b) m32_allocator will preallocate the "filling" area,
so that the pages it allocates end up as a big chunk
instead of being allocated on demand in random places,
fragmenting the precious lower 2G address space.
Test Plan: testsuite - 3 tests failing with substTy asserts
Reviewers: ezyang, austin, bgamari, erikd, hsyl20, simonmar
Reviewed By: hsyl20, simonmar
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D1976
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: erikd, simonmar, austin, bgamari
Reviewed By: simonmar, bgamari
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D1947
GHC Trac Issues: #10840
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 5d52d9b64c21dcf77849866584744722f8121389 removed
global 'blackhole_queue' in favour of new mechanism:
when TSO hits blackhole TSO blocks waiting for
'MessgaeBlackhole' delivery.
Patch removed unused global and updates stale comments.
Noticed by Yuras Shumovich.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Test Plan: build test
Reviewers: simonmar, austin, Yuras, bgamari
Reviewed By: Yuras, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1953
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following tests fail on powerpc64 and have a ticket.
Mark those tests as expect_broken.
Here are the details:
The PowerPC native code generator does not support DWARF debug
information. This is tracked in ticket #11261. Mark the respective
tests broken on powerpc64.
testsuite: mark print022 broken on powerpc64
Ticket #11262 tracks difference in stdout for print022.
testsuite: mark recomp015 broken on powerpc64
testsuite: mark recomp011 broken on powerpc64
This is tracked as ticket #11323 and #11260.
testsuite: mark linker tests broken on powerpc64
Ticket #11259 tracks tests failing because there is no RTS
linker on powerpc64.
Test Plan: validate
Reviewers: erikd, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1928
GHC Trac Issues: #11259, #11260, #11261, #11262, #11323
|
|
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
last_free_capability: [R]: exported from:
./rts/dist/build/Capability.o
shutdownCapability: [R]: exported from:
./rts/dist/build/Capability.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not used since:
commit f361281c89fbce42865d8b8b27b0957205366186
Author: Simon Marlow <marlowsd@gmail.com>
Date: Wed Dec 7 11:32:35 2011 +0000
Do not emit the THREAD_RUNNABLE event; it has no useful semantic content
Noticed by uselex.rb:
traceEventThreadRunnable: [R]: exported from:
./rts/dist/build/Inlines.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
ccs_mutex: [R]: exported from:
./rts/dist/build/Profiling.thr_p_o
prof_arena: [R]: exported from:
./rts/dist/build/Profiling.p_o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
blockedThrowTo: [R]: exported from:
./rts/dist/build/RaiseAsync.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
While at is mark 'printRetainer' as 'static'.
Noticed by uselex.rb:
printRetainer: [R]: exported from:
./rts/dist/build/RetainerSet.p_o
traverseAllRetainerSet: [R]: exported from:
./rts/dist/build/RetainerSet.p_o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
setProgName: [R]: exported from:
./rts/dist/build/RtsFlags.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
removeFromRunQueue: [R]: exported from:
./rts/dist/build/Schedule.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was never used looking at history available in git.
While at it marked 'mut_user_time_during_RP' as 'static'.
Noticed by uselex.rb:
mut_user_time_during_heap_census: [R]: exported from:
./rts/dist/build/Stats.p_o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
wakeBlockingQueue: [R]: exported from:
./rts/dist/build/Threads.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use of this helper function was removed in:
commit 3c9fc104337a142fe4f375d30d7a6b81d55a70c1
Author: Brian Brooks <brooks.brian@gmail.com>
Date: Thu Jul 10 02:55:33 2014 -0500
Avoid unnecessary clock_gettime() syscalls in GC stats.
Noticed by uselex.rb:
getThreadCPUTime: [R]: exported from:
./rts/dist/build/posix/GetTime.p_o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
copied: [R]: exported from:
./rts/dist/build/sm/GC.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Noticed by uselex.rb:
scavenge_mutable_list: [R]: exported from:
./rts/dist/build/sm/Scav.o
scavenge_mutable_list1: [R]: exported from:
./rts/dist/build/sm/Scav.thr_o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use of these helper functions was removed by
commit 18896fa2b06844407fd1e0d3f85cd3db97a96ff4
Author: Simon Marlow <marlowsd@gmail.com>
Date: Wed Feb 2 15:49:55 2011 +0000
Noticed by uselex.rb:
calcLiveBlocks: [R]: exported from:
./rts/dist/build/sm/Storage.o
calcLiveWords: [R]: exported from:
./rts/dist/build/sm/Storage.o
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows uses wchar_t* for paths. The code committed won't compile for
Windows as the types are incorrect and the types in the branches of the
ternary operator aren't consistent.
Test Plan: ./validate --fast
Reviewers: austin, rwbarton, erikd, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1878
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Actually run validate. This fixes test linker_error3.
Reviewers: austin, erikd, bgamari
Reviewed By: erikd, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure what this is used for. But it won't correctly
detect RTS-filled slop on 64-bit platforms.
Test Plan:
Untested. But I did verify that
unsigned long x = (unsigned long)0xaaaaaaaaaaaaaaaaULL;
compiles warning-free and produces the expected output using both
gcc and clang, with -Wall -Wextra -O, and with and without -m32.
Reviewers: simonmar, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1860
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Used this to track down an issue I was having.
Reviewers: simonmar, austin, erikd, bgamari
Reviewed By: erikd, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1863
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When saving the CCCS, we now correctly track the set of live registers and pass
them to the jump_SAVE_CCCS macro. This is now a variadic macro, but variadic
macros are supported by GCC since 3.0 and by all versions of clang, so this
should not be a problem.
Test Plan:
./validate with the following build options:
```
BuildFlavour = quick-llvm
SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage
```
Reviewers: bgamari, simonmar, austin, rwbarton, simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1864
GHC Trac Issues: #11487
|
| |
|
|
|
|
|
| |
See comment in `AutoApply.h`. This partly fixes #5654. New test
added, and renamed the old test to match the ticket number.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fourth argument of distdir-way-opts was missing. So, for example,
SRC_HC_OPTS_STAGE1 was not used when building the RTS.
Test Plan: validate --slow
Reviewers: austin, bgamari, thomie
Reviewed By: thomie
Differential Revision: https://phabricator.haskell.org/D1857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jberthold astutely pointed out that the previous fix (D1822) could not
have possibly fixed the issue as the patch would only have had any
effect if !PROFILING.
Test Plan: Check for reduced CPU usage when compiled with `-prof` but
without `+RTS -p`
Reviewers: simonmar, austin, jberthold
Reviewed By: simonmar, jberthold
Subscribers: simonmar, thomie
Differential Revision: https://phabricator.haskell.org/D1844
GHC Trac Issues: #9105
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two ways to do retainer profiling. Quoting from the user's guide:
1. `+RTS -hr` "Breaks down the graph by retainer set"
2. `+RTS -hr<cc> -h<x>`, where `-h<x>` is one of normal heap profiling
break-down options (e.g. `-hc`), and `-hr<cc> means "Restrict the
profile to closures with retainer sets containing cost-centre
stacks with one of the specified cost centres at the top."
Retainer profiling writes to a .hp file, like the other heap profiling
options, but also to a .prof file. Therefore, when the .prof file is not
writeable for whatever reason, retainer profiling should be turned off
completely.
This worked ok when running the program with `+RTS -hr` (option 1), but a
segfault would occur when using `+RTS -hr<cc> -h<x>`, with `x!=r` (option 2).
This commit fixes that.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1849
GHC Trac Issues: #11489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
* without -rtsopts: Most RTS options are disabled. Link with -rtsopts to enable them.
* with -rtsopts: invalid heap profile option: -hc
After:
* the flag -hc requires the program to be built with -prof
Copy `Note [OPTION_SAFE vs OPTION_UNSAFE]` from commit 8c7ad0bd.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1845
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is already the behavior on Elf_Rela platforms, and is helpful.
Reviewers: simonmar, austin, bgamari, erikd
Reviewed By: erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1841
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it seems that this closure type has not been in use since 5d52d9, so all
this is dead and untested code. This removes it. Some of the code might
be useful for a counting indirection as described in #10613, so when
implementing that, have a look at what this commit removes.
Test Plan: validate on harbormaster
Reviewers: austin, bgamari, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #9105 notes significant CPU usage by an otherwise idle process when
compiled with profiling. The reason for this is that we keep the tick
timer active in the profiling RTS even if profiling wasn't requested at
runtime.
If the user requests any sort of profiling then we need to keep the
timer active to ensure that samples are collected.
Test Plan: Validate, check CPU usage, ensure profiling still works
Reviewers: simonmar, austin
Reviewed By: simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1822
GHC Trac Issues: #9105
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A small cosmetic change, but we have to do a bit of work to
actually support it:
- Cabal submodule update, so that Cabal passes us
-this-unit-id when we ask for it. This includes
a Cabal renaming to be consistent with Unit ID, which
makes ghc-pkg a bit more scrutable.
- Build system is updated to use -this-unit-id rather than
-this-package-key, to avoid deprecation warnings. Needs
a version test so I resurrected the old test we had
(sorry rwbarton!)
- I've *undeprecated* -package-name, so that we are in the same
state as GHC 7.10, since the "correct" flag will have only
entered circulation in GHC 8.0.
- I removed -package-key. Since we didn't deprecate -package-id
I think this should not cause any problems for users; they
can just change their code to use -package-id.
- The package database is indexed by UNIT IDs, not component IDs.
I updated the naming here.
- I dropped the signatures field from ExposedModule; nothing
was using it, and instantiatedWith from the package database
field.
- ghc-pkg was updated to use unit ID nomenclature, I removed
the -package-key flags but I decided not to add any new flags
for now.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: 23Skidoo, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1780
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1787
GHC Trac Issues: #11300
|