- User Since
- Jun 6 2014, 2:22 AM (232 w, 2 d)
I just remembered the full command I was using as a test for this bug: ghc-stage2 --interactive +RTS -hr <<(echo 'sequence_ (replicate 1000000 (return ()))')
Thanks! One thing that reliably triggered this problem in the past (at least on my system) was running profiled GHCi (build profiled GHC using the prof flavor, then run ghc-stage2 --interactive +RTS -hr). Could you give it a try without this patch to see if it still fails, and then try with this patch?
allocate() looks a bit hacky to me and I was under the impression that it should be the last resort (when calling GC will cause too many problems), but perhaps it's OK in this context. Updated the diff. This validates and the test passes with -debug.
- Use allocate()
Fri, Nov 16
Looking at the test suite output with -debug, there are lots of failures but most of them due to debug outputs. There's one actual failure, memo001, which is tracked in Trac #15906. Landing.
@dfeuer any objections to merging this?
Ping @simonmar .
Yeah let's test and land this. Unless someone beats me to it I'll validate in an hour and then land.
Thu, Nov 15
This looks good to me, thanks! Let's wait to hear from @simonpj before landing.
and counted instructions
Omitting the hack had no effect on nofib allocations (and counted instructions) whatsoever. Remove it?
moving the occurrence hack from CoreToStg to CoreFVs means that all STG-to-STG transformations don't have the generated dead case binder info available
Wed, Nov 14
Confirmed locally that this validates. Also tried the original (larger) reproducer which this fixes.
Tue, Nov 13
CI is completely broken.. this validates on my desktop.
Sun, Nov 11
Could you add an example of how this was printed previously and how it's printed now, in the summary?
Thanks! I didn't review it line by line but the idea sounds good to me.
Sorry everyone, I was on vacation last week and didn't have access to a computer for 8 days! I now rebased the branch and will push shortly after a validate.
Thu, Oct 25
I realized something that we should've perhaps discussed in the proposal (btw, could you link to the proposal in the description? The comments will get lost but the description will be the commit message).
Mon, Oct 22
- Revert removed dead case bndr update
I found it surprising that T9203 allocates -53% now, as it doesn't even use lists. Do you know why it's effected by these changes?
Oct 19 2018
- Remove more comments
Oct 18 2018
I found some relevant comments/code about this optimisation, and filed a ticket: Trac #15770
Oct 17 2018
- Remove more comments
Oct 12 2018
What does it show if you print return value of getClosureData con? I'm asking because you don't know in this code that con points to a constructor without any indirections. For example, GHC can float con to the top-level and make it a CAF, in which case con might point to a IND_STATIC, not to a CONSTR_1_0.
Oct 10 2018
Oct 9 2018
Sorry if I misunderstood what this patch is doing -- I tried to build it and test it but it doesn't build. In the future it'd be helpful if you could say more about the patch in the summary.
I don't think we can do this, for several reasons. First, this is a breaking change of a user-facing feature so even if it makes sense it'd need to go through the GHC proposal process with a migration plan etc. Secondly, I think it makes sense that annotations have lower precedence than everything else, and I know a lot of code are currently relying on that. If you grep in GHC for SCC you'll find code like:
Oct 8 2018
- Remove bogus comments in CorePrep
It just means that every Outputable dictionary is now a boxed pair rather than a simple function. Maybe that doesn't matter.
- Update Note [dataToTag#]
- Add a reference to Note [dataToTag#]
The use case is when I have a String in a larger type, e.g. Maybe [String]. Now I want to pprDebug this, but by default it gives me bad output because string is rendered as a list of characters. I could try fmap (map text) x but that would not work because we don't have Outputable instance for SDoc (that is D2761). For the same reason text "..." also doesn't work (you may get an unrenderable type, e.g. Just [text "..."] is not renderable).
Oct 7 2018
Was that with the libraries recompiled too?
- Update note again
- Fix dataToTag# code gen
I'd be really interested to see what effect this has on performance and code size too.
Oct 6 2018
Oct 5 2018
- Remove more comments
- Revert can_fail, put getTag argument back
Oct 4 2018
Oct 3 2018
adding it would mean that the codebase may start growing superfluous ppr uses and we would have no way to catch them
Oct 2 2018
- Update comments
- Forgot to push stdout files
- Whitespace, typo
Could you say a few more words on reverting a CAF? An evaluated CAF becomes an IND_STATIC, right? Do you mean we could somehow save the old info ptr and somehow scavenge the CAF using the old info ptr? (rather than scavenging it as IND_STATIC?)