Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: mpickering
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: cachix push mpickering --watch-store&
- run: nix-build -A eventlog2html --arg ci true --argstr haskellCompiler ghc927 --option trusted-public-keys "mpickering.cachix.org-1:COxPsDJqqrggZgvKG6JeH9baHPue8/pcpYkmcBPUbeg= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" --option substituters "https://cache.iog.io https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/ https://mpickering.cachix.org"
- run: nix-build -A eventlog2html --arg ci true --argstr haskellCompiler ghc9102 --option trusted-public-keys "mpickering.cachix.org-1:COxPsDJqqrggZgvKG6JeH9baHPue8/pcpYkmcBPUbeg= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" --option substituters "https://cache.iog.io https://cache.nixos.org/ https://mpickering.cachix.org"
deploy:
runs-on: ubuntu-latest
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Restore LFS cache
uses: actions/cache@v2
uses: actions/cache@v4
id: lfs-cache
with:
path: .git/lfs
Expand All @@ -44,7 +44,7 @@ jobs:
name: mpickering
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: cachix push mpickering --watch-store&
- run: nix-build -A site --arg ci true -o site --option trusted-public-keys "mpickering.cachix.org-1:COxPsDJqqrggZgvKG6JeH9baHPue8/pcpYkmcBPUbeg= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option substituters "https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/ https://mpickering.cachix.org"
- run: nix-build -A site --arg ci true -o site --option trusted-public-keys "mpickering.cachix.org-1:COxPsDJqqrggZgvKG6JeH9baHPue8/pcpYkmcBPUbeg= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option substituters "https://cache.iog.io https://cache.nixos.org/ https://mpickering.cachix.org"
# This stuff is only to avoid the deployment crashing when it
# tries to remove files
- run: mkdir -p build-folder
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ghc-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-version: ['9.0.2', '9.2.7', '9.4.7', '9.6.2', '9.8.1', '9.10.1']
ghc-version: ['9.6.7', '9.8.4', '9.10.2', '9.12.2']

include:
- os: windows-latest
ghc-version: '9.6.2'
ghc-version: '9.12.2'
- os: macos-latest
ghc-version: '9.6.2'
ghc-version: '9.12.2'

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ci ? false, haskellCompiler ? "ghc927" }:
{ci ? false, haskellCompiler ? "ghc9102" }:
let
# Import the Haskell.nix library,
haskell-src = import ((import ./nix/sources.nix)."haskell.nix") {};
Expand All @@ -8,7 +8,7 @@ let

haskell = pin.haskell-nix;

ciOptions = [ { packages.eventlog2html.configureFlags = [ "--ghc-option=-Werror" ]; } ];
ciOptions = []; # [ { packages.eventlog2html.configureFlags = [ "--ghc-option=-Werror" ]; } ];

opts = [ { packages.vault.doHaddock = false; } ];

Expand All @@ -17,7 +17,7 @@ let
compiler-nix-name = haskellCompiler;
src = haskell.haskellLib.cleanGit { name = "eventlog2html"; src = ./.; };
modules = (if ci then ciOptions else []) ++ opts;
index-state = "2023-03-25T00:00:00Z";
index-state = "2025-06-01T00:00:00Z";
};


Expand Down
2 changes: 1 addition & 1 deletion eventlog2html.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Library
containers >= 0.5.0 && < 0.8,
file-embed >= 0.0.11 && < 0.1,
filepath >= 1.4.2 && < 1.6,
ghc-events >= 0.19.0 && < 0.21,
ghc-events >= 0.20.0 && < 0.21,
ghc-heap >= 9 && < 10,
hashable >= 1.0 && < 1.6,
hashtables >= 1.2.3 && < 1.5,
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://input-output-hk.github.io/haskell.nix",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "af82dc3e464f58f5cc90400200f703e197d52e84",
"sha256": "0cdbxwqd8d22dxnqx6d1060hpjk5awwp4z5v5lvavp3p8fngg9cv",
"rev": "60bd09012b12681434a27ab04617ad5b1cfa4650",
"sha256": "1b4pqsfrfnyxdn1zm7jm3c6drn83xg4xq7676j2iffjpz21njcvq",
"type": "tarball",
"url": "https://github.com/input-output-hk/haskell.nix/archive/af82dc3e464f58f5cc90400200f703e197d52e84.tar.gz",
"url": "https://github.com/input-output-hk/haskell.nix/archive/60bd09012b12681434a27ab04617ad5b1cfa4650.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
Expand Down
4 changes: 2 additions & 2 deletions src/Eventlog/Data.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ generateJsonData a (ProfData h binfo ccMap fs traces heap_info ipes _ticky_count
sortBy (flip (comparing (fst . snd))) $ Map.toList keeps
-- Only supply the cost centre view in cost centre profiling mode.
cc_descs = case hHeapProfileType h of
Just HeapProfBreakdownCostCentre -> Just (outputTree ccMap mdescs)
(FromEventlog (Just HeapProfBreakdownCostCentre)) -> Just (outputTree ccMap mdescs)
_ -> Nothing

use_ipes = case hHeapProfileType h of
Just HeapProfBreakdownInfoTable -> Just ipes
(FromEventlog (Just HeapProfBreakdownInfoTable)) -> Just ipes
_ -> Nothing

-- If we have IPE info, try to translate info table pointers to names
Expand Down
2 changes: 1 addition & 1 deletion src/Eventlog/Events.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import Eventlog.Types
import Eventlog.Total
import Eventlog.Args (Args(..))
import Data.List (foldl')

Check warning on line 19 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.2 on ubuntu-latest

The import of ‘Data.List’ is redundant

Check warning on line 19 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12.2 on ubuntu-latest

The import of ‘Data.List’ is redundant

Check warning on line 19 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12.2 on macos-latest

The import of ‘Data.List’ is redundant

Check warning on line 19 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12.2 on windows-latest

The import of ‘Data.List’ is redundant
import Data.Function
import Data.Word
import Data.Time
Expand Down Expand Up @@ -344,7 +344,7 @@
let title = maybe "" T.unwords pargs
date = formatDate clocktimeSec
ppSamplingRate = T.pack . maybe "<Not available>" (show . fromNano) $ samplingRate
in \v -> Header title date heapProfileType ppSamplingRate "" "" v (T.unpack . head <$> pargs)
in \v -> Header title date (FromEventlog heapProfileType) ppSamplingRate "" "" v (T.unpack . head <$> pargs)

Check warning on line 347 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.2 on ubuntu-latest

In the use of ‘head’

Check warning on line 347 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.4 on ubuntu-latest

In the use of ‘head’

Check warning on line 347 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12.2 on ubuntu-latest

In the use of ‘head’

Check warning on line 347 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12.2 on macos-latest

In the use of ‘head’

Check warning on line 347 in src/Eventlog/Events.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12.2 on windows-latest

In the use of ‘head’


elBucketMap :: EL -> BucketMap
Expand Down
2 changes: 1 addition & 1 deletion src/Eventlog/HeapProf.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ chunkT s =
[job, date, smpU, valU] =
zipWith header [sJOB, sDATE, sSAMPLE_UNIT, sVALUE_UNIT] hs
fs = chunkSamples ss
in (\v -> Header job date Nothing (pack "") smpU valU v Nothing
in (\v -> Header job date FromHPFile (pack "") smpU valU v Nothing
, fs
)

Expand Down
15 changes: 12 additions & 3 deletions src/Eventlog/HtmlTemplate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Data.FileEmbed
import Eventlog.Data
import Eventlog.Javascript
import Eventlog.Args
import Eventlog.Types (Header(..), HeapProfBreakdown(..))
import Eventlog.Types (Header(..), HeapProfBreakdown(..), ProfileType(..))
import Eventlog.Rendering.Bootstrap
import Eventlog.Rendering.Types
import Eventlog.VegaTemplate
Expand Down Expand Up @@ -162,11 +162,15 @@ perTabFooter :: Header -> Html
perTabFooter header' = do
H.div ! class_ "row" $ do
H.div ! class_ "col" $ do
toHtml $ maybe "No heap profile" ppHeapProfileType (hHeapProfileType header')
toHtml $ render_type (hHeapProfileType header')
", created at "
code $ toHtml $ hDate header'
" by "
code $ toHtml $ hJob header'
where
render_type FromHPFile = "heap profile"
render_type (FromEventlog Nothing) = "No heap profile"
render_type (FromEventlog (Just t)) = ppHeapProfileType t


select_data :: IncludeTraceData -> ChartType -> [Text]
Expand Down Expand Up @@ -223,6 +227,7 @@ ppHeapProfileType (HeapProfBreakdownRetainer) = "Retainer profiling (implied by
ppHeapProfileType (HeapProfBreakdownBiography) = "Biographical profiling (implied by -hb)"
ppHeapProfileType (HeapProfBreakdownClosureType) = "Basic heap profile (implied by -hT)"
ppHeapProfileType (HeapProfBreakdownInfoTable) = "Info table profile (implied by -hi)"
ppHeapProfileType (HeapProfBreakdownEra) = "Era profile (implied by -he)"


allTabs :: EventlogType
Expand All @@ -248,7 +253,11 @@ metaTab header' _as =
" seconds between heap samples"

has_heap_profile :: Header -> Bool
has_heap_profile h = isJust (hHeapProfileType h)
has_heap_profile h =
case (hHeapProfileType h) of
FromHPFile -> True
FromEventlog t -> isJust t


allHeapTabs :: Header -> Args -> HeapProfileData -> [TabGroup]
allHeapTabs header' as x =
Expand Down
4 changes: 3 additions & 1 deletion src/Eventlog/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ data Header =
Header
{ hJob :: Text
, hDate :: Text
, hHeapProfileType :: Maybe HeapProfBreakdown
, hHeapProfileType :: ProfileType
, hSamplingRate :: Text
, hSampleUnit :: Text
, hValueUnit :: Text
, hCount :: Int
, hProgPath :: Maybe FilePath
} deriving Show

data ProfileType = FromHPFile | FromEventlog (Maybe HeapProfBreakdown) deriving Show


-- The bucket is a key to uniquely identify a band
newtype Bucket = Bucket Text
Expand Down
Loading