Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,362
    • Issues 5,362
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 572
    • Merge requests 572
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17605
Closed
Open
Issue created Dec 25, 2019 by Ben Gamari@bgamari🐢Maintainer

perf record doesn't work on -g3 binary

If we build GHC with debug information:

$ cat ./_build/hadrian.settings 
stage1.*.ghc.*.opts += -g3
stage2.*.ghc.*.opts += -g3
$ hadrian/build.cabal.sh

and then build and run a test:

$ _build/stage1/bin/ghc -O -g3 nofib/shootout/n-body/Main.hs
$ perf record nofib/shootout/n-body/Main 100000000

perf report only seems to report (quite non-sensical) addresses, not proper symbol names:

Samples: 45K of event 'cycles:u', Event count (approx.): 42707199057                                                                                                        
Overhead  Command  Shared Object     Symbol                                       
  20.10%  Main     Main              [.] 0x000000000000ad78                                                                                                                 
  16.30%  Main     Main              [.] 0x000000000000ad8b                                                                                                                 
   8.11%  Main     Main              [.] 0x000000000000ad95                                                                                                                 
   7.55%  Main     Main              [.] 0x000000000000ad9e                                                                                                                 
   5.96%  Main     Main              [.] 0x000000000000ada8                                   
...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking