simonmar (Simon Marlow)
User

Projects

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Sunday

  • Clear sailing ahead.

User Details

User Since
Jun 8 2014, 1:59 AM (193 w, 5 d)
Availability
Available

Recent Activity

Yesterday

simonmar updated subscribers of D4388: Make cost centre symbol names deterministic..

Good call, thanks for fixing this. cc @niteria

Thu, Feb 22, 5:35 AM
simonmar accepted D4433: Implement first exemplary primop for #11143.

Seems reasonable. Eventually we'll want to use the proper Int16# (etc.) types here, when we have those.

Thu, Feb 22, 5:14 AM
simonmar created D4437: Fix interpreter with profiling.
Thu, Feb 22, 3:29 AM

Wed, Feb 21

simonmar accepted D4432: boot: Create GNUmakefiles for libraries.

Thankyou!

Wed, Feb 21, 11:09 AM
simonmar committed rGHC0a3629af36e8: Don't use ld.gold when building libraries for GHCi (authored by simonmar).
Don't use ld.gold when building libraries for GHCi
Wed, Feb 21, 11:04 AM
simonmar closed D4431: Don't use ld.gold when building libraries for GHCi.
Wed, Feb 21, 11:04 AM
simonmar created D4431: Don't use ld.gold when building libraries for GHCi.
Wed, Feb 21, 8:47 AM
simonmar added a comment to D3918: Rewrite boot in Python.

I just tried to make FAST=YES in libraries/base and found that the makefile we used to have to support this is no longer there. This diff seems to be the culprit. I can work around it for now, but FYI this was useful!

Wed, Feb 21, 7:41 AM

Tue, Feb 20

simonmar accepted D4427: RTS: Remove unused retainer schemes.

Sure, why not.

Tue, Feb 20, 3:23 AM
simonmar accepted D4428: RTS: Remember to free some pointers.

Thanks!

Tue, Feb 20, 3:17 AM

Mon, Feb 19

simonmar accepted D4417: CmmPipeline: add a second pass of CmmCommonBlockElim.

LGTM, I'll take a 1% binary size reduction in exchange for <1% at compile time.

Mon, Feb 19, 3:45 AM
simonmar added a comment to D4416: Remove MAX_PATH restrictions from RTS and I/O manager.

In general it sounds like a good plan, though I'm not familiar with the details of NT paths. I'm amazed and saddened at the lengths upper layers have to go to to work around the legacy backwards compatibility in lower layers though.

Mon, Feb 19, 2:55 AM

Thu, Feb 8

simonmar updated the diff for D4398: Be more selective in which conditionals we invert.

Clarify comment

Thu, Feb 8, 7:11 AM
simonmar added inline comments to D4398: Be more selective in which conditionals we invert.
Thu, Feb 8, 7:07 AM
simonmar added a comment to D4324: Add likely annotation to cmm files in a few obvious places..
Thu, Feb 8, 4:21 AM
simonmar updated the diff for D4398: Be more selective in which conditionals we invert.

fix neLike

Thu, Feb 8, 4:20 AM
simonmar created D4398: Be more selective in which conditionals we invert.
Thu, Feb 8, 4:18 AM
simonmar updated the diff for D4381: myThreadId# is trivial; make it an inline primop.

rebase

Thu, Feb 8, 4:17 AM
simonmar updated the diff for D4380: Tidy up and consolidate canned CmmReg and CmmGlobals.

fix warnings

Thu, Feb 8, 3:49 AM

Wed, Feb 7

simonmar added inline comments to D4302: rts: Add --internal-counters RTS flag and several counters.
Wed, Feb 7, 1:29 PM
simonmar accepted D4393: Adds `smp` flag to rts.cabal..
Wed, Feb 7, 1:28 PM

Mon, Feb 5

simonmar created D4381: myThreadId# is trivial; make it an inline primop.
Mon, Feb 5, 6:58 AM
simonmar created D4380: Tidy up and consolidate canned CmmReg and CmmGlobals.
Mon, Feb 5, 6:56 AM
simonmar accepted D4373: rts: Fix format of failed memory commit message.
Mon, Feb 5, 2:47 AM
simonmar accepted D4374: rts: Add format attribute to barf.

Good idea.

Mon, Feb 5, 2:47 AM
simonmar accepted D4377: Move `iserv` into `utils` and change package name from `iserv-bin` to `iserv`.

No objection here, so long as you can get the CI to pass.

Mon, Feb 5, 2:39 AM

Sun, Feb 4

simonmar accepted D4303: rts, base: Refactor stats.c to improve --machine-readable report.
Sun, Feb 4, 10:45 AM
simonmar accepted D4345: ghc-prim: Only compile atomic.c when building for unregisterised target.
Sun, Feb 4, 10:27 AM
simonmar added a comment to D4324: Add likely annotation to cmm files in a few obvious places..

Yeah, I'm suspicious of that change to CmmSink as I noted in the comment: https://phabricator.haskell.org/rGHC6d14c1485cb570cbd183bcdc0f858d9a6dc1eb31#inline-626

Sun, Feb 4, 9:45 AM
simonmar accepted D4302: rts: Add --internal-counters RTS flag and several counters.

This looks OK to me.

Sun, Feb 4, 9:41 AM
simonmar added a comment to D4325: Collect CCs in CorePrep, including CCs in unfoldings.
In D4325#121672, @osa1 wrote:

I strongly suspect that the cost centre field on StgRhsClosure is actually useless and could be removed. We always set it to currentCCS anyway. I think it was used in the past, but became irrelevant during earlier refactorings and I just never got around to removing it. Could try removing it in a separate diff?

We set it to currentCCS for non-CAFs, for CAFs we set it to module-level CAF cost centre or a fresh cost centre (with -fcaf-all). Am I misunderstanding this?

Sun, Feb 4, 6:09 AM

Thu, Feb 1

simonmar added a comment to D4325: Collect CCs in CorePrep, including CCs in unfoldings.

I think it makes sense if we want to initialize cost centre fields correctly the first time, rather than putting a placeholder (noCCS) and then updating it.

Thu, Feb 1, 12:30 PM
simonmar added inline comments to D4325: Collect CCs in CorePrep, including CCs in unfoldings.
Thu, Feb 1, 9:42 AM
simonmar accepted D4362: [RFC] nativeGen: Add support for MO_SS_Conv_W32_W64 on i386.

If it passes the tests this should be OK. If it's missing on other 32-bit architectures we'll need to add it there too - I'm slightly surprised we got away without this for so long, how is it not needed by the Int64 library I wonder?

Thu, Feb 1, 3:45 AM
simonmar accepted D4363: Improve accuracy of get/setAllocationCounter.

Thanks for taking care of this! Nothing is ever simple :-/

Thu, Feb 1, 3:04 AM

Tue, Jan 30

simonmar added a comment to D4288: Improve accuracy of get/setAllocationCounter.

Is this still reverted?

Tue, Jan 30, 3:29 PM
simonmar added a comment to D4324: Add likely annotation to cmm files in a few obvious places..

Woah, I'm too late to the party to review this, but this is deeply suspicious:

Tue, Jan 30, 3:29 PM
simonmar accepted D4338: Make RTS keep less memory (fixes #14702).

Great! I think we're good to go here.

Tue, Jan 30, 3:15 PM
simonmar added a comment to D4325: Collect CCs in CorePrep, including CCs in unfoldings.

This looks OK, in fact I would have kept the CAF cost centre business separate instead of merging it with CoreToStg - sorry we probably weren't clear about this bit, it was only the recursive traversal of stgMassageForProfiling we wanted to get rid of. But it's OK to move it to CoreToStg.

Tue, Jan 30, 3:14 PM
simonmar added a comment to D4338: Make RTS keep less memory (fixes #14702).
In D4338#121032, @blaze wrote:

I don't see how largeAllocLim applies to need_prealloc, btw. As far as I understand, it is a cut-off point at which GC is triggered, and we are post-GC at that point already.

Tue, Jan 30, 3:15 AM

Mon, Jan 29

simonmar added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

Pushing the use of exprIsBottom to find unlikely branches back to the Core-to-STG pass sounds better.

One idea I have is using pragmas to inform the compiler about likely branches.

case checkInput of
  ParseError {-# CHANCE rare -} 	-> printSuggestions
  ValueError {-# CHANCE unlikely -}     -> printConstraints
  Valid      {-# CHANCE likely -} 	-> runComputation

Have you considered how these annotations would behave under simplification (for instance, case-of-case)? It's not entirely clear to me how this should work.

Case of case seems to be the rather unproblematic as we simply push the whole case into the alternatives. So we can just preserve the chance values.

Harder questions are things like how to desugar nested patterns like Right (Just True) .
There are multiple ways to interpret this annotation. Is it an error? Do we attribute it to all three matches? The first one? Something more complicated?

This is by no means a trivial problem. But I think it's very possible.
And since it's only hints there is always the option to drop the information for situations where we can't make heads or tails of how to handle it.

But that's still a good deal of work and probably more on the timescale of GHC 8.8 if even that fast.

Mon, Jan 29, 3:06 AM
simonmar accepted D4346: rts: Ensure that forkOS releases Task on termination.

Good catch.

Mon, Jan 29, 2:59 AM
simonmar added a comment to D4325: Collect CCs in CorePrep, including CCs in unfoldings.

I thought we decided to get rid of the STG traversal in stgMassageForProfiling? Or do you want to do that separately? I'm a little concerned about adding another complete traversal (albeit only when profiling, I know).

Mon, Jan 29, 2:48 AM

Jan 24 2018

simonmar added a comment to D4338: Make RTS keep less memory (fixes #14702).
By the way, is it important that I'm using minimal nursery size instead of actual one for calculations? How large can they grow?
Jan 24 2018, 9:51 AM
simonmar added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

And to answer your question,

Jan 24 2018, 9:16 AM
simonmar added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

Yes, I think swapcond_last is actually wrong, thanks for pointing it out. Looks like it was changed in D2688, cc @alexbiehl

Jan 24 2018, 9:14 AM

Jan 23 2018

simonmar requested changes to D4338: Make RTS keep less memory (fixes #14702).

Nice, just one thing to fix.

Jan 23 2018, 12:30 PM
simonmar added a comment to D4339: [rts] Add instrumentation to look for threads getting stuck in gc.

So there's a bug somewhere? That's interesting! Does the program actually crash or just hang?

Jan 23 2018, 3:19 AM
simonmar accepted D4330: Linker: ignore empty paths in addEnvPaths.

LGTM

Jan 23 2018, 3:14 AM

Jan 22 2018

simonmar added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

Not sure about this. We already have code to do something similar here:

Jan 22 2018, 5:10 AM
simonmar added a comment to D4321: Don't add targets that can't be found in GHCi.

FYI, @bgamari will commit it, so you're done.

Jan 22 2018, 3:43 AM
simonmar added a comment to D4321: Don't add targets that can't be found in GHCi.

FYI, @bgamari will commit it, so you're done.

Jan 22 2018, 3:43 AM
simonmar accepted D4321: Don't add targets that can't be found in GHCi.

Looks great, thanks for making the test!

Jan 22 2018, 3:36 AM
simonmar accepted D4319: Add ptr-eq short-cut to `compareByteArrays#` primitive.
Jan 22 2018, 3:36 AM

Jan 19 2018

simonmar added inline comments to D4325: Collect CCs in CorePrep, including CCs in unfoldings.
Jan 19 2018, 8:04 AM

Jan 18 2018

simonmar accepted D4322: rts: Really fix i386 thread allocation counter regression.

whateverworks

Jan 18 2018, 3:07 AM

Jan 16 2018

simonmar added a comment to D4303: rts, base: Refactor stats.c to improve --machine-readable report.

Would you prefer I keep the current design or remove the redundancies?

Jan 16 2018, 5:05 AM
simonmar accepted D4311: Fix references to cminusminus.org.
Jan 16 2018, 4:49 AM
simonmar added a comment to D4312: Fix regression on i386 due to get/setAllocationCounter change.

Oops, thanks for the fix!

Jan 16 2018, 4:09 AM

Jan 15 2018

simonmar added inline comments to D4302: rts: Add --internal-counters RTS flag and several counters.
Jan 15 2018, 4:43 AM
simonmar requested changes to D4303: rts, base: Refactor stats.c to improve --machine-readable report.

I'm a bit concerned about the duplication between RTSSummaryStats and RTSStats. I suggest:

Jan 15 2018, 3:01 AM
simonmar accepted D4309: Remove unused extern cost centre collection.

nubSort would be an improvement too.

Jan 15 2018, 2:38 AM

Jan 12 2018

simonmar added a comment to D4303: rts, base: Refactor stats.c to improve --machine-readable report.

No objection in principle. Please fix the long lines and I can take a closure look at the diff.

Jan 12 2018, 9:31 AM

Jan 10 2018

simonmar added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

I definitely support bringing in those docs somewhere (with the fix I just added to https://ghc.haskell.org/trac/ghc/ticket/10840).

Jan 10 2018, 11:43 AM · GHC
simonmar accepted D4295: Simplify guard in createSwitchPlan..
Jan 10 2018, 11:26 AM
simonmar added a comment to D4294: Cmm switch on two alts + def uses two equality tests instead of range checks..

Just a thought for the future: on CmmCondBranch we have a likely flag which says which branch is more likely to be taken and we can use that to generate better code. If we had something similar for CmmSwitch we could use it to make different decisions here.

Jan 10 2018, 11:23 AM

Jan 8 2018

simonmar added a comment to D4282: rts: Add ability to pause and resume event logging.

The eventlog_enabled flag doesn't quite do what you want it to do, I think. It doesn't protect all the places where we emit events, for example see traceSchedEvent_. I'm not entirely sure what happened - I think eventlog_enabled was originally just to indicate whether we should create the file, but then it got used in some other places too.

Jan 8 2018, 12:42 PM
simonmar accepted D4293: When printing cmm include braces on default branch required by the parser.

seems reasonable.

Jan 8 2018, 4:32 AM
simonmar added a comment to D4267: Pointer tagging for all families.

That is indeed a help. But it sits in a larger context: the invariants about pointer tagging. Are these invariants documented anywhere (except in the paper)? Is there a wiki page?

Jan 8 2018, 3:02 AM
simonmar committed rGHCa1a689dda481: Improve accuracy of get/setAllocationCounter (authored by simonmar).
Improve accuracy of get/setAllocationCounter
Jan 8 2018, 2:42 AM
simonmar closed D4288: Improve accuracy of get/setAllocationCounter.
Jan 8 2018, 2:42 AM

Jan 5 2018

simonmar created D4288: Improve accuracy of get/setAllocationCounter.
Jan 5 2018, 10:17 AM

Dec 18 2017

simonmar updated the diff for D4254: Blackholes can be large objects (#14497).

smaller test output file

Dec 18 2017, 3:07 AM
simonmar added a comment to D4267: Pointer tagging for all families.

I like the idea. Can you put an example of the generated code in the test plan so we can check what's being generated?

Dec 18 2017, 2:56 AM

Dec 15 2017

simonmar added inline comments to D4263: [RTS] Add loadNativeObj and unloadNativeObj.
Dec 15 2017, 11:19 AM
simonmar added a comment to D4263: [RTS] Add loadNativeObj and unloadNativeObj.

@Phyx The long-term plan would be to drop addDLL(), yes.

Dec 15 2017, 9:14 AM
simonmar added a comment to D4263: [RTS] Add loadNativeObj and unloadNativeObj.

Overall this is great, we just need to work on the way to handle keepCAFs/retain_cafs.

Dec 15 2017, 9:12 AM

Dec 13 2017

simonmar added inline comments to D4262: Protect unloaded_objects with linker_unloaded_mutex.
Dec 13 2017, 8:43 AM

Dec 7 2017

simonmar planned changes to D4254: Blackholes can be large objects (#14497).

Hah, I didn't notice how big it was. I'll fix it.

Dec 7 2017, 9:06 AM
simonmar updated the diff for D4254: Blackholes can be large objects (#14497).

add test output

Dec 7 2017, 8:50 AM
simonmar added a comment to D4254: Blackholes can be large objects (#14497).

Could the remaining assertion (about compacts) be changed to produce a clearer error message?

Dec 7 2017, 7:40 AM
simonmar created D4254: Blackholes can be large objects (#14497).
Dec 7 2017, 2:51 AM

Dec 4 2017

simonmar accepted D4123: Allow users to ignore optimization changes.
Dec 4 2017, 10:22 AM

Dec 1 2017

simonmar added a comment to D4215: rts/posix: Use less aggressive backoff schedule for heap reservation sizing.

Yes, I had considered binary search. The trouble is that this could be rather expensive since when we succeed in mapping a size, we will need to again unmap it to try the next larger guess. I haven't measured but I would expect a this mapping/unmapping will be much more expensive than simply attempting to mmap successively smaller sizes until we hit success.

Dec 1 2017, 2:01 PM

Nov 30 2017

simonmar added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..
It feels like a bit of a hack
Nov 30 2017, 3:41 AM · GHC
simonmar accepted D4245: rts: Don't default to single capability when profiled.

Nice catch, I think that's historical.

Nov 30 2017, 2:35 AM

Nov 28 2017

simonmar added inline comments to D4123: Allow users to ignore optimization changes.
Nov 28 2017, 3:04 PM
simonmar added inline comments to D42: Fix hWaitForInput not being interruptible (#8684)..
Nov 28 2017, 2:17 PM · GHC

Nov 27 2017

simonmar created D4239: Always use the safe open() call.
Nov 27 2017, 7:02 AM
simonmar requested changes to D42: Fix hWaitForInput not being interruptible (#8684)..

Mostly this looks reasonable to me, thanks for doing all this! One question inline.

Nov 27 2017, 3:44 AM · GHC
simonmar added a comment to D4238: RtsFlags: allow +RTS -K0.

Add a test?

Nov 27 2017, 2:45 AM

Nov 22 2017

simonmar requested changes to D4219: [WIP][RFC] GHCi: Order messages according to severity.
Nov 22 2017, 3:08 AM
simonmar added a comment to D4215: rts/posix: Use less aggressive backoff schedule for heap reservation sizing.

Could we query the ulimit value and use that to make an informed guess?

Nov 22 2017, 3:07 AM
simonmar added a comment to D4219: [WIP][RFC] GHCi: Order messages according to severity.

Whatever we do here should probably be consistent between GHCi and ghc --make, so that argues for moving this into GhcMake rather than having it be GHCi-specific.

Nov 22 2017, 3:04 AM

Nov 20 2017

simonmar accepted D4194: rts: Move libdwPrintBacktrace to public interface.

Yes!

Nov 20 2017, 3:08 AM

Nov 16 2017

simonmar committed rGHC2f4638735ad1: Detect overly long GC sync (authored by simonmar).
Detect overly long GC sync
Nov 16 2017, 8:36 AM
simonmar closed D4193: Detect overly long GC sync.
Nov 16 2017, 8:36 AM
simonmar added inline comments to D4193: Detect overly long GC sync.
Nov 16 2017, 8:05 AM
simonmar accepted D4185: rts: Fix some inconsistencies in how retainer profiling and heap censuses are timed..

Yup, I didn't think very hard about this in the recent refactor of this code. Looks reasonable to me.

Nov 16 2017, 2:57 AM

Nov 15 2017

simonmar updated the diff for D4193: Detect overly long GC sync.

fix warnings; call hooks via rtsConfig

Nov 15 2017, 3:27 AM