[Lldb-commits] [PATCH] D122373: [NFC] Be more lazy about looking up simulator SDKs on macs

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 24 01:49:49 PDT 2022


jasonmolenda created this revision.
jasonmolenda added a reviewer: aprantl.
jasonmolenda added a project: LLDB.
Herald added a subscriber: JDevlieghere.
Herald added a project: All.
jasonmolenda requested review of this revision.
Herald added a subscriber: lldb-commits.

This is a perf fix for when lldb on a mac is iterating through all of the Platforms looking for a good one, and the iOS/watchOS/tvOS simulators all call xcrun to find an SDK.  If those SDKs are not installed, the xcruns can be quite expensive.  The code today determines the SDK path before it knows if the Platform will create itself or not.   When the SDKs are present, these xcrun calls are very inexpensive, but some people have different setups.

This patch passes the names of the SDKs into the central method that decides whether to create the Platform, and only searches for the SDK path via xcrun if this Platform is a match.

Adrian, I think you might have written this?  If you'd like to review.  Else I can ask around if anyone wants to take a look.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122373

Files:
  lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
  lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122373.417850.patch
Type: text/x-patch
Size: 5088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220324/93ee714b/attachment.bin>


More information about the lldb-commits mailing list