Stefan Gränitz d6cd0577c1 [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

(cherry picked from commit af2eb838309d88f046d34bca6055f1de6078fa3b)
2023-08-21 10:05:05 +02:00
..
2023-04-25 23:15:07 -07:00