[all-commits] [llvm/llvm-project] af2eb8: [lldb] Fix performance regression after adding GNU...

Stefan Gränitz via All-commits all-commits at lists.llvm.org
Fri Aug 18 04:59:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af2eb838309d88f046d34bca6055f1de6078fa3b
      https://github.com/llvm/llvm-project/commit/af2eb838309d88f046d34bca6055f1de6078fa3b
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp

  Log Message:
  -----------
  [lldb] Fix performance regression after adding GNUstep ObjC runtime

We added support for the GNUstep ObjC runtime in 0b6264738f3d. In order to check if the target process uses
GNUstep we run an expensive symbol lookup in `CreateInstance()`. This turned out to cause a heavy performance
regression for non-GNUstep inferiors.

This patch puts a cheaper check in front, so that the vast majority of requests should return early. This
should fix the symptom for the moment. The conceptual question remains: Why does `LanguageRuntime::FindPlugin`
invoke `create_callback` for each available runtime unconditionally in every `Process::ModulesDidLoad`?

Reviewed By: jasonmolenda, jingham, bulbazord

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




More information about the All-commits mailing list