Skip to content

Instantly share code, notes, and snippets.

View osa1's full-sized avatar

Ömer Sinan Ağacan osa1

View GitHub Profile
make -C ./tests all
make[1]: Entering directory '/home/omer/haskell/ghc_2/testsuite/tests'
python2 ../driver/runtests.py -e ghc_compiler_always_flags="'-fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-warn-tabs -fno-warn-missed-specialisations'" -e ghc_debugged=False -e ghc_with_native_codegen=1 -e ghc_with_vanilla=1 -e ghc_with_dynamic=1 -e ghc_with_profiling=0 -e ghc_with_threaded_rts=1 -e ghc_with_dynamic_rts=1 -e ghc_with_interpreter=1 -e ghc_unregisterised=0 -e ghc_dynamic_by_default=False -e ghc_dynamic=True -e ghc_with_smp=1 -e ghc_with_llvm=0 -e windows=False -e darwin=False -e in_tree_compiler=True -e clean_only=False --rootdir=. --configfile=../config/ghc -e 'config.confdir="../config"' -e 'config.platform="x86_64-unknown-linux"' -e 'config.os="linux"' -e 'config.arch="x86_64"' -e 'config.wordsize="64"' -e 'default_testopts.cleanup=""' -e 'config.timeout=int() or config.timeout' -e 'config.exeext=""' -e 'config.top="/home/omer/haskell/ghc_2/testsuite"' --co
@osa1
osa1 / Unboxed.hs
Last active January 5, 2016 15:57 — forked from vagarenko/Unboxed.hs
Unboxed polymorphic types
{-# LANGUAGE MagicHash, TypeFamilies #-}
module Data.Unboxed where
import GHC.Exts
--------------------------------------------------------------------------------
-- Hash (#) types are second-class citizens in GHC (in our case, we can't use
-- them in associated types / type families), so here we add dummy types that
-- stand for "unboxed" variants of some standard GHC types.
"inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -Wall -this-package-key integer-gmp-1.0.0.1 -hide-all-packages -i -ilibraries/integer-gmp/src/ -ilibraries/integer-gmp/dist-install/build -ilibraries/integer-gmp/dist-install/build/autogen -Ilibraries/integer-gmp/dist-install/build -Ilibraries/integer-gmp/dist-install/build/autogen -Ilibraries/integer-gmp/include -optP-include -optPlibraries/integer-gmp/dist-install/build/autogen/cabal_macros.h -package-id ghc-prim-0.5.0.0 -this-package-key integer-gmp -Wall -XHaskell2010 -O -dcore-lint -no-user-package-db -rtsopts -Wno-deprecated-flags -Wnoncanonical-monad-instances -odir libraries/integer-gmp/dist-install/build -hidir libraries/integer-gmp/dist-install/build -stubdir libraries/integer-gmp/dist-install/build -dynamic-too -c libraries/integer-gmp/src//GHC/Integer/Type.hs -o libraries/integer-gmp/dist-install/build/GHC/Integer/Type.o -dyno libraries/integer-gmp/dist-install/build/GHC/Integer/Type.dyn_o
$ git diff
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index c0c78bd..8133960 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -119,6 +119,8 @@ ifeq "$(GhcProfiled)" "YES"
ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(compiler_stage2_p_LIB)
@osa1
osa1 / analyse_cabal_log.py
Last active March 29, 2016 09:08
A little Python script to analyze Cabal logs and generate timing info of modules
import re
import sys
TIMING_RE = re.compile(r"^!!! (.+) \[(.*)\]: .* (\d+\.\d+) milliseconds, .* (\d+\.\d+) megabytes")
def sort_cmp_time(v1, v2):
return cmp(v1[1][0], v2[1][0])
def sort_cmp_alloc(v1, v2):
return cmp(v1[1][1], v2[1][1])
=========================Text.XML.HXT.Arrow.ProcessDocument=========================
CodeGen 64.0 ms 90.34 mb 54.2372881356% of total time
Simplifier1 11.0 ms 13.808 mb 9.32203389831% of total time
Renamer/typechecker 10.0 ms 14.711 mb 8.47457627119% of total time
Simplifier6 7.0 ms 10.528 mb 5.93220338983% of total time
Simplifier3 3.0 ms 3.692 mb 2.54237288136% of total time
Simplifier4 3.0 ms 3.643 mb 2.54237288136% of total time
Simplifier5 3.0 ms 3.96 mb 2.54237288136% of total time
Demand analysis 2.0 ms 3.882 mb 1.69491525424% of total time
@osa1
osa1 / gist:6afbc7cea6ca8af558ba
Created March 29, 2016 02:54
haskell-src-exts timings
============================Language.Haskell.Exts.Parser============================
CodeGen 124.0 ms 184.037 mb 35.2272727273% of total time
Simplifier1 49.0 ms 63.273 mb 13.9204545455% of total time
Renamer/typechecker 28.0 ms 28.564 mb 7.95454545455% of total time
Simplifier5 28.0 ms 41.254 mb 7.95454545455% of total time
Simplifier3 21.0 ms 31.001 mb 5.96590909091% of total time
Simplifier6 20.0 ms 30.269 mb 5.68181818182% of total time
Simplifier 16.0 ms 26.285 mb 4.54545454545% of total time
Simplifier4 10.0 ms 15.356 mb 2.84090909091% of total time
==========================Data.Text.Internal.Encoding.Utf8==========================
CodeGen 33.0 ms 49.639 mb 41.7721518987% of total time
Renamer/typechecker 12.0 ms 12.15 mb 15.1898734177% of total time
Simplifier5 6.0 ms 11.025 mb 7.59493670886% of total time
Simplifier 5.0 ms 8.122 mb 6.32911392405% of total time
Parser 5.0 ms 6.088 mb 6.32911392405% of total time
Simplifier1 3.0 ms 7.065 mb 3.79746835443% of total time
Desugar 2.0 ms 3.315 mb 2.53164556962% of total time
Simplifier6 2.0 ms 2.962 mb 2.53164556962% of total time
This file has been truncated, but you can view the full file.
=========================Graphics.GL.Ext.ARB.TextureStorage=========================
Renamer/typechecker 4.0 ms 4.658 mb 57.1428571429% of total time
CodeGen 1.0 ms 1.572 mb 14.2857142857% of total time
Called arity analysis 1.0 ms 0.056 mb 14.2857142857% of total time
Simplifier 1.0 ms 0.173 mb 14.2857142857% of total time
Float inwards1 0.0 ms 0.057 mb 0.0% of total time
Worker Wrapper binds 0.0 ms 0.051 mb 0.0% of total time
Demand analysis 0.0 ms 0.088 mb 0.0% of total time
Float inwards 0.0 ms 0.056 mb 0.0% of total time
=============================Data.ByteString.Lazy.Lens==============================
Renamer/typechecker 91.88 ms 154.265 mb 23.0368067395% of total time
CodeGen1 62.73 ms 82.121 mb 15.7281115234% of total time
CodeGen 58.56 ms 76.325 mb 14.6825794805% of total time
Simplifier1 43.27 ms 59.186 mb 10.8489619898% of total time
Simplifier5 22.48 ms 30.133 mb 5.63634540166% of total time
Desugar 20.94 ms 31.829 mb 5.2502256544% of total time
Simplifier6 12.11 ms 13.585 mb 3.03630528533% of total time
Simplifier 10.12 ms 10.663 mb 2.53735833918% of total time