commercialhaskell / commercialhaskell/stack

Issue with some heap profiling flags: -h fine, e.g. -hy not fine

Open
#5,149 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments (optional)

Building executables with profiling:

stack build --executable-profiling --library-profiling

Allows me to profile with `-h`:

stack exec -- +RTS -h

But not other heap profiling options like `-hc`, `-hm`, `-hy`, e.g.

stack exec -- +RTS -hy

### Steps to reproduce

For example:

Build with profiling:

stack build --executable-profiling --library-profiling

### Expected

I would expect to run the executable generating a heap profile with a break down of graph by type:

stack exec -- +RTS -hy

### Actual

stack exec -- +RTS -hy
: the flag -hy requires the program to be built with -prof

But `-h` is fine:

stack exec -- +RTS -h

Which produces a file `.hp`.

### Stack version

```
$ stack --version
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.