[lldb] Keep the existing behavior for untrusted dSYMs (#190407)
This patch does two thing:
- It reverts to the previous behavior of warning for untrusted dSYMs.
- It includes whether a dSYM is trusted or untrusted in the warning
output.
My reasoning is that there's no tooling for automatically signing dSYMs
and therefore we shouldn't change the behavior until this is more
common. The inclusion of whether the dSYM is signed or not is the first
step towards advertising the existence of the feature.
This now also means the release note I added in #189444 is correct
(again).
[RISCV] Allow coalesceVSETVLIs to move an LI if it allows a vsetvli to be mutated. (#190287)
If the AVL is provided by an LI, move it earlier if it allows us to
mutate the prior vsetvli.
Assisted-by: Claude Sonnet 4.5
[DiagnosticInfo] Allow std::string_view in DiagnosticBuilder operator<<. (#190374)
After a68ae7b0cc0922b79114aabe8cf1ec8dc68524d7, calling `<<` with a
`std::string_view` gives:
```
clang/include/clang/Basic/Diagnostic.h:1319:8: error: use of overloaded operator '<<' is ambiguous (with operand types 'const StreamingDiagnostic' and 'const std::string_view')
1319 | DB << V;
| ~~ ^ ~
```
Fix order of cpus in CPU_INFO_FOREACH
The cpus were put into the linked list in mostly inverted order during attach.
The linked list determines the order used by the CPU_INFO_FOREACH macros.
Order the linked list by ci_cpuid instead.
ok jca@ for most archs
"this should go in" deraadt@
[utils][MCA] Add a helper script to create input-file-based tests (#190074)
This is a helper script to create llvm-mca tests that follow the style
described in #173926 . That is, instead of putting both the input
instructions and CHECK lines in the same file, we consolidate all input
(files) into a single place, read by their `.test` files counterpart to
check the per-processor results.
The script added by this patch will enumerate each (`.s`) input files
and create the corresponding `.test` file, parameterized by the provided
`--triple` and `--cpu` options. Users also have the option to exclude
certain input files or add additional `llvm-mca` / `FileCheck`
arguments.
NAS-140538 / 26.0.0-BETA.2 / fix SED drive initialization (by yocalebo) (#18647)
Enterprise SSC drives were incorrectly classified during SED status
detection and provisioning. Unlike Opal/Ruby drives, Enterprise drives
may report `locking.enabled = True` in Level 0 Discovery even when
factory-fresh and completely unprovisioned — this behavior is
manufacturer-dependent and cannot be relied upon. This meant
`sed_status()` could return `"UNLOCKED"` for brand-new Enterprise drives
instead of `"UNINITIALIZED"`, causing them to be skipped during SED
setup. The same bug existed in `sed_initial_setup()`, which used
`locking.enabled` to decide whether to run `initial_setup()` or verify
existing credentials — so even when `sed_status()` correctly identified
an Enterprise drive as uninitialized, the provisioning call would fail
because it assumed the drive was already provisioned and tried to
authenticate with a password that was never set.
**How `is_uninitialized` works**
The only reliable way to distinguish a factory-fresh Enterprise drive
[81 lines not shown]
NAS-140538 / 27.0.0-BETA.1 / fix SED drive initialization (#18634)
Enterprise SSC drives were incorrectly classified during SED status
detection and provisioning. Unlike Opal/Ruby drives, Enterprise drives
may report `locking.enabled = True` in Level 0 Discovery even when
factory-fresh and completely unprovisioned — this behavior is
manufacturer-dependent and cannot be relied upon. This meant
`sed_status()` could return `"UNLOCKED"` for brand-new Enterprise drives
instead of `"UNINITIALIZED"`, causing them to be skipped during SED
setup. The same bug existed in `sed_initial_setup()`, which used
`locking.enabled` to decide whether to run `initial_setup()` or verify
existing credentials — so even when `sed_status()` correctly identified
an Enterprise drive as uninitialized, the provisioning call would fail
because it assumed the drive was already provisioned and tried to
authenticate with a password that was never set.
**How `is_uninitialized` works**
The only reliable way to distinguish a factory-fresh Enterprise drive
[75 lines not shown]
[llvm][SupportTests] Fix a race condition in temporary socket construction (#190404)
createUniquePath doesn't make an exclusive lock on the filename until
the socket is created, and thus the removal step in these tests was
creating a TOCTOU race. Instead, arrange for the file to be cleaned up
*after* we're done with it.
rdar://142847430
clang: Stop assuming one toolchain covers all GPUArchs
Previously there was a vector of toolchains, but a number of
places assumed there was only a single toolchain. I'm also not
sure how you were supposed to identify which toolchain to use from
this array. Make this parallel to the stored GpuArches. For
the fat binary cases, we still need to pick a toolchain so that
still just picks the first one; it probably should use
the most neutral available triple.
This also doesn't feel like a complete fix. The various Actions
all contain a reference to an OffloadingToolChain, which seems
to frequently be missing and isn't set at construction time.
[clang-doc] Enforce arena allocated types are trivially destructible (#190049)
We can enforce at compile-time that the types we want to place in the
arenas are always safe to allocate there.
zpool create: report which device caused failure
When zpool create fails because a vdev is already in use, the
error message now identifies the problematic device and the pool
it belongs to, e.g.:
cannot create 'tank': device '/dev/sdb1' is part of
active pool 'rpool'
Implementation follows the ZPOOL_CONFIG_LOAD_INFO pattern used
by zpool import:
- Add spa_create_info to spa_t to capture error info during
vdev_label_init(), before vdev_close() resets vdev state
- When vdev_inuse() detects a conflict, read the on-disk
label to extract the pool name and store it with the
device path
- Return the info wrapped under ZPOOL_CONFIG_CREATE_INFO
through the ioctl zc_nvlist_dst to userspace
[10 lines not shown]
Replace pure-python filter_list
This commit replaces the pure-python implementation of filter_list
with the version provided by the truenas/truenas_pyos repo
(truenas_pyfilter). The overall new workflow for this is:
1. convert the filters / options to their respective objects from
truenas_pyfilter (compile_filters, compile_options).
2. use the filters / options to either match (if there's single item)
or tnfilter (if there is more than one).
Output is same so this is mostly a drop-in replacement; however,
in some places in our codebase we keep copies of pre-compiled filters
and options because they do not change. The filter_list util is now
replaced with what is largely a thin wrapper around the extension.
API validation also now wraps around validation provided by the
extension.
[clang-doc] Merge data into persistent memory
We have a need for persistent memory for the final info. Since each
group processes a single USR at a time, every USR is only ever processed by
a single thread from the thread pool. This means that we can keep per
thread persistent storage for all the info. There is significant
duplicated data between all the serialized records, so we can just merge
the final/unique items into the persistent arena, and clear out the
scratch/transient arena as we process each record in the bitcode.
The patch adds some APIs to help with managing the data, merging, and
allocation of data in the correct arena. It also safely merges and deep
copies data from the transient arenas into persistent storage that is
never reset until the program completes.
This patch reduces memory by another % over the previous patches,
bringing the total savings over the baseline to 57%. Runtime performance
and benchmarks stay mostly flat with modest improvements.
[31 lines not shown]
[clang-doc] Move Info types into arenas
Info types used to own significant chunks of data. As we move these into
local arenas, these types must be trivially destructible, to avoid
leaking resources when the arena is reset. Unfortunaly, there isn't a
good way to transition all the data types one at a time, since most of
them are tied together in some way. Further, as they're now allocated in
the arenas, they often cannot be treated the same way, and even the
aliases and interfaces put in pLace to simplify the transition cannot
cover the full range of changes required.
We also use some SFINAE tricks to avoid adding boilerplate for helper
APIs, we'd otherwise ahve to support
Though it introduces some additional churn, we also try to keep tests
from using arena allocation as much as possible, since this is not
required to test the implementation of the library. As much of the test
code needed to be rewritten anyway, we take the opportunity to
transition now.
[41 lines not shown]
[clang-doc] Move non-arena allocated types off the OwnedPtr alias
Some types should not be using this alias, which was over applied to
APIs that wont participate in arena style allocation. This patch
restores them to their correct spelling.