Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal v2-install --enable-profiling does not profile #5982

Closed
fommil opened this issue Apr 2, 2019 · 2 comments
Closed

cabal v2-install --enable-profiling does not profile #5982

fommil opened this issue Apr 2, 2019 · 2 comments

Comments

@fommil
Copy link
Contributor

fommil commented Apr 2, 2019

This is in cabal-install 2.4, even the latest commit on that branch.

In any project that can produce an executable, issue

cabal v2-install --enable-profiling

and confirm that the output binary can't produce profiling information.

e.g. (not a minimal example, just first thing that comes to hand.. this is the integration test for this app)

git clone https://github.com/symbiont-io/jaeger-flamegraph.git
cd jaeger-flamegraph
cabal v2-install --symlink-bindir=bin --enable-profiling -w ghc-8.4.4 jaeger-flamegraph
gzip -cd frontend.json.gz | bin/jaeger-flamegraph -a p1 +RTS -P -RTS | sort > frontend.trace.test

gives

jaeger-flamegraph: the flag -P requires the program to be built with -prof

Note that v2-build --enable-profiling works as expected.

@hvr
Copy link
Member

hvr commented Apr 3, 2019

additional note, this happens also for non-local / non-project-context v2-installs:

cabal v2-install -w ghc-8.6.4 --enable-profiling uhttpc

will ignore the --enable-profiling flag too (same with --enable-executable-profiling)

and in fact, the symlinked uhttpc-bench executable is the very same (i.e. same nix-style hash entry) that

cabal v2-install -w ghc-8.6.4 uhttpc

symlinks. IOW, the 2nd invocation is a no-op.

@jneira
Copy link
Member

jneira commented Feb 13, 2022

Closing as duplicate of #7297 where there is a diagnostic, possible solutionand workarounds

@jneira jneira closed this as completed Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants