| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit b2ff5dde399cd012218578945ada1d9ff68daa35 "Fix #15038"
added new stable closure 'absentSumFieldError_closure' to
base package. This closure is used in rts package.
Unfortunately the symbol was not explicitly exported and build
failed on windows as:
```
"inplace/bin/ghc-stage1" -o ...hsc2hs.exe ...
rts/dist/build/libHSrts.a(RtsStartup.o): In function `hs_init_ghc':
rts/RtsStartup.c:272:0: error:
undefined reference to `base_ControlziExceptionziBase_absentSumFieldError_closure'
|
272 | getStablePtr((StgPtr)absentSumFieldError_closure);
| ^
```
This change adds 'absentSumFieldError_closure' to explicit export
into libHSbase.def.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
This reverts commit d4abd031f6e8c2fa01f8949f60d8a02cca513804.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This optimisation level is specifically designed to provide the benefits
of optimisation without the obfuscation that sometimes results.
Test Plan: Validate
Reviewers: simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC 8 now generates warnings for incompatible function pointer casts
[-Werror=cast-function-type]. Apparently there are a few of those in rts
code, which makes `./validate` unhappy (since we compile with `-Werror`)
This commit tries to fix these issues by changing the functions to have
the correct type (and, if necessary, moving the casts into those
functions).
For instance, hash/comparison function are declared (`Hash.h`) to take
`StgWord` but we want to use `StgWord64[2]` in `StaticPtrTable.c`.
Instead of casting the function pointers, we can cast the `StgWord`
parameter to `StgWord*`. I think this should be ok since `StgWord`
should be the same size as a pointer.
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: ./validate
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4673
|
|
|
|
|
|
| |
This reverts commit cb5c2fe875965b7aedbc189012803fc62e48fb3f.
It appears to have broken OSX and Windows builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the new note.
Test Plan:
manual testing with patched gdb
Reviewers: bgamari, simonmar, erikd
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4666
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new Id for unused pointer values in unboxed sums that is
not CAFFY. Because the Id is not CAFFY it doesn't make non-CAFFY
definitions CAFFY, fixing #15038.
To make sure anything referenced by the new id will be retained we get a
stable pointer to in on RTS startup.
Test Plan: Passes validate
Reviewers: simonmar, simonpj, hvr, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15038
Differential Revision: https://phabricator.haskell.org/D4680
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate, run program with `+RTS --numa` without libnuma
support compiled in
Reviewers: erikd, simonmar
Subscribers: thomie, carter
GHC Trac Issues: #14956
Differential Revision: https://phabricator.haskell.org/D4556
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In `manifestSp` the unwind info was before the relevant instruction, not
after. I added some notes to establish semantics. Also removes
redundant annotation in stg_catch_frame.
For `makeFixupBlocks` it looks like we were off by `wORD_SIZE dflags`.
I'm not sure why, but it lines up with `manifestSp`. In fact it lines
up so well so that I can consolidate the Sp unwind logic in
`maybeAddUnwind`. I detected the problems with `makeFixupBlocks` by
running T14779b after patching D4559.
Test Plan: added a new test
Reviewers: bgamari, scpmw, simonmar, erikd
Reviewed By: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #14999
Differential Revision: https://phabricator.haskell.org/D4606
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* osNumaNodes now returns the right number of nodes
* thread affinity is now correctly set
TODO: no noticeable performance improvement.
does windows already distribute threads in a NUMA-aware fashion?
Test Plan:
* validate
* local tests on a NUMA machine
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari, simonmar
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We were unconditionally updating the nursery pointers to be
`nurseries[cap->no]`, but when using nursery chunks this might be
wrong. This manifested as a later assertion failure in allocate().
Test Plan: new test case
Reviewers: bgamari, niteria, erikd
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4649
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we inexplicably disabled support for `-hT` profiling in the profiled
way. Admittedly, there are relatively few cases where one would prefer -hT to
`-hd`, but the option should nevertheless be available for the sake of
consistency.
Note that this does mean that there is a bit of an inconsistency in the behavior
of `-h`: in the profiled way `-h` behaves like `-hc` whereas in the non-profiled
way it defaults to `-hT`.
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: erikd, simonmar
Subscribers: thomie, carter
GHC Trac Issues: #15086
Differential Revision: https://phabricator.haskell.org/D4643
|
|
|
|
| |
This really shouldn't be necessary.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Passes validate
Reviewers: simonmar, bgamari, erikd
Subscribers: thomie, carter
GHC Trac Issues: #10296
Differential Revision: https://phabricator.haskell.org/D4627
|
| |
|
| |
|
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes build failure like this:
```
rts/Stats.c:1467:14: error:
error: format '%u' expects argument of type 'unsigned int',
but argument 4 has type 'long unsigned int' [-Werror=format=]
debugBelch("%51s%9" FMT_Word " %9" FMT_Word "\n",
^~~~~~~~
"",tot_live*sizeof(W_),tot_slop*sizeof(W_));
~~~~~~~~~~~~~~~~~~~
```
The fix is to cast sizeof() result to Word (W_).
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: build for 32-bit target
Reviewers: bgamari, erikd, simonmar
Reviewed By: simonmar
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4608
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's no-op on all platforms
Reviewers: bgamari, simonmar, erikd, dfeuer
Reviewed By: dfeuer
Subscribers: dfeuer, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4588
|
| |
|
|
|
|
| |
This reverts commit a303584e58b3f4791bc5881cb722e7f498e14554.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows the FFI library is called `libCffi-6` instead of `libCffi`.
This needs to be reflected in `rts.cabal.in` as otherwise we cannot
properly `copy` and `register` the RTS package on Windows.
See https://github.com/snowleopard/hadrian/issues/567
Test Plan: Build GHC using Hadrian. Make build system does not use
`rts.cabal.in`.
Reviewers: bgamari, erikd, simonmar, Phyx
Reviewed By: Phyx
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4590
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONSTR_NOCAF was introduced with 55d535da10d as a replacement for
CONSTR_STATIC and CONSTR_NOCAF_STATIC, however, as explained in Note
[static constructors], we copy CONSTR_NOCAFs (which can also be seen in
evacuate) during GC, and they can become dead, like other CONSTR_X_Ys.
processHeapClosureForDead is updated to reflect this.
Reviewers: bgamari, simonmar, erikd
Subscribers: thomie, carter
GHC Trac Issues: #7836
Differential Revision: https://phabricator.haskell.org/D4567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
They don't really need to be installed and will fix Hadrian installs.
Skipping review because change is trivial.
THis should be safe, but running it through CI to be sure.
Test Plan: ./validate
Reviewers: bgamari, erikd, simonmar
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4591
|
|
|
|
|
|
|
|
| |
This reverts commit 111556f9e809962a91666c99d96cf80db361ee32.
There is a mismatch between Hadrian and Make on these install-includes.
but the reachability analysis forces these headers to be exported even
through they can't vven be used.
|
|
|
|
|
| |
They don't really need to be installed and will fix Hadrian installs.
Skipping review because change is trivial.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: none
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4551
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
push() considers BLOCKING_QUEUES to be an invalid closure type which
should never be present on the stack. However, retainClosure made no
accomodation for this and ended up pushing such a closure. This lead
to #14947.
Test Plan: Validate
Reviewers: simonmar, erikd
Reviewed By: simonmar
Subscribers: thomie, carter, RyanGlScott
GHC Trac Issues: #14947
Differential Revision: https://phabricator.haskell.org/D4538
|
|
|
|
|
|
| |
PARALLEL_HASKELL was long gone, remove references
[skip ci]
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, simonmar, erikd
Reviewed By: bgamari, simonmar
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4539
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This shims out fopen and sopen so that they use modern APIs under the hood
along with namespaced paths.
This lifts the MAX_PATH restrictions from Haskell programs and makes the new
limit ~32k.
There are only some slight caveats that have been documented.
Some utilities have not been upgraded such as lndir, since all these things are
different cabal packages I have been forced to copy the source in different places
which is less than ideal. But it's the only way to keep sdist working.
Test Plan: ./validate
Reviewers: hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #10822
Differential Revision: https://phabricator.haskell.org/D4416
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4541
|
|
|
|
| |
[skip ci]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There should be no change in the output of the '+RTS -s' (summary)
report, or
the 'RTS -t' (one-line) report.
All data shown in the summary report is now shown in the machine
readable
report.
All data in RTSStats is now shown in the machine readable report.
init times are added to RTSStats and added to GHC.Stats.
Example of the new output:
```
[("bytes allocated", "375016384")
,("num_GCs", "113")
,("average_bytes_used", "148348")
,("max_bytes_used", "206552")
,("num_byte_usage_samples", "2")
,("peak_megabytes_allocated", "6")
,("init_cpu_seconds", "0.001642")
,("init_wall_seconds", "0.001027")
,("mut_cpu_seconds", "3.020166")
,("mut_wall_seconds", "0.757244")
,("GC_cpu_seconds", "0.037750")
,("GC_wall_seconds", "0.009569")
,("exit_cpu_seconds", "0.000890")
,("exit_wall_seconds", "0.002551")
,("total_cpu_seconds", "3.060452")
,("total_wall_seconds", "0.770395")
,("major_gcs", "2")
,("allocated_bytes", "375016384")
,("max_live_bytes", "206552")
,("max_large_objects_bytes", "159344")
,("max_compact_bytes", "0")
,("max_slop_bytes", "59688")
,("max_mem_in_use_bytes", "6291456")
,("cumulative_live_bytes", "296696")
,("copied_bytes", "541024")
,("par_copied_bytes", "493976")
,("cumulative_par_max_copied_bytes", "104104")
,("cumulative_par_balanced_copied_bytes", "274456")
,("fragmentation_bytes", "2112")
,("alloc_rate", "124170795")
,("productivity_cpu_percent", "0.986838")
,("productivity_wall_percent", "0.982935")
,("bound_task_count", "1")
,("sparks_count", "5836258")
,("sparks_converted", "237")
,("sparks_overflowed", "1990408")
,("sparks_dud ", "0")
,("sparks_gcd", "3455553")
,("sparks_fizzled", "390060")
,("work_balance", "0.555606")
,("n_capabilities", "4")
,("task_count", "10")
,("peak_worker_count", "9")
,("worker_count", "9")
,("gc_alloc_block_sync_spin", "162")
,("gc_alloc_block_sync_yield", "0")
,("gc_alloc_block_sync_spin", "162")
,("gc_spin_spin", "18840855")
,("gc_spin_yield", "10355")
,("mut_spin_spin", "70331392")
,("mut_spin_yield", "61700")
,("waitForGcThreads_spin", "241")
,("waitForGcThreads_yield", "2797")
,("whitehole_gc_spin", "0")
,("whitehole_lockClosure_spin", "0")
,("whitehole_lockClosure_yield", "0")
,("whitehole_executeMessage_spin", "0")
,("whitehole_threadPaused_spin", "0")
,("any_work", "1667")
,("no_work", "1662")
,("scav_find_work", "1026")
,("gen_0_collections", "111")
,("gen_0_par_collections", "111")
,("gen_0_cpu_seconds", "0.036126")
,("gen_0_wall_seconds", "0.036126")
,("gen_0_max_pause_seconds", "0.036126")
,("gen_0_avg_pause_seconds", "0.000081")
,("gen_0_sync_spin", "21")
,("gen_0_sync_yield", "0")
,("gen_1_collections", "2")
,("gen_1_par_collections", "1")
,("gen_1_cpu_seconds", "0.001624")
,("gen_1_wall_seconds", "0.001624")
,("gen_1_max_pause_seconds", "0.001624")
,("gen_1_avg_pause_seconds", "0.000272")
,("gen_1_sync_spin", "3")
,("gen_1_sync_yield", "0")
]
```
Test Plan: Ensure that one-line and summary reports are unchanged.
Reviewers: erikd, simonmar, hvr
Subscribers: duog, carter, thomie, rwbarton
GHC Trac Issues: #14660
Differential Revision: https://phabricator.haskell.org/D4529
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While investigating #14947, I noticed that the `barf`ed
error message in `push()` doesn't print out the closure type that
causes it to crash. Let's do so.
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: alexbiehl, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4525
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With a large heap it's possible to build up a lot of finalizers
between GCs. We've observed GC spending up to 50% of its time running
finalizers. But there's no reason we have to run finalizers during
GC, and especially no reason we have to block *all* the mutator
threads while *one* GC thread runs finalizers one by one.
I thought about a bunch of alternative ways to handle this, which are
documented along with runSomeFinalizers() in Weak.c. The approach I
settled on is to have a capability run finalizers if it is idle. So
running finalizers is like a low-priority background thread. This
requires some minor scheduler changes, but not much. In the future we
might be able to move more GC work into here (I have my eye on freeing
large blocks, for example).
Test Plan:
* validate
* tested on our system and saw reductions in GC pauses of 40-50%.
Reviewers: bgamari, niteria, osa1, erikd
Reviewed By: bgamari, osa1
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4521
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ci
Reviewers: osa1, bgamari, erikd
Reviewed By: osa1
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4517
|
|
|
|
| |
This reverts commit 2d4bda2e4ac68816baba0afab00da6f769ea75a7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There should be no change in the output of the '+RTS -s' (summary)
report, or the 'RTS -t' (one-line) report.
All data shown in the summary report is now shown in the machine
readable report.
All data in RTSStats is now shown in the machine readable report.
init times are added to RTSStats and added to GHC.Stats.
Example of the new output:
```
[("bytes allocated", "375016384")
,("num_GCs", "113")
,("average_bytes_used", "148348")
,("max_bytes_used", "206552")
,("num_byte_usage_samples", "2")
,("peak_megabytes_allocated", "6")
,("init_cpu_seconds", "0.001642")
,("init_wall_seconds", "0.001027")
,("mut_cpu_seconds", "3.020166")
,("mut_wall_seconds", "0.757244")
,("GC_cpu_seconds", "0.037750")
,("GC_wall_seconds", "0.009569")
,("exit_cpu_seconds", "0.000890")
,("exit_wall_seconds", "0.002551")
,("total_cpu_seconds", "3.060452")
,("total_wall_seconds", "0.770395")
,("major_gcs", "2")
,("allocated_bytes", "375016384")
,("max_live_bytes", "206552")
,("max_large_objects_bytes", "159344")
,("max_compact_bytes", "0")
,("max_slop_bytes", "59688")
,("max_mem_in_use_bytes", "6291456")
,("cumulative_live_bytes", "296696")
,("copied_bytes", "541024")
,("par_copied_bytes", "493976")
,("cumulative_par_max_copied_bytes", "104104")
,("cumulative_par_balanced_copied_bytes", "274456")
,("fragmentation_bytes", "2112")
,("alloc_rate", "124170795")
,("productivity_cpu_percent", "0.986838")
,("productivity_wall_percent", "0.982935")
,("bound_task_count", "1")
,("sparks_count", "5836258")
,("sparks_converted", "237")
,("sparks_overflowed", "1990408")
,("sparks_dud ", "0")
,("sparks_gcd", "3455553")
,("sparks_fizzled", "390060")
,("work_balance", "0.555606")
,("n_capabilities", "4")
,("task_count", "10")
,("peak_worker_count", "9")
,("worker_count", "9")
,("gc_alloc_block_sync_spin", "162")
,("gc_alloc_block_sync_yield", "0")
,("gc_alloc_block_sync_spin", "162")
,("gc_spin_spin", "18840855")
,("gc_spin_yield", "10355")
,("mut_spin_spin", "70331392")
,("mut_spin_yield", "61700")
,("waitForGcThreads_spin", "241")
,("waitForGcThreads_yield", "2797")
,("whitehole_gc_spin", "0")
,("whitehole_lockClosure_spin", "0")
,("whitehole_lockClosure_yield", "0")
,("whitehole_executeMessage_spin", "0")
,("whitehole_threadPaused_spin", "0")
,("any_work", "1667")
,("no_work", "1662")
,("scav_find_work", "1026")
,("gen_0_collections", "111")
,("gen_0_par_collections", "111")
,("gen_0_cpu_seconds", "0.036126")
,("gen_0_wall_seconds", "0.036126")
,("gen_0_max_pause_seconds", "0.036126")
,("gen_0_avg_pause_seconds", "0.000081")
,("gen_0_sync_spin", "21")
,("gen_0_sync_yield", "0")
,("gen_1_collections", "2")
,("gen_1_par_collections", "1")
,("gen_1_cpu_seconds", "0.001624")
,("gen_1_wall_seconds", "0.001624")
,("gen_1_max_pause_seconds", "0.001624")
,("gen_1_avg_pause_seconds", "0.000272")
,("gen_1_sync_spin", "3")
,("gen_1_sync_yield", "0")
]
```
Test Plan: Ensure that one-line and summary reports are unchanged.
Reviewers: bgamari, erikd, simonmar, hvr
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14660
Differential Revision: https://phabricator.haskell.org/D4303
|
| |
|