Skip to content

Figure out the right way to handle stack unwinding with gperftools #834

Closed

Description

@htuch

Today we use frame pointers, which don't extend into the underlying C/C++ libraries (libc, libgcc, libstdc++), so we probably lose some performance visibility. We could improve visibility by using libunwind and the appropriate https://github.com/gperftools/gperftools/wiki/gperftools'-stacktrace-capturing-methods-and-their-issues. This comes at some performance hit and we'd need to verify it works well with all our libraries and static link story.

If we stick with frame pointers, we should use --disable-libunwind to avoid the hack in #824.

@dnoe as he has been looking at backtrace stuff recently in #833.

Activity

  1. htuch commented on Apr 25, 2017

    @htuch
    MemberAuthor
  2. htuch commented on Apr 27, 2017

    @htuch
    MemberAuthor

    @qiwzhang experienced an issue during the external dep build where the gperftools dep was also failing due to a local install of libunwind8. I'm not sure why it breaks with gperftools 2.5, but if we go down the route of --disable-libunwind, we might avoid this problem for other developers.

  3. mattklein123 commented on May 19, 2017

    @mattklein123
    Member

    @htuch @dnoe I feel like we are kind of done with this issue since we fixed dependencies to have frame pointers. It's not perfect, but to me it's good enough. Should we keep this open? Or do we need to do the disable-libunwind thing above?

  4. added this to the 1.4.0 milestone on May 19, 2017
  5. alk commented on May 23, 2017

    @alk

    So I've fixed libunwind detection in gperftools 2.6 release candidate. But my advise would be to link with libunwind especially if you actually plan to use cpu profiler, debug allocator etc. Apparently libunwind is not abandoned and isn't that slow and has very decent chance of working in all cases.

  6. mattklein123 commented on Jun 9, 2017

    @mattklein123
    Member

    Closing this for now via #1077. If frame pointer unwind becomes an issue for some reason in the future we can revisit.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions