Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Pickering mpickering

  • Well Typed LLP
  • Sheffield, UK
View GitHub Profile
View QuasiExpr.hs
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE TemplateHaskell #-}
-- Used by QuasiQuote. Example taken from the GHC documentation.
module QuasiExpr where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
data Expr = IntExpr Integer
View S.hs
{-# LANGUAGE TemplateHaskell #-}
module S where
import {-# SOURCE #-} T
View S.hs
{-# LANGUAGE TemplateHaskell #-}
module S where
import {-# SOURCE #-} T
View -
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by The Glorious Glasgow Haskell Compilation System configure 9.2.0.20210818, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ ./configure --prefix=/Users/matt/Downloads/ghc-9.2.0.20210818-x86_64-apple-darwin/test-install
## --------- ##
## Platform. ##
View out
This file has been truncated, but you can view the full file.
[1 of 1] Compiling Main ( mwe2.hs, mwe2.o )
size: 11
size: 12
size: 13
size: 14
size: 15
size: 16
size: 17
size: 18
View sorted-ticky
This file has been truncated, but you can view the full file.
173142266 1488284520 0 2 >M $lgo_gIJS{v} (Data.IntMap.Internal) (fun)
10693317 941011808 0 4 MEiM $waboveNest{v r4VP} (GHC.Utils.Ppr) (fun)
ENTERS: 724087007 of which 724087007 (100.0%) direct to the entry code
15443438 692132688 0 3 MEM beside{v rTN} (GHC.Utils.Ppr) (fun)
14902587 596072728 0 3 i.M Data.IntMap.Internal.$winsert{v rg4l} (fun)
RETURNS: 398830182
RET_NEW: 321464462: 65.2% 3.7% 12.0% 9.6% 8.9% 0.3% 0.0% 0.1% 0.3%
5926432 270005320 0 3 .MM Data.Set.Internal.balanceR{v r2Xh} (fun)
5036574 250066720 0 2 LM GHC.Types.Unique.FM.nonDetUFMToList1{v r8jE} (fun)
View script.sh
rm -r ci/run
DIR=$(pwd)
MYTMPDIR="$(mktemp -d)"
trap 'cd $DIR && rm -rf -- "$MYTMPDIR"' EXIT
URL="https://gitlab.haskell.org/ghc/ghc/-/pipelines/37559.json"
URL="https://gitlab.haskell.org/ghc/ghc/-/pipelines/37608.json"
View Main.hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
import GHC.Unit.Database
import GHC.Plugins
import GHC
import Data.Version
import GHC.Unit.Env
import GHC.Driver.Monad
import qualified Data.Map as M
View abstract.md

Profiling memory usage of applications has historically been a difficult task, thankfully in recent years the profiling tools have become more sophisticated and now it is quite easy to work out memory usage issues, if you know how to ask the right question.

In this workshop, we will look at two profiling tools which can give you both high and low level insight into the memory usage of your application. Firstly, by using eventlog2html we will understand how to get a high-level overview of your program's memory usage. Then using these insights we will then learn how to use ghc-debug

View Main.hs
{-# OPTIONS_GHC -fplugin=MyPlugin #-}
module Main where