Re: More teststuite woes

2018-11-18 Thread Ömer Sinan Ağacan
This isprobably not the same problem, but I also started to get an error today when running the test suite. I think the problem is with the test runner because if I directly run the test command that the test runner prints the test works as expected. Error reported during validate:

Better DWARF info for Cmm procedures?

2019-01-05 Thread Ömer Sinan Ağacan
Hi, Currently debugging Cmm is a bit painful because we don't have enough debug information to map assembly to Cmm lines, so I have do the mapping manually. However I realized that when building .cmm files we actually generates some debug information, in form of "ticks": //tick src

Re: Better DWARF info for Cmm procedures?

2019-01-06 Thread Ömer Sinan Ağacan
o generate debug info for each Cmm source line, instead of each RawCmm block? Ömer Ben Gamari , 6 Oca 2019 Paz, 14:47 tarihinde şunu yazdı: > > Ömer Sinan Ağacan writes: > > > Hi, > > > > Currently debugging Cmm is a bit painful because we don't have enough debug > >

Bug in "changes" tab in Gitlab

2019-01-15 Thread Ömer Sinan Ağacan
Hi, I think there's a currently a bug in "changes" tab in gitlab. If you look at [1] it shows as if I added a new line in `Main.hs`, but actually I just changed one word: diff --git a/utils/genapply/Main.hs b/utils/genapply/Main.hs index 71b84fde79..7038dc5c09 100644 ---

Re: Using same stdout/stderr files for multiple tests?

2019-01-22 Thread Ömer Sinan Ağacan
I have to use a make rule. Ömer Ben Gamari , 23 Oca 2019 Çar, 02:44 tarihinde şunu yazdı: > > Ömer Sinan Ağacan writes: > > > I have a test that I want to run with different compile and runtime > > parameters. > > I managed to reuse the source file acros

Re: Residency profiles

2018-12-06 Thread Ömer Sinan Ağacan
ugh to do wouldn’t it?  Just give only 10k or 100k or 1M to the allocator when setting it running again. Would you consider this?  Or are we just missing something obvious? Needless to say, we want to do all this with full optimisation on, no cost-centre profiling. Thanks Simon -- Ömer

How to distinguish local ids from imported ones in Stg? Confused about isLocalId/isLocalVar

2018-11-20 Thread Ömer Sinan Ağacan
Hi, I just found out that semantics of isLocalId/isLocalVar change during compilation. I realized this the hard way (after some debugging) but later realized that this is documented in this note: (the last line) Note [GlobalId/LocalId] ~~~ A GlobalId is *

Re: [GHC DevOps Group] Welcome to GitLab!

2019-01-07 Thread Ömer Sinan Ağacan
> submodules are still pulling from git.haskell.org, is there an easy way to > fix that? `git submodule sync` should fix that. Ömer Simon Marlow , 7 Oca 2019 Pzt, 11:42 tarihinde şunu yazdı: > > Congrats Ben and co! This is a huge step forwards. > > On Thu, 27 Dec 2018 at 06:27, Ben Gamari

Re: GitLab forks and submodules

2019-01-07 Thread Ömer Sinan Ağacan
while making the case of contributing patches with submodule changes more difficult I don't understand this, can you give an example of what absolute paths make harder? Looking at the wiki pages and scripts we need to make relative paths work for everyone, I think it's clear that absolute

Building dictionary terms in Core?

2019-01-06 Thread Ömer Sinan Ağacan
Hi, In #15646 (recent discussion in Gitlab MR 55) we need dictionary arguments in Core (in desugarer) to apply to functions like `fromRational :: Fractional a => Rational -> a`, but we don't know how to build the dictionary term (`Fractional a`) in Core. Can anyone who know help us in the MR?

Re: GitLab forks and submodules

2019-01-08 Thread Ömer Sinan Ağacan
> As I mention in the documentation, those with commits bits should feel > free to push branches to ghc/ghc. This is sometimes not ideal as it wastes GHC's CI resources. For example I make a lot of WIP commits to my work branches, and I don't want to keep CI machines busy for those. Ömer Ben

Re: Feedback request: GHC performance test-suite

2018-09-13 Thread Ömer Sinan Ağacan
Thanks for doing this. I think it's great that someone's working on the test suite. About storing in git notes: what is the format here? If I want to see numbers for a given commit does `git notes show ` show me all the numbers at that commit or only the differences from previous commit? Do we

Introducing bugs that are caught by slow validate?

2019-04-04 Thread Ömer Sinan Ağacan
Hi all, I just run slow validate and it actually catches bugs (#16529) and some configuration problems in the test definitions (#!700). These are not caught by the CI jobs because they run normal validate instead of slow. (Actually they don't even run the validate script, but they run "test"

Can Gitlab's "issue was closed by ..." mails be improved?

2019-04-04 Thread Ömer Sinan Ağacan
Hi, Currently Gitlab doesn't give any details of why an issue was closed, it just says "Issue was closed by ...". You have to go to the issue page to see that it was closed because of a closing merge request was merged. I'm wondering if this could be improved so that in the email it says "issue

Re: gitlab.haskell.org is down

2019-03-29 Thread Ömer Sinan Ağacan
I'm still getting 500. Ömer Ben Gamari , 29 Mar 2019 Cum, 00:46 tarihinde şunu yazdı: > > Ben Gamari writes: > > > Shayne Fletcher via ghc-devs writes: > > > >> Hi, > >> > >> It seems gitlab.haskell.org has been down since around 17:30 GMT. Outage? > >> > > Yes, I just sent notification of

Re: Can't build HEAD with the old build system

2019-03-31 Thread Ömer Sinan Ağacan
Yeah I can reproduce it reliably. I tried a few `git clean -xfd`s, and tried with no build.mk and with a debug build.mk, it happened with all configurations, when building the same file (the hsc2hs executable). The repro is simple: clone the GHC repo, build at 6f7115dfd4. If this doesn't

Re: Can't build HEAD with the old build system

2019-04-01 Thread Ömer Sinan Ağacan
t;hs_atomic_nand64", "-u", > "hs_atomic_or8", "-u", "hs_atomic_or16", "-u", "hs_atomic_or32", "-u", > "hs_atomic_or64", "-u", "hs_atomic_xor8", "-u", "hs_atomi

Re: Can't build HEAD with the old build system

2019-03-31 Thread Ömer Sinan Ağacan
I was able to build with the system linker instead of gold.ld (configure with --disable-ld-override). I guess I triggered a gold.ld bug. Ömer Takenobu Tani , 31 Mar 2019 Paz, 16:19 tarihinde şunu yazdı: > > Hi, > > At least I was able to build with old build system in my Ubuntu on Friday. > >

Can't build HEAD with the old build system

2019-03-31 Thread Ömer Sinan Ağacan
I just updated a few-days-old repo and `make` no longer works: $ make ===--- building phase 0 make --no-print-directory -f ghc.mk phase=0 phase_0_builds make[1]: Nothing to be done for 'phase_0_builds'. ===--- building phase 1 make --no-print-directory -f ghc.mk phase=1

Re: Haddock tree spongled

2019-03-06 Thread Ömer Sinan Ağacan
I just pulled master and `git submodule update` worked. Have you done `git submodule sync` after updating your remotes to point to Gitlab? I'd try doing that and then `git submodule update --init` again afterwards. Ömer Simon Peyton Jones via ghc-devs , 6 Mar 2019 Çar, 12:57 tarihinde şunu

Re: [Haskell-cafe] Final steps in GHC's Trac-to-GitLab migration

2019-03-05 Thread Ömer Sinan Ağacan
This look great, thanks to everyone involved! Some feedback: - When I click to the "Wiki" link on the left it opens "Home" page and I don't know how to go to the index from there. I think we may want index to be the home page for the wiki? - Redirects don't seem to work:

Re: GitLab forks and submodules

2019-02-16 Thread Ömer Sinan Ağacan
Sorry for reviving this thread, but this is causing so much trouble for me. I want a fresh clone of a GHC fork. If I clone the fork it doesn't work for reasons mentioned in this thread, however I just realized that it doesn't work even if I fork gitlab/ghc/ghc and then add the fork as a new

How do I find out which info table a continuation belongs to?

2019-02-09 Thread Ömer Sinan Ağacan
I'm currently working on a bug and one of the things I often want to know is what's on the stack. The problem is I can't see labels of continuations so the information is really useless. Example: >>> call printStack(((StgTSO*)0x42000e0198)->stackobj) 0x42000c8788: RET_SMALL (0x512d70)

Re: How do I find out which info table a continuation belongs to?

2019-02-10 Thread Ömer Sinan Ağacan
address corresponds to a temporary symbol like `.L1234`. Perhaps you > need to compile with -g to make this work, I'm not sure. > > On Sun, 10 Feb 2019 at 07:50, Ömer Sinan Ağacan wrote: >> >> I'm currently working on a bug and one of the things I often want to kno

Re: Min closure payload size?

2019-02-05 Thread Ömer Sinan Ağacan
gt; > Gabor > > On 2/5/19, Ömer Sinan Ağacan wrote: > > I just came across a closure that is according to this code is not valid: > > > > >>> print *get_itbl(0x7b2870) > > $8 = { > > layout = { > > payload = { > >

Re: Cmm code of `id` function referring to `breakpoint`?

2019-02-05 Thread Ömer Sinan Ağacan
That's because of the CSE (common subexpression elimination) pass. Here's an example: module Lib where foo :: a -> a foo x = x bar :: a -> a bar x = x Build with -O -ddump-stg and you'll see something like: Lib.foo :: forall a. a -> a [GblId, Arity=1,

Min closure payload size?

2019-02-04 Thread Ömer Sinan Ağacan
Hi, I was trying to understand why some info tables that have no ptrs and nptrs like GCD_CAF end up with 1 nptrs in the generated info table and found this code in Constants.h: /* - Minimum closure sizes

Re: Min closure payload size?

2019-02-05 Thread Ömer Sinan Ağacan
ffset = 0, selector_offset = 0 }, type = 21, srt = 3856568, code = 0x404ef0 "H\215E\360L9\370rDH\203\354\bL\211\350H\211\336H\211\307\061\300\350|\034\062" } This is a THUNK_STATIC with 0 ptrs and nptrs in the payload. Ömer Ömer Sinan Ağacan , 4

Re: Strange behavior of "-with-rtsopts=-T

2019-06-06 Thread Ömer Sinan Ağacan
Hi Vlatko, Unless this is a side effect of calling getrusage() (perhaps it causes the OS to update stats) I don't see how this is possible. Your reproducer seems to require postgres so I'm unable to run it. If you can provide a version that doesn't need postgres I can take a look. Ömer Vlatko

Re: Old build system broken

2019-05-09 Thread Ömer Sinan Ağacan
> If you do a fresh checkout and build, the problem should go away. You can also do `git clean -xfd`. Ömer Richard Eisenberg , 8 May 2019 Çar, 23:33 tarihinde şunu yazdı: > > Some discussion on IRC with @Ericson2314 reveals that make maintainer-clean > is not deleting settings files, which

Re: Question about Gitlab MR workflow.

2019-05-09 Thread Ömer Sinan Ağacan
Hi, > About 4: I really don't understand how this rebasing business is intended to > work: every time I rebase, I new CI job is fired up. But, presumably, while > this is going, other things are going to be merged with `master`, so I'd need > to rebase again. So, when would I ever stop

Re: ZuriHac 2019 - GHC Track

2019-05-01 Thread Ömer Sinan Ağacan
I'll also be there and I'd be happy to help with general GHC development or more specifically RTS or STG parts of the compiler. Ömer Richard Eisenberg , 30 Nis 2019 Sal, 19:43 tarihinde şunu yazdı: > > I'm also happy to lead a session on GHC. I could perhaps give a high-level > overview (no

Locations in the codegen where we assume pointers tagged with certain values?

2019-04-27 Thread Ömer Sinan Ağacan
Hi all, I'm trying to find all places in the code generator where we assume that a pointer is tagged with a certain value. A generated code for this looks like this: mov0x6(%rbx),%rax This moves payload[0] of the closure in %rbx to %rax, but it assumes that %rbx is tagged with 2 so it

Why not short out IND_STATICs in the GC?

2019-04-27 Thread Ömer Sinan Ağacan
Hi Simon, I'm wondering why in the GC we don't short out IND_STATICs like we do in INDs and BLACKHOLEs. Is there a reason for that? In this code in evacuate(): case IND_STATIC: evacuate_static_object(IND_STATIC_LINK((StgClosure *)q), q); return; Why not do something

Re: Keeping track of issues

2019-05-07 Thread Ömer Sinan Ağacan
Hi Simon, > Well, scrolling up from the bottom, apparently it was mentioned in no fewer > than six patches. That’s odd. Why is this issue mentioned in six patches? That's because Marge got stuck for some reason (I think related to but in Gitlab API, but I'm not sure) and couldn't merge the

Re: How do I find out which info table a continuation belongs to?

2019-05-02 Thread Ömer Sinan Ağacan
%rbx,(%r12) movl $True_closure+2,%edi Once I found the code in the asm dump I can map addresses to symbols 0x405058 -> sat_s6gH_info 0x8c7a98 -> True_closure Ömer Ömer Sinan Ağacan , 24 Nis 2019 Çar, 12:58 tarihinde şunu yazdı: > > Bumping thread, this is still a problem f

Re: Locations in the codegen where we assume pointers tagged with certain values?

2019-04-27 Thread Ömer Sinan Ağacan
> Also, did you check that the tag we apply to the closure pointer matches the > tag that the info table defines? Yep, see my update in the Gitlab issue. Ömer Ben Gamari , 27 Nis 2019 Cmt, 16:51 tarihinde şunu yazdı: > > Ömer Sinan Ağacan writes: > > > Hi all, > >

Workflow question (changing codegen)

2019-06-28 Thread Ömer Sinan Ağacan
Hi all, I'm currently going through this torturous process and I'm hoping that someone here will be able to help. I'm making changes in the codegen. My changes are currently buggy, and I need a working stage 1 compiler to be able to debug. Basically I need to build libraries using the branch my

Re: Weight field in issues too fine grained?

2019-07-02 Thread Ömer Sinan Ağacan
I think we may want two different weights "high" and "highest". - Highest: regressions, incorrect results, runtime panics/crashes. These are release blockers. - High: other bugs Other than that this sounds good to me. I don't remember how many kinds of priorities we had in trac but IIRC it

Marge bot UX improvement suggestion

2019-04-25 Thread Ömer Sinan Ağacan
I think it'd be useful if Marge listed commits that it's trying to merge in the description of the MR so that we could get a list of commits in the emails. Currently the emails just say "Marge Bot Barch MR - DO NOT TOUCH" with an empty body. Ömer ___

Re: How do I find out which info table a continuation belongs to?

2019-04-24 Thread Ömer Sinan Ağacan
ipped some auto generated symbols from the symtab but they can still be > found in dwarf section. I don't know how to force gdb to show them but you > can manually check via dwarfdump. > ____ > From: Ömer Sinan Ağacan > Sent: Sunday, February 10, 2019 6:45 P

Weight field in issues too fine grained?

2019-07-02 Thread Ömer Sinan Ağacan
Hi, One of the problems I'm having when triaging is that I think the "weight" field for issues is currently too fine grained. The triage protocol[1] gives some idea but it's still up to the person who's doing triaging to decide, for example, between 7 vs. 10 for a runtime crash. I think a better

Re: Workflow question (changing codegen)

2019-07-01 Thread Ömer Sinan Ağacan
. Avoiding any of these (updating compiler version, or having to run configure when adding new files) would make this much easier. Ömer Ömer Sinan Ağacan , 28 Haz 2019 Cum, 12:09 tarihinde şunu yazdı: > > Hi all, > > I'm currently going through this torturous process and I'm hoping

Gitlab's disk full again

2019-08-10 Thread Ömer Sinan Ağacan
Hi, Just yesterday Gitlab was giving 500 because the disk was full. Ben deleted some files, but in less than 24h it's full again. This started happening regularly, I wonder if we could do something about this. The reason this time seems to be that Gitlab started generating 22G-large backups

Re: Gitlab's disk full again

2019-08-11 Thread Ömer Sinan Ağacan
/h6ppx34ccb3binw7awbphaicv5q938z5-ruby2.5.5-prometheus-client-mmap-0.9.8/lib/ruby/gems/2.5.0/gems/prometheus-client-mmap-0.9.8/lib/prometheus/client/mmaped_dict.rb:42: [BUG] Bus Error at 0x7fe3cd6f6000 Ömer Ömer Sinan Ağacan , 10 Ağu 2019 Cmt, 11:48 tarihinde şunu yazdı: > > Hi, > > Just yesterday Gitla

Re: How do I find out which info table a continuation belongs to?

2019-09-02 Thread Ömer Sinan Ağacan
Fixed in https://gitlab.haskell.org/ghc/ghc/merge_requests/1654 Ömer Ömer Sinan Ağacan , 10 Şub 2019 Paz, 10:49 tarihinde şunu yazdı: > > I'm currently working on a bug and one of the things I often want to know is > what's on the stack. The problem is I can't see labels of continu

Re: IntRep etc

2019-09-04 Thread Ömer Sinan Ağacan
Hi all, > !1381/#16893: inline unsafeCoerce# in CorePrep The problem with !1381 is that it reveals a coercion accepted by CoreLint but rejected by an assertion later in the compilation. The coercion casts an Int# to Int64#, which is fine on a 64-bit system. One way to fix this is by fixing

Re: Min closure payload size?

2019-09-11 Thread Ömer Sinan Ağacan
https://gitlab.haskell.org/ghc/ghc/merge_requests/1701 Ömer Ömer Sinan Ağacan , 10 Eyl 2019 Sal, 15:14 tarihinde şunu yazdı: > > It took 7 months to figure this one out. The compacting GC (which is enabled > by > default when heap residency is above 30%) needs two bits per

Re: Min closure payload size?

2019-09-10 Thread Ömer Sinan Ağacan
eSize# True)) This now prints 1 instead of 2 as before. Ömer Ömer Sinan Ağacan , 4 Şub 2019 Pzt, 16:23 tarihinde şunu yazdı: > > Hi, > > I was trying to understand why some info tables that have no ptrs and nptrs > like > GCD_CAF end up with 1 nptrs in the

Tracking issues for GHC proposals?

2019-07-24 Thread Ömer Sinan Ağacan
Hi all, It's currently quite hard to see progress of proposals. For example, I'm looking at the "small primitives" proposal [1]. After some digging I can see that it's mostly (if not completely) implemented [2, 3], but finding all this takes time. I think it'd make sense to create a tracking

What's preventing inlining GHC.Magic.lazy?

2019-07-17 Thread Ömer Sinan Ağacan
Hi Simon, I'm trying to understand what's preventing inlining GHC.Magic.lazy. I can see with -ddump-simpl -ddump-simpl-iterations -ddump-prep that we only eliminate it in CorePrep, so it's preserved during simplifications and tidying, but I don't see how. It doesn't have a NOINLINE pragma, and we

Re: What's preventing inlining GHC.Magic.lazy?

2019-07-17 Thread Ömer Sinan Ağacan
olding in > the definition of `lazyId` in `MkId`. > > The definition in `GHC.Magic` is just for documentation I think. > > Cheers, > > Matt > > On Wed, Jul 17, 2019 at 8:46 AM Ömer Sinan Ağacan > wrote: > > > > Hi Simon, > > > > I'm trying to understa

Re: Typing rules for Haskell

2019-07-25 Thread Ömer Sinan Ağacan
Nice! Perhaps I should revive my or-patterns proposal now. The main problem (IIRC) was that I had to give a rather large subset of Haskell (that includes pattern matching) typing rules to show typing rules of or-patterns. Now that that part is done perhaps I can find the time for the rest. Ömer

Implementing code ownership?

2019-11-09 Thread Ömer Sinan Ağacan
Hi, In the thread "Proposed changes to merge request workflow" I agree with Matt that expecting a contributor to find reviewers will not work. I'm wondering if we implemented code ownership better it would somewhat help with the problem. If we had at least one responsive owner for every file

DriverPipeline/HscMain DynFlags mystery

2019-10-31 Thread Ömer Sinan Ağacan
Hi, We recently did some refactoring in HscMain and DriverPipeline to generate interfaces after final Cmms are generated (previously interfaces would be generated after the tidying pass). It's mostly done but there's one thing that I couldn't figure out after two full days of debugging (I also

Re: DriverPipeline/HscMain DynFlags mystery

2019-10-31 Thread Ömer Sinan Ağacan
e5e014b0cb2 It's not the smallest patch that demonstrates, but hopefully it's small enough. Ömer Ben Gamari , 1 Kas 2019 Cum, 03:40 tarihinde şunu yazdı: > > On October 31, 2019 2:45:09 PM EDT, "Ömer Sinan Ağacan" > wrote: > >Hi, > > > >We recently did some refact

Problem with compiler perf tests

2019-11-17 Thread Ömer Sinan Ağacan
Hi, Currently we have a bunch of tests in testsuite/tests/perf/compiler for keeping compile time allocations, max residency etc. in the expected ranges and avoid introducing accidental compile time performance regressions. This has a problem: we expect every MR to keep the compile time stats in

Re: Running test with the stage-1 compiler

2019-12-09 Thread Ömer Sinan Ağacan
You can use `sh validate --legacy` to use the old build system. Ömer Simon Peyton Jones via ghc-devs , 9 Ara 2019 Pzt, 12:10 tarihinde şunu yazdı: > > Apparently ‘sh validate’ now uses Hadrian. > > This has broken one of my workflows: > > build the stage1 compiler > cd testsuite/tests > make

Why is libraries/ghci built with stage 0 compiler instead of stage 1?

2019-10-18 Thread Ömer Sinan Ağacan
Stage 1 compiler doesn't have interpreter, and doesn't run plugins or TH, so I think GHCi stuff should not be used by stage 1 compiler, but for some reason the "ghci" library (libraries/ghci) is built with stage 0 compiler instead of stage 1. Anyone know what this is? Thanks, Ömer

Re: Help with debugging a batch mode (or type checker) bug

2019-10-15 Thread Ömer Sinan Ağacan
Just confirmed that this is the problem -- thanks again. Ömer Ömer Sinan Ağacan , 15 Eki 2019 Sal, 10:04 tarihinde şunu yazdı: > > Thanks Simon, > > I can't confirm just yet, because it's impossible to print the Id details in > the > TypeEnv (probably because of some kn

Re: Help with debugging a batch mode (or type checker) bug

2019-10-15 Thread Ömer Sinan Ağacan
Thanks Simon, I can't confirm just yet, because it's impossible to print the Id details in the TypeEnv (probably because of some know-tying somewhere?), but looking at the code I can't see where we update ModDetails returned by hscIncrementalCompile in compileOne' (used by batch mode but not by

Re: How to navigate around the source tree?

2019-10-25 Thread Ömer Sinan Ağacan
`:GFiles` >> command to perform fuzzy search on files which is probably better than >> tags. If anyone else is using NixOS, all I had to do was add the >> `fzf-vim` plugin to the vim configuration. >> >> Cheers, >> >> Matt >> >> On Wed, Oct 23

Re: How to navigate around the source tree?

2019-10-23 Thread Ömer Sinan Ağacan
I use a file finder (fzf) for jumping to files. Because module names follow file paths to jump to e.g. StgToCmmUtils.Utils I usually type `stgcmmutils` and fzf finds the correct file `compiler/GHC/StgToCmm/Utils.hs`. When generating tags I omit module names for this reason, it's easy with a good

-dynamic-too implementation question

2019-11-25 Thread Ömer Sinan Ağacan
Hi, If anyone here knows about how -dynamic-too is implemented feedback in #17502 would be appreciated. As far as I can see it's unnecessarily inefficient currently, and the code is very hard to follow, but it's possible that I'm missing something, and it'd be good to know what before investing

Should coercion binders (arguments or binders in patterns) be TyVars?

2019-10-06 Thread Ömer Sinan Ağacan
Hi, I just realized that coercion binders are currently Ids and not TyVars (unlike other type arguments). This means that we don't drop coercion binders in CoreToStg. Example: {-# LANGUAGE ScopedTypeVariables, TypeOperators, PolyKinds, GADTs, TypeApplications, MagicHash #-}

Re: Should coercion binders (arguments or binders in patterns) be TyVars?

2019-10-06 Thread Ömer Sinan Ağacan
ating point register) at run-time, so you can't erase it. The fact that we > can for newtypes is because `coerce` is basically just the `id` function at > runtime. > > Cheers, > Sebastian > > Am So., 6. Okt. 2019 um 10:28 Uhr schrieb Ömer Sinan Ağacan > : >> >>

Re: Should coercion binders (arguments or binders in patterns) be TyVars?

2019-10-06 Thread Ömer Sinan Ağacan
ble# then you use a primop like int2Double# which does `fild` if necessary. Ömer Ömer Sinan Ağacan , 6 Eki 2019 Paz, 12:55 tarihinde şunu yazdı: > > > I'm not sure if there's a case in GHC (yet, because newtype coercions are > > zero-cost), but coercions in general (as introduced

Re: How to work out why a data constructor is allocated using gdb?

2019-10-04 Thread Ömer Sinan Ağacan
When I'm interested in only one specific object I add a watchpoint to the object's header and then do reverse execution. If it stops at mutator code then I inspect Haskell stack to figure out the Haskell code that it's currently executing (this is currently quite hard, !1654 helps a lot but it

Help with debugging a batch mode (or type checker) bug

2019-10-14 Thread Ömer Sinan Ağacan
Hi, In !1304 I'm currently having a bug where I get correct IdInfos for imported Ids in one-shot mode (-c), but not when I use batch mode (--make). If I add a few prints I can see that in hscIncrementalCompile right before hscIncrementalFrontend the hsc_HPT has the correct IdInfos for the

Re: Confused about PAP object layout

2020-02-26 Thread Ömer Sinan Ağacan
tmap = BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]); p = scavenge_small_bitmap(p, size, bitmap); BITMAP_BITS is the macro that does this. Ömer Ömer Sinan Ağacan , 26 Şub 2020 Çar, 21:48 tarihinde şunu yazdı: > > So the key points from this thread are: > > - PAP payloads a

Reason for skipping sanity checking threads and mut_lists before a GC?

2020-03-03 Thread Ömer Sinan Ağacan
Hi, With `+RTS -DS` we call this function before and after a GC: void checkSanity (bool after_gc, bool major_gc) { checkFullHeap(after_gc && major_gc); checkFreeListSanity(); // always check the stacks in threaded mode, because checkHeap() // does

Re: Confused about PAP object layout

2020-02-26 Thread Ömer Sinan Ağacan
t; > Simon > > > > From: ghc-devs On Behalf Of Simon Marlow > Sent: 24 February 2020 08:22 > To: Ömer Sinan Ağacan > Cc: ghc-devs > Subject: Re: Confused about PAP object layout > > > > On Thu, 20 Feb 2020 at 09:21, Ömer Sinan Ağacan wrote: > >

Bug in SRT generation for procs in .cmm files?

2020-01-22 Thread Ömer Sinan Ağacan
Hi Simon, Currently CmmParse only generates CmmLabels for procs, and those are considered non-CAFFY by hasCAF (and thus CmmBuildInfoTables). As a result if I have two procs in a .cmm file: - p1, refers to a CAF in base - p2, refers to p1 I *think* (haven't checked) we don't consider p1 as

Re: Bug in SRT generation for procs in .cmm files?

2020-01-23 Thread Ömer Sinan Ağacan
if it's nontrivial to fix. > > Cheers, > > - Ben > > On January 23, 2020 1:54:04 AM EST, "Ömer Sinan Ağacan" > wrote: >> >> Hi Simon, >> >> Currently CmmParse only generates CmmLabels for procs, and those are >> considered >> non

Re: Random crashes with memory corruption symptoms

2020-02-03 Thread Ömer Sinan Ağacan
id you use some other > test case? Is there a test-suite in GHC that stresses the threaded runtime? > > -harendra > > On Mon, 3 Feb 2020 at 14:09, Ömer Sinan Ağacan wrote: >> >> In that case it'd be good to move the discussion to Gitlab. Could you file an >>

Re: Random crashes with memory corruption symptoms

2020-02-03 Thread Ömer Sinan Ağacan
resent in 8.8.2 as well. > > On Mon, 3 Feb 2020 at 11:22, Ömer Sinan Ağacan wrote: >> >> You should try with 8.8.2 which fixes a bug in the compacting GC (#17088). >> >> When debugging it's a good idea to use the latest minor release of your GHC >> version (8.8.2

Re: Random crashes with memory corruption symptoms

2020-02-02 Thread Ömer Sinan Ağacan
You should try with 8.8.2 which fixes a bug in the compacting GC (#17088). When debugging it's a good idea to use the latest minor release of your GHC version (8.8.2 in your case), as minor releases fix bugs and usually do not introduce new ones as they don't ship new features. If the problem

Confused about PAP object layout

2020-02-14 Thread Ömer Sinan Ağacan
Hi Simon, In this code: (slightly simplified) StgPtr scavenge_PAP (StgPAP *pap) { evacuate(>fun); return scavenge_PAP_payload (pap->fun, pap->payload, pap->n_args); } StgPtr scavenge_PAP_payload (StgClosure *fun, StgClosure **payload, StgWord size) {

Re: Confused about PAP object layout

2020-02-14 Thread Ömer Sinan Ağacan
cavenge_PAP_payload, calls scavenge_large_bitmap with "size" (== pap->n_args) as the bitmap's size Is this expected? Ömer Simon Marlow , 14 Şub 2020 Cum, 18:08 tarihinde şunu yazdı: > > On Fri, 14 Feb 2020 at 11:49, Ömer Sinan Ağacan wrote: >> >> Hi Simon, &

Re: Confused about PAP object layout

2020-02-14 Thread Ömer Sinan Ağacan
> the specified size, so if there’s less information in the payload than there > is information in the bitmap, the traversal will just terminate early. > > > On Feb 14, 2020, at 09:30, Ömer Sinan Ağacan wrote: > > > > Right, I think that's the problem. We then pass the same &

Missing symbols in ghc-stage2 executable

2020-02-10 Thread Ömer Sinan Ağacan
Does anyone know why I get so little symbols in stage 2 compiler compared to programs built with the same stage 2 compiler? This is the build.mk I'm using BuildFlavour = quick ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif GhcRtsHcOpts += -O0 -g3

Re: Missing symbols in ghc-stage2 executable

2020-02-10 Thread Ömer Sinan Ağacan
If I build with hadrian using "quickest" setting I get a more reasonable number: $ nm ./_build/stage1/bin/ghc | wc -l 102174 It'd be good to have these symbols in make-generated stage 2 executables too. Ömer Ömer Sinan Ağacan , 10 Şub 2020 Pzt, 11:45 tarihinde şunu yazdı

Adding extra C compiler arguments when building with hadrian?

2020-02-10 Thread Ömer Sinan Ağacan
In make build system I can add extra C compiler arguments to any flavor using something like BuildFlavour = ... ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif GhcRtsHcOpts += -O0 -g3 How do I do the same in hadrian when defining a flavor? Thanks,

Re: Confused about PAP object layout

2020-02-20 Thread Ömer Sinan Ağacan
gument), then the bitmap should have a 1 for this. But because the argument pattern is known (ARG_PPP) we initialized the bitmap as 0! Not sure how this can work. What am I missing? Thanks, Ömer Ben Gamari , 14 Şub 2020 Cum, 20:25 tarihinde şunu yazdı: > > Ömer Sinan Ağacan writes:

Re: Adding extra C compiler arguments when building with hadrian?

2020-02-10 Thread Ömer Sinan Ağacan
tarihinde şunu yazdı: > > You need to modify the `libraryWays` as well I think. Other flavours > build both by default. > > Matt > > On Mon, Feb 10, 2020 at 5:14 PM Ömer Sinan Ağacan > wrote: > > > > Thanks. I'm currently editing the existing "quickest" flavo

Re: Adding extra C compiler arguments when building with hadrian?

2020-02-10 Thread Ömer Sinan Ağacan
requested .so file, no idea why it doesn't. Is this a bug in hadrian? Ömer Daniel Gröber , 10 Şub 2020 Pzt, 16:17 tarihinde şunu yazdı: > > Hi, > > On Mon, Feb 10, 2020 at 03:57:27PM +0300, Ömer Sinan Ağacan wrote: > > In make build system I can add extra C compiler argu

Linking stage 2 compiler with non-threaded RTS using Make?

2020-01-09 Thread Ömer Sinan Ağacan
Anyone know how to link stage 2 with non-threaded RTS using Make build system? There's a variable GhcThreaded, but setting it "NO" makes no difference, stage 2 compiler is still threaded. So far the only way I could find is to redirect build system output to a file, find the step that linked

Re: gitlab.haskell.org spam issues

2020-01-12 Thread Ömer Sinan Ağacan
I just deleted the user with their messages. I don't see a delete link in snippets, so not sure how to delete those. Ömer Takenobu Tani , 12 Oca 2020 Paz, 06:09 tarihinde şunu yazdı: > > They are also in snippets: > > https://gitlab.haskell.org/explore/snippets > > Regards, > Takenobu > > On

Fixing type synonyms to Uniq(D)FM newtypes

2020-01-13 Thread Ömer Sinan Ağacan
Hi, UniqFM and UniqDFM types are basically maps from Uniques to other stuff. Most of the time we don't actually map Uniques but instead map things like Vars or Names. For those we have types like VarEnv, NameEnv, FastStringEnv, ... which are defined as type synonyms to UniqFM or UniqDFM, and

Re: Linking stage 2 compiler with non-threaded RTS using Make?

2020-01-15 Thread Ömer Sinan Ağacan
/debugging/ticky-ticky Ömer Sinan Ağacan , 15 Oca 2020 Çar, 14:11 tarihinde şunu yazdı: > > Btw I just realized that this also makes ticky-ticky profiling harder becuase > as > far as I know ticky profiling not compatible with threaded runtime. I need to > try ticky profiling fo

Re: Linking stage 2 compiler with non-threaded RTS using Make?

2020-01-15 Thread Ömer Sinan Ağacan
e to disable the entire bytecode > backend, which would take TH and runghc with it as well as ghci. > > On Thu, Jan 9, 2020 at 8:02 AM Ömer Sinan Ağacan wrote: >> >> Anyone know how to link stage 2 with non-threaded RTS using Make build >> system? >> There's a va

Re: Unboxed Tuple in a single STG variable

2020-01-20 Thread Ömer Sinan Ağacan
Binders in STG can be bound to multi-values (stuff represented by multiple values, e.g. unboxed tuples with more than one non-void arguments) initially but before codegen those need to be eliminated. The pass that does is "unarise", see GHC.Stg.Unarise module which has lots of notes explaning

Re: FloatRep and DoubleRep ADT Argument in STG

2020-01-22 Thread Ömer Sinan Ağacan
What is the problem you're having? What do you mean by "run into problems"? What's going wrong? It'd be helpful if you could show us your program in STG syntax. > Is it valid to use FloatRep argument in a boxed ADT on 64 bit? It should be valid, yes. I'd also try with `-dstg-lint -dcmm-lint`.

Re: Windows testsuite failures

2020-01-16 Thread Ömer Sinan Ağacan
Hi Ben, Can we please disable Windows CI? I've spent more time fighting the CI than doing useful work this week, it's really frustrating. Since we have no idea how to fix it maybe we should test Windows only before a release, manually (and use bisect in case of regressions). Ömer Ben Gamari ,

Re: Windows testsuite failures

2020-01-16 Thread Ömer Sinan Ağacan
paycheck so I can spend more than a considerable amount of my free time on > it. > > Kind regards, > Tamar > > > Sent from my Mobile > > On Fri, Jan 17, 2020, 06:17 Ömer Sinan Ağacan wrote: >> >> We release more often than once in 6 months. >> >&g

Re: Windows testsuite failures

2020-01-16 Thread Ömer Sinan Ağacan
: > > Sure because only testing once every 6 months is a very very good idea... > > Sent from my Mobile > > On Fri, Jan 17, 2020, 06:03 Ömer Sinan Ağacan wrote: >> >> Hi Ben, >> >> Can we please disable Windows CI? I've spent more time fighting the CI than &

Re: Fixing type synonyms to Uniq(D)FM newtypes

2020-01-13 Thread Ömer Sinan Ağacan
nt > instances of UniqFM all have type signatures. For example, delVarEnv will > only work with a Var, not a Name. > > Was there a different scenario that you want to avoid? > > Thanks, > Richard > > > On Jan 13, 2020, at 9:10 AM, Ömer Sinan Ağacan wrote:

Code generation/SRT question

2020-01-01 Thread Ömer Sinan Ağacan
Hi Simon, In Cmm if I have a recursive group of functions f and g, and I'm using f's closure as the SRT for this group, should f's entry block's info table have f_closure as its SRT? In Cmm syntax f_entry() { { info_tbls: [... (c1vn,

Re: Code generation/SRT question

2020-01-06 Thread Ömer Sinan Ağacan
; you’ve nailed the answer > > > > Simon > > > > From: Simon Marlow > Sent: 06 January 2020 18:17 > To: Simon Peyton Jones > Cc: Ömer Sinan Ağacan ; ghc-devs > Subject: Re: Code generation/SRT question > > > > We have: > > * w

Re: GHC HEAD (Quickest) segfaults during compilation of optparse-applicative

2020-03-10 Thread Ömer Sinan Ağacan
Can you file a bug report please with reproduction instructions? I know of one heap corruption bug (#17785, I'm currently debugging it) but it's impossible to tell whether this is the same bug or not just by looking at your screenshot. In practice whether they're the same bug or not is quote hard

<    1   2   3   4   >