Skip to content

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

Closed

Description

@fommil

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.

Activity

  1. hvr commented on Apr 3, 2019

    @hvr
    Member

    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.

  2. jneira commented on Feb 13, 2022

    @jneira
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions