This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Ad os_signpost support to `lldb_private::Timer`
ClosedPublic

Authored by JDevlieghere on Dec 21 2020, 11:49 AM.

Details

Reviewers
mib
Group Reviewers
Restricted Project
Commits
rG6d94eeadd28a: [lldb] Ad os_signpost support to lldb_private::Timer
Summary

Emit os_signposts when supported from LLDB's timer class. A vast amount of performance sensitive places in LLDB are already instrumented with the Timer class. By emitting signposts we can examine this information in Instruments. I recommend looking at Daniel's differential for why this is so powerful: https://reviews.llvm.org/D52954.

Diff Detail

Event Timeline

JDevlieghere requested review of this revision.Dec 21 2020, 11:49 AM
JDevlieghere created this revision.
mib accepted this revision.Dec 21 2020, 12:09 PM
mib added a subscriber: mib.
mib added inline comments.
lldb/source/Utility/Timer.cpp
62

Did you mean startTimerInterval here ? I don't see startInterval in the llvm headers ...

89

Same here with llvm::SignpostEmitter::endTimerInterval

This revision is now accepted and ready to land.Dec 21 2020, 12:09 PM
mib requested changes to this revision.Dec 21 2020, 12:11 PM
This revision now requires changes to proceed.Dec 21 2020, 12:11 PM
JDevlieghere marked 2 inline comments as done.Dec 21 2020, 12:22 PM
JDevlieghere added inline comments.
lldb/source/Utility/Timer.cpp
62

No, those are instances of llvm::Timer. If you look at the "Stack" you can see this depends on D93655 which changes the Signpost interface to work with arbitrary objects.

mib accepted this revision.Dec 21 2020, 12:26 PM

Right! I thought it was depending on D52954 ... LGTM then !

This revision is now accepted and ready to land.Dec 21 2020, 12:26 PM
This revision was automatically updated to reflect the committed changes.
JDevlieghere marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2021, 3:16 PM