Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c993b76 authored by Florian Mayer's avatar Florian Mayer
Browse files

Allow to move frames out of Unwinder.

This saves a copy for every unwind we do in heapprofd.

Change-Id: Ife7aa1ce68831729d96ccd4c3e54ca531f98b6bc
parent 24a2c1a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -81,6 +81,12 @@ class Unwinder {

  const std::vector<FrameData>& frames() { return frames_; }

  std::vector<FrameData> ConsumeFrames() {
    std::vector<FrameData> frames = std::move(frames_);
    frames_.clear();
    return frames;
  }

  std::string FormatFrame(size_t frame_num);
  static std::string FormatFrame(const FrameData& frame, bool is32bit);