2014-05-07 09:59:15 +0000 <osa1> luite: http://lpaste.net/103735 I guess I need to boot again with profiling enabled, right? any ideas how can I do that? does ghcjs-boot support this?
2014-05-07 10:00:34 +0000 <luite> nope, no yet
2014-05-07 10:19:57 +0000 <osa1> I'm currently reading Boot.hs but I can't see how it's calling `ghcjs` executable.. or is it not calling ghcjs?
2014-05-07 10:21:05 +0000 <osa1> maybe it's calling ghcjs as a library(e.g. calling compilation routines instead of running ghcjs executable)
2014-05-07 10:25:24 +0000 <osa1> oh wait it's calling cabal with --ghcjs
2014-05-07 10:28:19 +0000 <osa1> okay so I have something like this in mind: I'll add a boot setting to `BootSettings` that will be set True depending on some command line parameter like "-prof". then I'll add `--enable-library-profiling` to cabal calls and `-prof -fprof-auto` calls to ghc calls. how does that sound? we may want to think about `-fprof-auto` part though, but at least in the beginning this may work..
2014-05-07 11:37:23 +0000ZioCrocifisso(~ZioCrocif@
2014-05-07 11:38:51 +0000pfurla(~textual@ (Ping timeout: 250 seconds)
2014-05-07 13:37:35 +0000 <luite> osa1: --enable-library-profiling is the right thing here yah
2014-05-07 13:38:46 +0000 <osa1> I'm currently passing --enable-library-profiling to cabal calls but apparently nothing changed (object code for profiling is not being generated, I added a trace call to StgSCC case of code generator but it's not called etc.)
2014-05-07 13:39:44 +0000 <luite> can you check what it calls ghc with, using the -v options (-vN), using cabal on native ghc? it might run the whole compiler twice
2014-05-07 13:41:47 +0000 <osa1> do you mean adding -vN to cabalFlags in Boot.hs?
2014-05-07 13:50:15 +0000 <osa1> luite: running ghcjs-boot --init takes huge amount of time.. is there a way to somehow make it faster? maybe by making it building less amount of libraries etc.
2014-05-07 13:50:23 +0000 <luite> add --quick
2014-05-07 13:51:03 +0000 <luite> then it will build base, so you can run basic tests like putStrLn "hello world", but not Cabal and ghcjs-base
2014-05-07 13:51:14 +0000 <luite> als -j works
2014-05-07 13:51:16 +0000 <luite> also
2014-05-07 13:52:30 +0000 <osa1> great, thanks. I'm currently running it with `ghcjs-boot --init --quick -v --prof`. let's see what's passed to GHC...
2014-05-07 13:52:58 +0000 <osa1> cabal is actually called using --enable-library-profiling but for some reason no profiling binaries are generated or I'm looking to wrong place
2014-05-07 13:57:29 +0000 <luite> for native code, cabal install --enable-library-profiling calls ghc twice, first to build the regular one, then profiling
2014-05-07 13:57:43 +0000 <luite> if it doesn't do so with --ghcjs, then there's probably still something missing in the cabal patch
2014-05-07 13:58:42 +0000 <luite> sorry i really need to get some sleep now, have been u p since about 7am and it's almost 0:00 now, in the timezone i woke up in that would be 2am
2014-05-07 14:12:00 +0000 <osa1> luite: awesome! there are some js_p_o files generated. I guess new parameter is working
2014-05-07 14:12:12 +0000 <osa1> luite: of course, no problems and thanks
2014-05-07 14:12:31 +0000 <osa1> luite: have fun at lambdaconf :) I wish I could also attend ...
2014-05-07 14:13:00 +0000 <osa1> ➜ tests ghcjs --make -prof -fprof-auto hello.hs
2014-05-07 14:13:01 +0000 <osa1> generating native
2014-05-07 14:13:03 +0000 <osa1> [1 of 1] Compiling Main ( hello.hs, hello.o )
2014-05-07 14:13:04 +0000 <osa1> generating JavaScript
2014-05-07 14:13:06 +0000 <osa1> [1 of 1] Compiling Main ( hello.hs, hello.js_o )
2014-05-07 14:13:07 +0000 <osa1> ignoring StgSCC: StgSCC CostCentre True True (StgLet (StgNonRec (sat :: GHC.Base.String) (StgRhsClosure CostCentreStack StgBinderInfo [] Updatable SRT:[[(ghc-prim:GHC.CString.unpackCString# :: GHC.Prim.Addr# -> [GHC.Types.Char])]] [] (StgApp (ghc-prim:GHC.CString.unpackCString# :: GHC.Prim.Addr# -> [GHC.Types.Char]) [StgLitArg MachStr "hello"]))) (StgApp (base:System.IO.putStrLn :: GHC.Base.String -> GHC.Types.IO ()) [StgVarArg (sat :: GHC.Base.String) :: GHC.Base.
2014-05-07 14:13:09 +0000 <osa1> String]))
2014-05-07 14:13:10 +0000 <osa1> Linking hello.jsexe (Main)
2014-05-07 14:13:15 +0000 <osa1> ops, sorry for pasing here
2014-05-07 14:14:05 +0000 <osa1> now weird thing here is that this "ignoring StgSCC" line is not printed while booting base and friends.