[all-commits] [llvm/llvm-project] 089cfe: Improve step over performance

Pavel Labath via All-commits all-commits at lists.llvm.org
Fri Mar 20 03:42:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 089cfe113da1395427dd31f21067d5b618b89d7c
      https://github.com/llvm/llvm-project/commit/089cfe113da1395427dd31f21067d5b618b89d7c
  Author: Jaroslav Sevcik <jarin at google.com>
  Date:   2020-03-20 (Fri, 20 Mar 2020)

  Changed paths:
    M lldb/source/Target/ThreadPlanStepOverRange.cpp

  Log Message:
  -----------
  Improve step over performance

Summary:
This patch improves step over performance for the case when we are
stepping over a call with a next-branch-breakpoint (see
https://reviews.llvm.org/D58678), and we encounter a stop during the
call. Currently, this causes the thread plan to step-out //each frame//
until it reaches the step-over range. This is a regression introduced by
https://reviews.llvm.org/D58678 (which did improve other things!). Prior
to that change, the step-over plan would always step-out just once.

With this patch, if we find ourselves stopped in a deeper stack frame
and we already have a next branch breakpoint, we simply return from the
step-over plan's ShouldStop handler without pushing the step out plan.

In my experiments this improved the time of stepping over a call that
loads 12 dlls from 14s to 5s. This was in remote debugging scenario with
10ms RTT, the call in question was Vulkan initialization
(vkCreateInstance), which loads various driver dlls. Loading those dlls
must stop on the rendezvous breakpoint, causing the perf problem
described above.

Reviewers: clayborg, labath, jingham

Reviewed By: jingham

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76216




More information about the All-commits mailing list