a reliable way of dropping levity args?

2016-01-24 Thread Ömer Sinan Ağacan
Hi all, I'm looking for a reliable way of dropping levity args from TyCon applications. When I know that a particular TyCon gets some number of levity args, I can just drop the args manually (for example, I can drop the first half of arguments of a tuple TyCon application) but the code looks

Fixing #11444 - OK-for-speculation check rejects valid program?

2016-01-19 Thread Ömer Sinan Ağacan
I found one of the problems with #11444, but I don't know how to fix it. The problem is that the desugarer is generating this function: ptrEq [InlPrag=NOINLINE] :: forall a_a1wc. a_a1wc -> a_a1wc -> Bool [LclIdX, Str=DmdType] ptrEq = \ (@ a_a1Ts) (x_a1we :: a_a1Ts) (y_a1wf ::

Re: How to build profiled stage1?

2016-01-19 Thread Ömer Sinan Ağacan
An update: If I just clone from scratch, set the flavor "prof" and run make, it doesn't work. But this is another problem, my original problem is about building profiling stage1, rather than stage2. 2016-01-18 15:10 GMT-05:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > I'm

'lub' and 'both' on strictness - what does it mean for products to have different arity?

2016-02-19 Thread Ömer Sinan Ağacan
I was looking at implementations of LUB and AND on demand signatures and I found this interesting case: lubStr (SProd s1) (SProd s2) | length s1 == length s2 = mkSProd (zipWith lubArgStr s1 s2) | otherwise= HeadStr The "otherwise" case is interesting, I'd

Re: Disappearing case alternative?

2016-03-11 Thread Ömer Sinan Ağacan
Empty case expressions like `case evalP @ (Pair Int) ds of wild { }` are only valid if the scrutinee is bottom, see CoreLint.hs for how exprIsBottom is used and CoreUtils.hs for how it's defined. So it seems like the simplifier somehow figured that `evalP @ (Pair Int) ds` is bottom, and generated

Re: 'lub' and 'both' on strictness - what does it mean for products to have different arity?

2016-03-04 Thread Ömer Sinan Ağacan
ll the cases for UCall, and so on. That way I know I've > got coverage. > > (And perhaps it's more efficient: we pattern match at most once on each > argument. > > Simon > > | > | I didn't check all the cases to see if it's really commutative or not, > | but c

Re: 'lub' and 'both' on strictness - what does it mean for products to have different arity?

2016-03-01 Thread Ömer Sinan Ağacan
the cases to see if it's really commutative or not, but can I assume that they need to be commutative and simplify the code? Otherwise let's add a note about why they're not commutative? Thanks.. 2016-03-02 1:07 GMT-05:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: >> Could I ask

Re: 'lub' and 'both' on strictness - what does it mean for products to have different arity?

2016-03-01 Thread Ömer Sinan Ağacan
> Could I ask that you add this example as a Note to the relevant functions, so > that the next time someone asks this question they'll find the answer right > there? Yep, I'll do that soon. 2016-03-01 12:01 GMT-05:00 Simon Peyton Jones : > Omer > > Joachim is right. The

Initial compile time benchmarks

2016-03-29 Thread Ömer Sinan Ağacan
Hi all, Using Ben's timing patch [^1], Cabal, and a Haskell program to parse generated logs [^2], I generated some tables that show compile times of modules in hxt, haskell-src-exts, lens, and all of their dependencies:

Re: Initial compile time benchmarks

2016-03-31 Thread Ömer Sinan Ağacan
Forgot to mention that I use `cabal install --ghc-options="-v3" -v3` to install the packages. 2016-03-31 12:00 GMT-04:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > Hi Joachim, > > That's GHC HEAD at the time with -O1 for stage 2 + libs. > > The way I generate the

Re: Initial compile time benchmarks

2016-03-31 Thread Ömer Sinan Ağacan
Hi Joachim, That's GHC HEAD at the time with -O1 for stage 2 + libs. The way I generate the logs is: - I create a cabal sandbox and run `cabal exec zsh` to set up the env variables. - I install packages in that shell. - $ (cat .cabal-sandbox/logs/*.log | analyze-ghc-timings) > output I

Re: Initial compile time benchmarks

2016-03-31 Thread Ömer Sinan Ağacan
better job probably. One last thing is that profiling can prevent some optimizations and cause different runtime behavior. Problems with instrumentation ... 2016-03-31 12:01 GMT-04:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > Forgot to mention that I use `cabal install > --g

atomicModifyMutVar#: cas() is not inlined

2016-07-27 Thread Ömer Sinan Ağacan
This is from definition of stg_atomicModifyMutVarzh(): (for threaded runtime) retry: x = StgMutVar_var(mv); StgThunk_payload(z,1) = x; (h) = ccall cas(mv + SIZEOF_StgHeader + OFFSET_StgMutVar_var, x, y); if (h != x) { goto retry; } cas() is defined in

Supporting unboxed tuples in the bytecode compiler

2016-07-25 Thread Ömer Sinan Ağacan
Simon, I was looking at the bytecode compiler to understand what's needed to support unboxed tuples. It seems like if we generate bytecode after unarise it should be very easy to support unboxed tuples, because after unarise we don't have any unboxed tuple binders (all binders have UnaryType). So

Re: atomicModifyMutVar#: cas() is not inlined

2016-07-27 Thread Ömer Sinan Ağacan
L587 > > All is left todo would be to add it to CmmParse.y (which has a TODO comment > https://github.com/ghc/ghc/blob/714bebff44076061d0a719c4eda2cfd213b7ac3d/compiler/cmm/CmmParse.y#L992) > then you could use that instead of the ccall. > > Ömer Sinan Ağacan <omeraga...@gmail.c

A function with absent demand on syntactically used argument?

2016-08-03 Thread Ömer Sinan Ağacan
I'm reading the code in WwLib that generates worker functions and I'm confused about absent lets. Can anyone give an example function that has absent demand on its argument even though the argument is syntactically used in the body? I think we should add some examples to `Note [Absent errors]` in

Slow validate currently fails

2016-07-15 Thread Ömer Sinan Ağacan
Hi all, Just wanted to say that HEAD (37aeff6) doesn't currently pass validate (in slow mode). See details below. STAGE 2 TESTS Unexpected results from: TEST="haddock.Cabal hpc_fork T4114c T4114d dynamic-paper" SUMMARY for test run started at Fri Jul 15 11:19:15 2016

Re: Parser changes for supporting top-level SCC annotations

2016-07-19 Thread Ömer Sinan Ağacan
://phabricator.haskell.org/D2407 2016-06-01 12:55 GMT+00:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > I was actually trying to avoid that, thinking that it'd be best if SCC > uniformly > worked for top-levels and expressions. But then this new form: > > {-# SCC f "f_sc

Re: Parser changes for supporting top-level SCC annotations

2016-07-19 Thread Ömer Sinan Ağacan
2016-07-19 9:57 GMT+00:00 Simon Peyton Jones : > Is there a ticket? A wiki page with a specification? I updated the user manual. There's no wiki, it just adds supports for SCC annotations at the top-level. ___ ghc-devs mailing

Re: first unboxed sums patch is ready for reviews

2016-07-19 Thread Ömer Sinan Ağacan
I just got Simon's approval and I'm going to push it tomorrow (need to add some more documentation) if no one asks for more things. 2016-07-09 12:55 GMT+00:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > Hi all, > > I'm almost done with the unboxed sums patch and I'd like to g

Note [Api annotations]

2016-07-20 Thread Ömer Sinan Ağacan
I see some weird comments like -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen', -- 'ApiAnnotation.AnnVbar','ApiAnnotation.AnnComma', -- 'ApiAnnotation.AnnClose' -- For details on above see note [Api annotations] in ApiAnnotation in some

first unboxed sums patch is ready for reviews

2016-07-09 Thread Ömer Sinan Ağacan
Hi all, I'm almost done with the unboxed sums patch and I'd like to get some reviews at this point. https://phabricator.haskell.org/D2259 Two key files in the patch are UnariseStg.hs and RepType.hs. For the example programs see files in testsuite/tests/unboxedsums/ In addition to any comments

testsuite: Test named X but want to use Y.hs as source

2016-07-10 Thread Ömer Sinan Ağacan
I have some number of test programs that I compile and run as usual. I also want to run them using GHCi, with -fobject-code. So I tried this: def just_ghci( name, opts ): opts.only_ways = ['ghci'] test('unboxedsums1.ghci', just_ghci, compile_and_run, ['-fobject-code']) Now, I

Improving cost center reports to show residency?

2016-08-08 Thread Ömer Sinan Ağacan
One thing that we can't currently see in cost center reports is the residency and because of that cost centers can't be used for fixing memory leaks or reducing max. memory residency. For example, I can have a function that returns an `Int` but allocates lots of intermediate data on the way. In

Re: Broken Build due to T1969

2016-08-17 Thread Ömer Sinan Ağacan
Ugh. I validated that patch before committing and validated many times after that patch. Are you using a 32bit system? Maybe we should bump the numbers for 32bit builds too. I'm hesitant to mark the test broken because I'm afraid that the numbers will increase if we stop testing for

Re: Broken Build due to T1969

2016-08-17 Thread Ömer Sinan Ağacan
like: runMajorGC >> printResidency In some specific locations in the compiler and only look for those in perf tests? Or does anyone have any better ideas? 2016-08-17 18:05 GMT+00:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > Hmm, it seems to be a 64bit Linux

Can we mark DataCon ptrs only in allocation sites and not generate entry code?

2016-08-25 Thread Ömer Sinan Ağacan
As far as I can see in the native code compiler we mark DataCon pointers in two places: 1. In allocation sites (StgCmmCon.hs:240) 2. In DataCon entry code (StgCmm.hs:244) I was wondering why we can't get away with just doing (1). Can anyone give me an example where an allocation doesn't return a

Re: Feature request bounty

2016-09-08 Thread Ömer Sinan Ağacan
> | -Original Message- > | From: Ömer Sinan Ağacan [mailto:omeraga...@gmail.com] > | Sent: 08 September 2016 02:20 > | To: Simon Peyton Jones <simo...@microsoft.com> > | Cc: ghc-devs <ghc-devs@haskell.org> > | Subject: Re: Feature request bounty > | >

-fno-warn lines in the lexer can be removed with Alex 3.1.5

2016-09-10 Thread Ömer Sinan Ağacan
I was working on the lexer today and realized that we can now remove -fno-warn lines in the lexer if we're OK with requiring Alex >=3.1.5. ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Re: IRC: Logging #ghc with ircbrowse.net?

2016-09-10 Thread Ömer Sinan Ağacan
+1 from me. I don't have any preference to which service to use, as long as we have a logger with good uptime. I was regularly checking the logs when it was working. 2016-09-10 16:00 GMT-04:00 Ben Gamari : > Hello GHC developers, > > In the past we have relied upon

Re: Can we mark DataCon ptrs only in allocation sites and not generate entry code?

2016-08-25 Thread Ömer Sinan Ağacan
> StgCmmCon.hs:240 reads > ; return (mkRhsInit dflags reg lf_info hp_plus_n) } > > what's that got to do with pointer tagging? If I understand correctly, mkRhsInit returns a tagged pointer: mkRhsInit :: DynFlags -> LocalReg -> LambdaFormInfo -> CmmExpr -> CmmAGraph mkRhsInit

177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-10 Thread Ömer Sinan Ağacan
I'm trying to validate on a new system (not sure if related, but it has gcc 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most (maybe even all) of them are similar to this one: => T5976(ext-interp) 1 of 1 [0, 0, 0] cd "./th/T5976.run" &&

Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Ömer Sinan Ağacan
t; (symbol lookup table) > in rts/Linker.c > > https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant > > > On 11/11/2016 16:49, Ömer Sinan Ağacan wrote: > > Ah, sorry, that line was truncated. I posted the output here: > https://gist.githubusercontent.com/osa1/ea72655b8369

Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Ömer Sinan Ağacan
bar...@gmail.com>: > On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan > <omeraga...@gmail.com> wrote: > > I'm trying to validate on a new system (not sure if related, but it has > gcc > > 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most (maybe >

Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Ömer Sinan Ağacan
hc/reportabug +ghc: ghc-iserv terminated (-6) *** unexpected failure for T5976(ext-interp) Unexpected results from: TEST="T5976" 2016-11-11 12:02 GMT-05:00 Ömer Sinan Ağacan <omeraga...@gmail.com>: > So I just tried validating on another system: > > > ghc git:(mas

Re: Register Allocator Tests

2016-10-11 Thread Ömer Sinan Ağacan
> Is it not possible to unit test GHC? You need to export functions you want to test, and then write a program that tests those functions using the `ghc` package. See https://github.com/ghc/ghc/blob/master/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs for an example. 2016-10-11 17:50

Slow validate failures

2017-03-24 Thread Ömer Sinan Ağacan
Hi all, I have a patch that effects profiling code and I realized neither `./validate --fast` nor `./validate` test the "prof" way so I tried `./validate --slow`. I saw that even on a clean branch I get 250 unexpected failures and 6 unexpected passes. I had a quick look at logs. Most of the

Re: A possible bug in ghc documentation

2017-03-20 Thread Ömer Sinan Ağacan
Hi Yi, Thanks for reporting. I just fixed this. Ömer 2017-03-20 4:29 GMT+03:00 yi lu : > Hi all, > > Sorry to bother. I'm not sure if this is the right place to post this, but > I find a possible bug in ghc documentation. > >

Use NULL instead of END_X_QUEUE closures?

2018-05-07 Thread Ömer Sinan Ağacan
Currently we sometimes use special closures to mark end of lists of different objects. Some examples: - END_TSO_QUEUE - END_STM_WATCH_QUEUE - END_STM_CHUNK_LIST But we also use NULL for the same thing, e.g. in weak pointer lists (old_weak_ptr_list, weak_ptr_list). I'm wondering why we need

req_interp tests

2018-06-18 Thread Ömer Sinan Ağacan
Hi, I have a few problems with req_interp tests. First, req_interp doesn't actually skip the test, it runs it but expects it to fail. This causes problems when testing stage 1 compiler because 629 req_interp tests are run for no reason. Ideally I think req_interp would skip the test, and for the

Re: DEBUG-on

2018-06-18 Thread Ömer Sinan Ağacan
If we're going to test with a DEBUG-enabled compiler we may also want to enable sanity checks. I've been recently using this a lot and it really catches a lot of bugs that can go unnoticed without sanity checks. I recently filed #15241 for some of the tests that currently fail the sanity checks.

Re: How do I add ghc-prim as a dep for ghc?

2018-06-26 Thread Ömer Sinan Ağacan
I did make distclean; ./boot; ./configure ... no luck. Checked ghc.cabal also. Ömer Ben Gamari , 26 Haz 2018 Sal, 21:39 tarihinde şunu yazdı: > > Ömer Sinan Ağacan writes: > > > I'm trying to add ghc-prim as a dependency to the ghc package. So far I've > > done > >

Booting ghc with system-wide installed Cabal?

2018-06-26 Thread Ömer Sinan Ağacan
Currently we have to build Cabal from scratch after every make clean. Ideally I should be able to skip this step by installing the correct versions of Cabal and cabal-install system-wide, but as far as I can see we currently doesn't support this. Any ideas on how to make this work? Thanks, Ömer

How do I add ghc-prim as a dep for ghc?

2018-06-26 Thread Ömer Sinan Ağacan
I'm trying to add ghc-prim as a dependency to the ghc package. So far I've done these changes: diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 01628dcad1..b9c3b3d02b 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -65,7 +65,8 @@ Library

Re: Booting ghc with system-wide installed Cabal?

2018-06-26 Thread Ömer Sinan Ağacan
nstalling stuff system-wide without doing ‘make install’ would break my > expectations for how the build works. Also, how would one return to a > pristine state if it was done that way? > > // Niklas > > > 26 juni 2018 kl. 08:57 skrev Ömer Sinan Ağacan : > > >

Re: How do I add ghc-prim as a dep for ghc?

2018-06-27 Thread Ömer Sinan Ağacan
It turns out there are two GHC packages: ghc and ghc-bin. I needed to add to ghc-bin but I wasn't aware of it so added to ghc. Ömer Ömer Sinan Ağacan , 26 Haz 2018 Sal, 21:58 tarihinde şunu yazdı: > > I did make distclean; ./boot; ./configure ... no luck. Checked ghc.cabal also. &g

Not possible to build debug + prof, oversight or expected?

2018-07-03 Thread Ömer Sinan Ağacan
I just realized GHC 8.4.2 doesn't ship a debug + prof RTS, and HEAD doesn't build it with release build (no build.mk) or with prof flavor. It seems to me that this is a bug, because some debug files in RTS (e.g. Printer.c) actually check PROFILING macro in a few places and print different stuff

Re: Scavenging SRTs in scavenge_one

2018-05-02 Thread Ömer Sinan Ağacan
g SRTs. Admittedly this is a > subtle point that could almost certainly be documented better, I probably > just overlooked it. > > More inline: > > On 1 May 2018 at 10:26, Ömer Sinan Ağacan <omeraga...@gmail.com> wrote: >> >> I have an idea but it doesn't explain eve

Re: Scavenging SRTs in scavenge_one

2018-05-01 Thread Ömer Sinan Ağacan
I have an idea but it doesn't explain everything; SRTs are used to collect CAFs, and CAFs are always added to the oldest generation's mut_list when allocated [1]. When we're scavenging a mut_list we know we're not doing a major GC, and because mut_list of oldest generation has all the newly

StgLint worth maintaining?

2018-02-09 Thread Ömer Sinan Ağacan
Hi, I've been looking into some StgLint-related tickets: - #13994: Found a StgLint problem and fixed, there's another problem waiting to be fixed. Both related with the fact that after unarisation we lose even more typing information and type checks needs to be

Re: StgLint worth maintaining?

2018-02-10 Thread Ömer Sinan Ağacan
Created #14787 as tracking ticket. Patch is at D4404. Ömer 2018-02-09 12:22 GMT+03:00 Simon Peyton Jones : > Good summary! I suggest that you open a ticket with this email as the > Description. Then we can point to it later. > > I agree that there is little point in

Re: A (late-)demand analysis and w/w question

2018-02-20 Thread Ömer Sinan Ağacan
Thanks. I checked both papers, they mention that not all reboxing is eliminated, but as far as I can see they don't give an example reboxing that's not eliminated. It's not hard to come up with an example though. In this function fac :: Int -> Int fac 0 = 1 fac n = n * fac (n - 1)

A (late-)demand analysis and w/w question

2018-02-20 Thread Ömer Sinan Ağacan
Hi, I was recently looking at #6087. One of the cases that increased allocations (see comment:27) is when we do worker/wrapper to pass an `Int#` instead of `Int` when we need the boxed form in the function body. This causes redundant allocations because we already have the boxed version of the

Re: Scavenging SRTs in scavenge_one

2018-06-21 Thread Ömer Sinan Ağacan
ch case we could have large objects > that could be THUNK, FUN, etc. and could have an SRT, in which case we would > need to revisit this. You might want to take a look at Note [big objects] in > GCUtils.c, which is relevant here. > > Cheers > Simon > > > On 20 June 2

Re: Scavenging SRTs in scavenge_one

2018-06-21 Thread Ömer Sinan Ağacan
C_STACK(chunk_size); Ömer Ömer Sinan Ağacan , 21 Haz 2018 Per, 13:42 tarihinde şunu yazdı: > > > Large objects can only be primitive objects, like MUT_ARR_PTRS, allocated by > > the RTS, and none of these have SRTs. > > Is is not possible to allocate a large STACK? I'm currently ob

Re: Scavenging SRTs in scavenge_one

2018-06-22 Thread Ömer Sinan Ağacan
tack() which traverses > the stack frames, including their SRTs. > > So I don't understand what's going wrong for you - how are the SRTs not being > traversed? > > Cheers > Simon > > On 21 June 2018 at 11:58, Ömer Sinan Ağacan wrote: >> >> Her

Any ways to test a GHC build against large set of packages (including test suites)?

2018-08-06 Thread Ömer Sinan Ağacan
Hi, I'd like to test some GHC builds + some compile and runtime flag combinations against a large set of packages by building them and running test suites. For this I need - A set of packages that are known to work with latest GHC - A way to build them and run their test suites (if I could

Re: Any ways to test a GHC build against large set of packages (including test suites)?

2018-08-09 Thread Ömer Sinan Ağacan
-x86_64-linux/latest/bindist.tar.xz Ömer Ömer Sinan Ağacan , 7 Ağu 2018 Sal, 23:28 tarihinde şunu yazdı: > > Thanks for both suggestions. I'll try both and see which one works better. > > Ömer > > Manuel M T Chakravarty , 7 Ağu 2018 Sal, 18:15 > tarihinde şunu y

Re: Any ways to test a GHC build against large set of packages (including test suites)?

2018-08-09 Thread Ömer Sinan Ağacan
Ah, I now realize that that command is supposed to print that output. I'll continue following the steps and keep you updated if I get stuck again. Ömer Ömer Sinan Ağacan , 9 Ağu 2018 Per, 13:20 tarihinde şunu yazdı: > > Hi Manuel, > > I'm trying stackage-head. I'm followi

Re: Any ways to test a GHC build against large set of packages (including test suites)?

2018-08-07 Thread Ömer Sinan Ağacan
the GHC DevOps group. Have a look at > > https://github.com/tweag/stackage-head > > and also the blog post from when the first version went live: > > https://www.tweag.io/posts/2018-04-17-stackage-head-is-live.html > > Cheers, > Manuel > > > Am 06.08.2

Re: Can't build 8.6.1-beta1 with debugging.

2018-08-14 Thread Ömer Sinan Ağacan
Hi Mateusz, > /usr/bin/ld.gold: error: cannot find -lHSrts_thr_debug_p We currently don't ship GHC with profiling + debug + threaded runtime. See my previous email on this: https://mail.haskell.org/pipermail/ghc-devs/2018-July/015982.html I show a way to enable these runtimes in

Re: Any ways to test a GHC build against large set of packages (including test suites)?

2018-08-10 Thread Ömer Sinan Ağacan
blocks 82 packages (I don't know if that's counting transitively or just packages that are directly blocked by stm). Any ideas about this? Ömer Ömer Sinan Ağacan , 9 Ağu 2018 Per, 14:45 tarihinde şunu yazdı: > > Ah, I now realize that that command is supposed to print that output. I'll >

Re: How to test master after breaking changes

2018-08-10 Thread Ömer Sinan Ağacan
Hi Artem, I think currently the best you could do is to clone primitive's git repo locally and install it from there, using `cd primitive; cabal install --with-ghc=...`. Note that you can run the test suite without these dependencies. The driver skips the test if a dependency is not found. See

Re: Any ways to test a GHC build against large set of packages (including test suites)?

2018-08-10 Thread Ömer Sinan Ağacan
es stm-2.4.5.0. I wonder if there's > anything that can be done about this. Apparently stm blocks 82 packages (I > don't know if that's counting transitively or just packages that are directly > blocked by stm). Any ideas about this? > > Ömer > > Ömer Sinan Ağacan , 9 Ağu 2018 Per

Re: Build entirely broken

2018-08-22 Thread Ömer Sinan Ağacan
I wonder if this could be a problem with your tree? I just did git pull git submodule update --init make distclean ./boot ./configure make and it worked. Note that I tried with "quick" build flavor. Ömer Simon Peyton Jones via ghc-devs , 22 Ağu 2018 Çar, 13:12 tarihinde

Write barrier for stack updates?

2018-07-17 Thread Ömer Sinan Ağacan
Hi Simon, I'm a bit confused about stack updates in generated code and write barriers. Because stacks are mutable (we push new stuff or maybe even update existing frames?) it seems to me that we need one these two, similar to other mutable objects: - Always keep all stacks in mut_lists - Add

Re: Write barrier for stack updates?

2018-07-18 Thread Ömer Sinan Ağacan
the stack clean, then it will be marked dirty > again by the scheduler before we start running it. > > Cheers > Simon > > On 17 July 2018 at 20:45, Ömer Sinan Ağacan wrote: >> >> Hi Simon, >> >> I'm a bit confused about stack updates in generated code a

isAlive() too conservative -- does it cause leaks?

2018-07-19 Thread Ömer Sinan Ağacan
Hi Simon, Currently isAlive considers all static closures as being alive. The code: // ignore static closures // // ToDo: This means we never look through IND_STATIC, which means // isRetainer needs to handle the IND_STATIC case rather than // raising an error. // //

Re: isAlive() too conservative -- does it cause leaks?

2018-07-19 Thread Ömer Sinan Ağacan
I created https://ghc.haskell.org/trac/ghc/ticket/15417 for this. Ömer Simon Marlow , 19 Tem 2018 Per, 13:52 tarihinde şunu yazdı: > > On 19 July 2018 at 11:09, Ömer Sinan Ağacan wrote: >> >> Hi Simon, >> >> Currently isAlive considers all static clo

Re: Running GHC 7.10.2 on Ubuntu 18.04 ?

2018-09-05 Thread Ömer Sinan Ağacan
Thanks, that worked! Ömer Vanessa McHale , 5 Eyl 2018 Çar, 17:35 tarihinde şunu yazdı: > GHC 7.10.3 works fine for me when I use the hvr ppa > https://launchpad.net/~hvr/+archive/ubuntu/ghc > > On 09/05/2018 09:23 AM, Ömer Sinan Ağacan wrote: > > Hi, > > I'm trying to us

Running GHC 7.10.2 on Ubuntu 18.04 ?

2018-09-05 Thread Ömer Sinan Ağacan
Hi, I'm trying to use GHC 7.10.2 (the Debian 8 bindist from haskell.org) on Ubuntu 18.04. It's currently failing with linker errors when I compile `main = return ()`: /usr/bin/x86_64-linux-gnu-ld:

New slow validate errors

2018-04-08 Thread Ömer Sinan Ağacan
Hi, I see a lot of these errors in slow validate using current GHC HEAD: ghc: panic! (the 'impossible' happened) (GHC version 8.5.20180407 for x86_64-unknown-linux): Each block should be reachable from only one ProcPoint This wasn't happening ~10 days ago. I suspect it may be

Re: ZuriHac 2018 GHC DevOps track - Request for Contributions

2018-04-08 Thread Ömer Sinan Ağacan
Hi, I'd also be happy to help. At the very least I can be around as a mentor, but if I can find a suitable hask I may also host a hacking session. Ömer 2018-04-08 16:01 GMT+03:00 Michal Terepeta : > On Sat, Apr 7, 2018 at 3:34 PM Niklas Hambüchen wrote:

Why does the RTS run GC right before shutting down?

2018-04-06 Thread Ömer Sinan Ağacan
Hi, I'm wondering why we run GC in this line: https://github.com/ghc/ghc/blob/master/rts/Schedule.c#L2670 I went back in commit history using git blame and found the commit that introduced that line (5638488ba28), but it didn't help. Does anyone know why we need that line? Thanks, Ömer

Re: Why does the RTS run GC right before shutting down?

2018-04-06 Thread Ömer Sinan Ağacan
We already run all finalizers after exitScheduler: https://github.com/ghc/ghc/blob/master/rts/RtsStartup.c#L382-L388 so no need to run GC for that. Ömer 2018-04-06 17:06 GMT+03:00 Edward Z. Yang : > I believe it's so that we can run finalizers before shutdown. > > Excerpts from

Re: Phabricator new behavior regarding submitting patches for reviews

2018-03-30 Thread Ömer Sinan Ağacan
Thanks Ben. Is there anything I can do about the existing tickets stuck in "draft" state? Ömer 2018-03-30 17:41 GMT+03:00 Ben Gamari <b...@well-typed.com>: > Ömer Sinan Ağacan <omeraga...@gmail.com> writes: > >> Hi, >> >> One of the changes wit

Re: Question about indirectees of BLACKHOLE closures

2018-03-29 Thread Ömer Sinan Ağacan
I still don't understand the whole story with blackholes but I'll update the comments around the BLACKHOLE stack frame and/or wiki pages once I get a better understanding. Ömer 2018-03-26 21:47 GMT+03:00 Ben Gamari : > Simon Marlow writes: > >> The

Curious demand in a function parameter

2018-03-25 Thread Ömer Sinan Ağacan
Hi, In this program {-# LANGUAGE MagicHash #-} module Lib where import Control.Exception import GHC.Exts import GHC.IO data Err = Err deriving (Show) instance Exception Err f :: Int -> Int -> IO Int f x y | x > 0 = IO (raiseIO# (toException Err))

Re: 8.5 build failure

2018-04-03 Thread Ömer Sinan Ağacan
Does the error go away if you restart the build without cleaning? I had the same error on my nightly builder, but it worked when I restarted the build. Ömer 2018-04-03 18:06 GMT+03:00 John Leo : > Hi everyone, > > I pulled from head this morning and rebased my current work on

Re: Phabricator new behavior regarding submitting patches for reviews

2018-03-30 Thread Ömer Sinan Ağacan
> I assume you worked this out? I think you can just "request review" in > the actions menu at the bottom of the page. This seems to work, although it's still one extra step compared to the previous version. Ömer 2018-03-30 21:04 GMT+03:00 Ben Gamari <b...@well-typed.com>

What does "return" keyword mean in INFO_TABLE_RET declarations?

2018-03-18 Thread Ömer Sinan Ağacan
Hi, I'm trying to understand what a "return" list in INFO_TABLE_RET declaration line specifies. As far as I understand a "return" in the declaration line is something different than a "return" in the body. For example, in this definition: (in HeapStackCheck.cmm) INFO_TABLE_RET ( stg_ret_p,

Re: What does "return" keyword mean in INFO_TABLE_RET declarations?

2018-03-19 Thread Ömer Sinan Ağacan
the transaction is valid). > > Hope that helps, > Rahul > > On Sun, Mar 18, 2018 at 8:18 PM, Ömer Sinan Ağacan <omeraga...@gmail.com> > wrote: >> >> Hi, >> >> I'm trying to understand what a "return" list in INFO_TABLE_RET >> declaration &

Re: Is "cml_cont" of CmmCall used in practice?

2018-03-18 Thread Ömer Sinan Ağacan
Hi Shao, Perhaps not in the Cmm output generated for your programs, but it's definitely used in the code generator. See e.g. `lowerSafeForeignCall` and `blockCode` which set the field with `Just`. The former seems to be related with foreign calls so perhaps try compiling a FFI package.

Question about indirectees of BLACKHOLE closures

2018-03-20 Thread Ömer Sinan Ağacan
Hi, I've been looking at BLACKHOLE closures and how the indirectee field is used and I have a few questions: Looking at evacuate for BLACKHOLE closures: case BLACKHOLE: { StgClosure *r; const StgInfoTable *i; r = ((StgInd*)q)->indirectee; if

Re: What does "return" keyword mean in INFO_TABLE_RET declarations?

2018-03-20 Thread Ömer Sinan Ağacan
.y module: > https://phabricator.haskell.org/diffusion/GHC/browse/master/compiler/cmm/CmmParse.y;b3b394b44e42f19ab7c23668a4008e4f728b51ba$151-165 > > It wouldn't hurt to move all that to the wiki and leave a link behind, if > anyone wants to do that. > > Cheers > > Simon >

Re: Question about indirectees of BLACKHOLE closures

2018-03-23 Thread Ömer Sinan Ağacan
+03:00 Simon Marlow <marlo...@gmail.com>: > Added comments: https://phabricator.haskell.org/D4517 > > On 20 March 2018 at 14:58, Simon Marlow <marlo...@gmail.com> wrote: >> >> Hi Omer, >> >> On 20 March 2018 at 13:05, Ömer Sinan Ağacan <omeraga...

Shall we make -dsuppress-uniques default?

2018-10-05 Thread Ömer Sinan Ağacan
I asked this on IRC and didn't hear a lot of opposition, so as the next step I'd like to ask ghc-devs. I literally never need the details on uniques that we currently print by default. I either don't care about variables too much (when not comparing the output with some other output), or I need

Why align all pinned array payloads on 16 bytes?

2018-10-11 Thread Ömer Sinan Ağacan
Hi, I just found out we currently align all pinned array payloads to 16 bytes and I'm wondering why. I don't see any comments/notes on this, and it's also not part of the primop documentation. We also have another primop for aligned allocation: newAlignedPinnedByteArray#. Given that alignment

Re: Why align all pinned array payloads on 16 bytes?

2018-10-22 Thread Ömer Sinan Ağacan
Thanks for all the answers. Another surprising thing about the pinned object allocation primops is that the aligned allocator allows alignment to bytes, rather than to words (the documentation doesn't say whether it's words or bytes, but it can be seen from the code that it's actually aligning to

Re: [ANNOUNCE] GHC 8.4.4 released

2018-10-27 Thread Ömer Sinan Ağacan
Hi all, Just a quick update about #16969. The primop itself is buggy in 8.4 (and it should be buggy even in older versions -- although I haven't confirmed this) and 2 of the 3 regressions added for it currently fail with GHC 8.4.4. I don't know what the plan is for fixing it in 8.4, Ben may say

Re: [ANNOUNCE] GHC 8.4.4 released

2018-10-27 Thread Ömer Sinan Ağacan
Sorry for the typos in my previous email. #16969 -> #15696 (https://ghc.haskell.org/trac/ghc/ticket/15696) regressions -> regression tests Phab:5201 -> Phab:D5201 (https://phabricator.haskell.org/D5201) By "the primop" I mean dataToTag#. Ömer Ömer Sinan Ağacan , 27

Re: Validate on master broken.

2018-11-15 Thread Ömer Sinan Ağacan
This was also reported as #15900. Ömer Simon Peyton Jones via ghc-devs , 16 Kas 2018 Cum, 02:33 tarihinde şunu yazdı: > > Bother -- my fault. Sorry about that. I should have > thought of Haddock. > > Thanks for fixing. > > Simon > > | -Original Message- > | From: ghc-devs On Behalf Of

Using same stdout/stderr files for multiple tests?

2018-11-16 Thread Ömer Sinan Ağacan
I have a test that I want to run with different compile and runtime parameters. I managed to reuse the source file across different tests by adding a extra_files(['source.hs']) to the tests, but I don't know how to do the same for stdout/stderr files. Any ideas? In more details, I have

Re: Validate on master broken.

2018-11-16 Thread Ömer Sinan Ağacan
4efd1b487e fixed the build but the test T15898 now fails when run in ghci way. Ömer Ömer Sinan Ağacan , 16 Kas 2018 Cum, 07:39 tarihinde şunu yazdı: > > This was also reported as #15900. > > Ömer > > Simon Peyton Jones via ghc-devs , 16 Kas 2018 > Cum, 02:33 tarihinde şunu

Unused RTS symbols disappearing in some flavors?

2018-11-14 Thread Ömer Sinan Ağacan
Hi, When I build RTS with flavors other than quick (and maybe others) unused symbols get removed, which makes debugging harder. Does anyone know what setting to add to build.mk to make sure symbols won't be removed? Ideally I should be able to add one line at the end of build.mk and the symbols

nofib oldest GHC to support?

2018-09-30 Thread Ömer Sinan Ağacan
Do we have a policy on the oldest GHC to support in nofib? I'm currently doing some hacking on nofib to parse some new info printed by a modified GHC, and I think we can do a lot of cleaning (at the very least remove some regexes and parsers) if we decide on which GHCs to support. I checked the

Re: [Haskell] [ANNOUNCE] GHC 8.6.1 released

2018-09-22 Thread Ömer Sinan Ağacan
Thanks to everyone involved with the release! It's a bit sad that we don't have DWARF bindists this time (we had those for 8.4.2 and 8.4.3). DWARF builds make debugging GHC much easier, and because runtime panics also include stack traces in DWARF builds tickets reported for those bindists tend

Re: Heap allocation in the RTS

2018-09-20 Thread Ömer Sinan Ağacan
urrent capability to pass to that? I guess I > should probably perform a heap check before calling lookupSta bleName for > simplicity, at least to start. > > On Thu, Sep 20, 2018, 5:16 AM Ömer Sinan Ağacan wrote: >> >> Have you seen Storage.c:allocateMightFail ? >> >&g

Re: Heap allocation in the RTS

2018-09-20 Thread Ömer Sinan Ağacan
doubt it'll be expensive enough to > really matter here. > > On Thu, Sep 20, 2018, 5:42 AM Ömer Sinan Ağacan wrote: >> >> allocateMightFail allocates new nursery blocks as long as you don't hit the >> heap limit, so it returns NULL less often than you might think. In >&g

Re: Heap allocation in the RTS

2018-09-20 Thread Ömer Sinan Ağacan
is triggered). Ömer David Feuer , 20 Eyl 2018 Per, 12:34 tarihinde şunu yazdı: > > If it returns NULL, then I need to back off what I'm doing and trigger a GC. > How do I do the latter? > > On Thu, Sep 20, 2018, 5:31 AM Ömer Sinan Ağacan wrote: >> >> allocateMightFail

<    1   2   3   4   >