[RISCV] Don't fold vector (fp_to_sint (ceil/floor/round/etc X)) if the inner op has multiple uses. (#216137)
If the inner operation needs to write FRM and the folded operation
does too, combining them may require another pair of FRM writes
unless we can get rid of the inner operation.
This may be expensive on CPUs without FRM renaming support.
Assisted-by: Claude
[DWARFLinker] Constrain a function's high_pc to its own symbol
Mach-O objects built with .subsections_via_symbols make every symbol an
independently placeable atom, and the linker packs atoms without
preserving the spacing they had in the object file.
I have an example where the compiler describes such a subprogram as
extending past its own atom. While it's debatable whether that's a good
idea, it's not invalid in the object file. However, once linked, it is
invalid.
We can make dsymutil resilient against this by looking at the size of
the symbol in the debug map and adjusting the end_pc. I'm doing so
conservatively so that only a collision is repaired. Already
overlapping/invalid ranges remain untouched.
rdar://184768778
[lldb] Search for a corefile's images before loading any of them
A userland or kernel corefile can list hundreds of images, and searching for
one can shell out to a symbol server or fetch over the network. Searching for
them one at a time is where loading such a corefile spends its time.
Add a batch form of SymbolLocator::Locate that runs the searches on the
debugger's thread pool, gated on target.parallel-module-load. Results come
back in the order the requests were given, since that order decides the
Target's module order. Only the results are ordered, and anything a search
reports to the user arrives in whatever order the searches finish in.
Only the plugin searches run concurrently, so a platform hook does not have to
be thread safe to take part, and reading a binary's UUID out of memory stays
on the calling thread.
Setting up a platform binary can replace the Target's platform and dynamic
loader, and now happens for every image before any of them is searched for, so
the platform a corefile asks for is the one all of its images are searched
[4 lines not shown]
[ORC] Drop SimpleExecutorMemoryManagerSymbolNames struct (#216231)
Remove the SimpleExecutorMemoryManagerSymbolNames struct and the
orc_rt_SimpleNativeMemoryMapSPSSymbols global. The sps::MemMgr*CIName
constants in GenericMemoryManagerProxySpecs.h are now the single source
of truth for the SimpleNativeMemoryMap controller-interface names, used
by both the controller-side proxies and the executor-side
SimpleExecutorMemoryManager bootstrap registration (as
OrcRTBootstrap.cpp already does for the memory-access wrappers).
No functional change: the name strings are identical to those previously
held in orc_rt_SimpleNativeMemoryMapSPSSymbols.
proc_vmspace_getref: Take p->p_lock around p->p_sflag access.
Prompted by reviewing the locking rules in;
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
sysctl kern.proc_args.*.cwd/pathname: Use p_reflock, not p_lock.
- Avoid holding p_lock across copyout; this risks deadlock or panic
if memory is exhausted and the uvm fault handler during copyout
tries to deliver SIGKILL, which requires p_lock.
- Avoid holding p_lock across vnode_to_path: this risks deadlock or
panic if the file system, such as nfs, tries to check for pending
signals, which requires p_lock.
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
[ProfileData] Avoid magic layout indices in SampleProfileWriter (NFC) (#215981)
This patch removes hardcoded section layout indices in
SampleProfileWriterExtBinary in favor of finding the first unwritten
matching entry in SectionHdrLayout.
Previously, writeDefaultLayout and writeCtxSplitLayout passed magic
integer indices to writeOneSection to specify the position of each
section in SectionHdrLayout.
This patch introduces findUnwrittenEntry to dynamically look up the
matching unwritten section entry in SectionHdrLayout and determine its
ordinal among sections of the same type. This allows
writeDefaultLayout and writeCtxSplitLayout to iterate over declarative
arrays of sections without magic indices, and allows removing the
index-based addSectionFlag overload.
Assisted-by: Antigravity
[ProfileData] Remove SampleSorter (NFC) (#215941)
This patch removes SampleSorter in favor of direct iteration over
BodySamples and CallsiteSamples.
Originally, BodySamples and CallsiteSamples used DenseMap. Because
DenseMap does not guarantee iteration order, SampleSorter was
introduced to sort samples by LineLocation on demand when printing or
writing text profiles.
In December 2015, commit 10cf124bb920 switched BodySamples and
CallsiteSamples from DenseMap to std::map to reduce memory usage, but
SampleSorter was retained. Since std::map is already ordered by
LineLocation, SampleSorter is redundant.
Assisted-by: Antigravity
sysctl vm.proc.*: Use p_reflock, not p_lock.
- Avoid holding p_lock across copyout; this risks deadlock or panic
if memory is exhausted and the uvm fault handler during copyout
tries to deliver SIGKILL, which requires p_lock.
- Avoid holding p_lock across vnode_to_path: this risks deadlock or
panic if the file system, such as nfs, tries to check for pending
signals, which requires p_lock.
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc