[all-commits] [llvm/llvm-project] a04c63: Don't count all the frames just to skip the curren...

jimingham via All-commits all-commits at lists.llvm.org
Tue Feb 13 11:06:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a04c6366b156f508cdf84a32ef4484b53a6dabee
      https://github.com/llvm/llvm-project/commit/a04c6366b156f508cdf84a32ef4484b53a6dabee
  Author: jimingham <jingham at apple.com>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M lldb/include/lldb/Target/Thread.h
    M lldb/source/Expression/DWARFExpression.cpp

  Log Message:
  -----------
  Don't count all the frames just to skip the current inlined ones. (#80918)

The algorithm to find the DW_OP_entry_value requires you to find the
nearest non-inlined frame. It did that by counting the number of stack
frames so that it could use that as a loop stopper.

That is unnecessary and inefficient. Unnecessary because GetFrameAtIndex
will return a null frame when you step past the oldest frame, so you
already have the "got to the end" signal without counting all the stack
frames.
And counting all the stack frames can be expensive.




More information about the All-commits mailing list