[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 26 commits: Use binary search to speedup checkUnload
Marge Bot
gitlab at gitlab.haskell.org
Thu May 30 21:15:59 UTC 2019
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
f81f3964 by Phuong Trinh at 2019-05-30T20:43:31Z
Use binary search to speedup checkUnload
We are iterating through all object code for each heap objects when
checking whether object code can be unloaded. For large projects in
GHCi, this can be very expensive due to the large number of object code
that needs to be loaded/unloaded. To speed it up, this arrangess all
mapped sections of unloaded object code in a sorted array and use binary
search to check if an address location fall on them.
- - - - -
42129180 by Trịnh Tuấn Phương at 2019-05-30T20:43:31Z
Apply suggestion to rts/CheckUnload.c
- - - - -
8e42e98e by Trịnh Tuấn Phương at 2019-05-30T20:43:31Z
Apply suggestion to rts/CheckUnload.c
- - - - -
70afa539 by Daniel Gröber at 2019-05-30T20:44:08Z
Export GhcMake.downsweep
This is to enable #10887 as well as to make it possible to test downsweep
on its own in the testsuite.
- - - - -
a8de5c5a by Daniel Gröber at 2019-05-30T20:44:08Z
Add failing test for #10887
- - - - -
8906bd66 by Daniel Gröber at 2019-05-30T20:44:08Z
Refactor downsweep to allow returning multiple errors per module
- - - - -
8e85ebf7 by Daniel Gröber at 2019-05-30T20:44:08Z
Refactor summarise{File,Module} to reduce code duplication
- - - - -
76c86fca by Daniel Gröber at 2019-05-30T20:44:08Z
Refactor summarise{File,Module} to extract checkSummaryTimestamp
This introduces a slight change of behaviour in the interrest of keeping
the code simple: Previously summariseModule would not call
addHomeModuleToFinder for summaries that are being re-used but now we do.
We're forced to to do this in summariseFile because the file being
summarised might not even be on the regular search path! So if GHC is to
find it at all we have to pre-populate the cache with its location. For
modules however the finder cache is really just a cache so we don't have to
pre-populate it with the module's location.
As straightforward as that seems I did almost manage to introduce a bug (or
so I thought) because the call to addHomeModuleToFinder I copied from
summariseFile used to use `ms_location old_summary` instead of the
`location` argument to checkSummaryTimestamp. If this call were to
overwrite the existing entry in the cache that would have resulted in us
using the old location of any module even if it was, say, moved to a
different directory between calls to 'depanal'.
However it turns out the cache just ignores the location if the module is
already in the cache. Since summariseModule has to search for the module,
which has the side effect of populating the cache, everything would have
been fine either way.
Well I'm adding a test for this anyways: tests/depanal/OldModLocation.hs.
- - - - -
18d3f01d by Daniel Gröber at 2019-05-30T20:44:08Z
Make downsweep return all errors per-module instead of throwing some
This enables API clients to handle such errors instead of immideately
crashing in the face of some kinds of user errors, which is arguably quite
bad UX.
Fixes #10887
- - - - -
99e72769 by Daniel Gröber at 2019-05-30T20:44:08Z
Catch preprocessor errors in downsweep
This changes the way preprocessor failures are presented to the
user. Previously the user would simply get an unlocated message on stderr
such as:
`gcc' failed in phase `C pre-processor'. (Exit code: 1)
Now at the problematic source file is mentioned:
A.hs:1:1: error:
`gcc' failed in phase `C pre-processor'. (Exit code: 1)
This also makes live easier for GHC API clients as the preprocessor error
is now thrown as a SourceError exception.
- - - - -
b7ca94fd by Daniel Gröber at 2019-05-30T20:44:08Z
PartialDownsweep: Add test for import errors
- - - - -
98e39818 by Daniel Gröber at 2019-05-30T20:44:08Z
Add depanalPartial to make getting a partial modgraph easier
As per @mpickering's suggestion on IRC this is to make the partial
module-graph more easily accessible for API clients which don't intend to
re-implementing depanal.
- - - - -
d2784771 by Daniel Gröber at 2019-05-30T20:44:08Z
Improve targetContents code docs
- - - - -
424e85b2 by Ben Gamari at 2019-05-30T20:44:43Z
testsuite: Compile T9630 with +RTS -G1
For the reasons described in Note [residency] we run programs with -G1
when we care about the max_bytes_used metric.
- - - - -
5ef79775 by Matthew Pickering at 2019-05-30T21:15:36Z
Eventlog: Document the fact timestamps are nanoseconds
[skip ci]
- - - - -
d61c2a29 by Takenobu Tani at 2019-05-30T21:15:37Z
Update `$(TOP)/*.md` documents
I updated the top documents to the latest status:
- HACKING.md:
- Modify Phabricator to GitLab infomation
- Remove old Trac information
- Add link to GitLab activity
- MAKEHELP.md:
- Add link to hadrian wiki
- Fix markdown format
- INSTALL.md:
- Modify boot command to remove python3
- Fix markdown format
- README.md:
- Modify tarball file suffix
- Fix markdown format
I checked the page display on the GitHub and GitLab web.
[skip ci]
- - - - -
1c712ea5 by Sergei Trofimovich at 2019-05-30T21:15:39Z
powerpc32: fix 64-bit comparison (#16465)
On powerpc32 64-bit comparison code generated dangling
target labels. This caused ghc build failure as:
$ ./configure --target=powerpc-unknown-linux-gnu && make
...
SCCs aren't in reverse dependent order
bad blockId n3U
This happened because condIntCode' in PPC codegen generated
label name but did not place the label into `cmp_lo` code block.
The change adds the `cmp_lo` label into the case of negative
comparison.
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
- - - - -
86b06238 by Sergei Trofimovich at 2019-05-30T21:15:39Z
powerpc32: fix stack allocation code generation
When ghc was built for powerpc32 built failed as:
It's a fallout of commit 3f46cffcc2850e68405a1
("PPC NCG: Refactor stack allocation code") where
word size used to be
II32/II64
and changed to
II8/panic "no width for given number of bytes"
widthFromBytes ((platformWordSize platform) `quot` 8)
The change restores initial behaviour by removing extra division.
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
- - - - -
b65ae897 by Matthew Pickering at 2019-05-30T21:15:39Z
Use types already in AST when making .hie file
These were meant to be added in !214 but for some reason wasn't included
in the patch.
Update Haddock submodule for new Types.hs hyperlinker output
- - - - -
57251d4a by David Hewson at 2019-05-30T21:15:41Z
support small arrays and CONSTR_NOCAF in ghc-heap
- - - - -
bf476d2a by Neil Mitchell at 2019-05-30T21:15:43Z
Expose doCpp
- - - - -
8b825df1 by Ömer Sinan Ağacan at 2019-05-30T21:15:47Z
Remove unused RTS function 'unmark'
- - - - -
59a6b50d by Ömer Sinan Ağacan at 2019-05-30T21:15:48Z
Fix arity type of coerced types in CoreArity
Previously if we had
f |> co
where `f` had arity type `ABot N` and `co` had arity M and M < N,
`arityType` would return `ABot M` which is wrong, because `f` is only
known to diverge when applied to `N` args, as described in Note
[ArityType]:
If at = ABot n, then (f x1..xn) definitely diverges. Partial
applications to fewer than n args may *or may not* diverge.
This caused incorrect eta expansion in the simplifier, causing #16066.
We now return `ATop M` for the same expression so the simplifier can't
assume partial applications of `f |> co` is divergent.
A regression test T16066 is also added.
- - - - -
6a15b576 by Ryan Scott at 2019-05-30T21:15:50Z
Put COMPLETE sigs into ModDetails with -fno-code (#16682)
`mkBootModDetailsTc`, which creates a special `ModDetails` when
`-fno-code` is enabled, was not properly filling in the `COMPLETE`
signatures from the `TcGblEnv`, resulting in incorrect pattern-match
coverage warnings. Easily fixed.
Fixes #16682.
- - - - -
92ffcbe3 by Simon Jakobi at 2019-05-30T21:15:52Z
Implement (Functor.<$) for Array
- - - - -
51599b9a by Simon Jakobi at 2019-05-30T21:15:54Z
Implement (Functor.<$) for Data.Functor.{Compose,Product,Sum}
This allows us to make use of the (<$) implementations of the
underlying functors.
- - - - -
30 changed files:
- HACKING.md
- INSTALL.md
- MAKEHELP.md
- README.md
- compiler/backpack/DriverBkp.hs
- compiler/coreSyn/CoreArity.hs
- compiler/hieFile/HieAst.hs
- compiler/main/DriverPipeline.hs
- compiler/main/GhcMake.hs
- compiler/main/HeaderInfo.hs
- compiler/main/HscTypes.hs
- compiler/main/TidyPgm.hs
- compiler/nativeGen/PPC/CodeGen.hs
- compiler/nativeGen/PPC/Instr.hs
- docs/users_guide/runtime_control.rst
- libraries/base/Data/Functor/Compose.hs
- libraries/base/Data/Functor/Product.hs
- libraries/base/Data/Functor/Sum.hs
- libraries/base/GHC/Arr.hs
- libraries/ghc-heap/GHC/Exts/Heap.hs
- libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
- rts/CheckUnload.c
- rts/Heap.c
- rts/sm/Compact.h
- testsuite/tests/driver/T8602/T8602.stderr
- + testsuite/tests/ghc-api/downsweep/OldModLocation.hs
- + testsuite/tests/ghc-api/downsweep/OldModLocation.stderr
- + testsuite/tests/ghc-api/downsweep/PartialDownsweep.darwin.stderr
- + testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
- + testsuite/tests/ghc-api/downsweep/PartialDownsweep.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/fc9e2b21ce19f8a7d5f00b468c9f39a24acaa324...51599b9aae68977ebc321ec17f518a84a7e39fb8
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/fc9e2b21ce19f8a7d5f00b468c9f39a24acaa324...51599b9aae68977ebc321ec17f518a84a7e39fb8
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190530/ca3022fa/attachment-0001.html>
More information about the ghc-commits
mailing list