[Lldb-commits] [PATCH] D106584: [lldb] Improve checking of file cache read eligibility for mach-O

Augusto Noronha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 22 12:33:51 PDT 2021


augusto2112 created this revision.
augusto2112 added reviewers: jasonmolenda, aprantl.
augusto2112 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

On mach-O, if an object file is eligible to be in the shared cache, it
cannot have data read from disk, since offsets in the process may be
fixed by the shared cache builder. This patch takes this into account by
checking if the mach-O file contains a LC_SEGMENT_SPLIT_INFO load
command, which indicates shared cache eligibility.

This patch disables the file cache optimization by default for other
object files, since there's a risk we were doing wrong reads elsewhere
as well, but makes it easy for them to implement their own logic to check
if a file cache read is safe by overriding IsSafeToReadFromFileCache.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106584

Files:
  lldb/include/lldb/Core/Section.h
  lldb/include/lldb/Symbol/ObjectFile.h
  lldb/source/Core/Section.cpp
  lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
  lldb/source/Target/Target.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106584.360929.patch
Type: text/x-patch
Size: 5905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210722/7782fbf6/attachment-0001.bin>


More information about the lldb-commits mailing list