Skip to content

missing symbols on linux without debugging #23488

Closed

Description

@metajack

If you try to get call stacks in perf under Linux for rustc compiled binaries, they are missing unless you compile with debugging. Using Instruments.app on Mac has the symbols though, even without debugging.

Activity

  1. pcwalton commented on Mar 18, 2015

    @pcwalton
    Contributor

    Apparently this works for rustc.

    This is a serious problem for Servo.

  2. added
    A-debuginfo
    on Mar 18, 2015
  3. michaelwoerister commented on Mar 20, 2015

    @michaelwoerister
    Contributor

    Can you describe in more detail what exactly you are doing and what the desired outcome should be?

  4. metajack commented on Mar 20, 2015

    @metajack
    ContributorAuthor

    The easiest way to reproduce this is to run some Rust release-compiled program under perf record -g and then hit E key in perf report to show call stacks. In debug compiled builds, the call stack symbols are present. In release builds they are meaningless addresses.

  5. michaelwoerister commented on May 9, 2015

    @michaelwoerister
    Contributor

    You could try building with -C debuginfo=1. That should give you enough debuginfo for call stacks but not interfere too much with optimization.

  6. steveklabnik commented on Nov 29, 2016

    @steveklabnik
    Contributor

    Triage: it's been a long time. @metajack you said this was a serious problem for servo, is it still happening, or did you do @michaelwoerister 's workaround?

  7. metajack commented on Nov 29, 2016

    @metajack
    ContributorAuthor

    I think we've just lived with it. @pcwalton does most of his optimization work on macOS. @jdm do you know if this is still happening?

  8. jdm commented on Nov 29, 2016

    @jdm
    Contributor

    This is still necessary on Linux.

  9. jdm commented on Nov 29, 2016

    @jdm
    Contributor

    I don't believe we've ever tried the -C debuginfo=1 workaround, however.

  10. Mark-Simulacrum commented on May 16, 2017

    @Mark-Simulacrum
    Member

    I'm somewhat confused. Do we somehow include debuginfo in release builds without trying to on macOS? Or does Instruments.app have some form of integrated debuginfo generation?

  11. michaelwoerister commented on May 17, 2017

    @michaelwoerister
    Contributor

    I've used perf quite a bit lately and have had no problems. However, I don't expect it to work without -C debuginfo=1. Does perf handle C programs (compiled without debuginfo) better?

  12. added
    C-bug
    and removed
    C-enhancement
    on Jul 22, 2017
  13. Mark-Simulacrum commented on Aug 31, 2019

    @Mark-Simulacrum
    Member

    Seems to work without -Cdebuginfo=1 today in perf, at least as far as I can tell.

  14. added a commit that references this issue on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoC-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions