[lldb][Process/FreeBSDKernelCore] Add command for refreshing thread list (#188692)
Since `/dev/mem` is live memory, its thread list is updated while
running LLDB. In the current model, users need to restart LLDB to get
new thread list, and this is prone to error when writing to memory
because LLDB's thread information and `/dev/mem` might be out of sync.
The new command `process plugin refresh-threads` reconstructs thread
list so users can synchronize thread list without restarting lldb.
Memory cache needs to be cleared prior to reconstruction otherwise lldb
will read the same process information from cache memory. To invoke
`UpdateThreadList()` from `UpdateThreadListIfNeeded()`, clear thread
list as well before triggering an update.
This is enabled for all kvm invocation regardless of type of the target
(crash dump or live kernel) because kvm hides the target type
information. Elf-core based implementation in future will need to update
thread list only at the first time as it is guaranteed that elf-core
handles static files.
[3 lines not shown]
[Support][Cache] Make `pruneCache` return an `Expected`
When `sys::fs::disk_space` would fail in during a call to `pruneCache`,
it would report a `fatal_error`. However, a failure to prune doesn't
mean the caller should fail catastrophically.
Downstream, we use LLVM's cache in the OpenCL runtime. A failure to prune
the cache can be safely ignored without stopping the user's application.
[lldb][Process/FreeBSDKernelCore] Defer actual core loading to DoLoadCore() (#186626)
`ProcessFreeBSDKernelCore` initializes `m_kvm` in class initialization,
thus invoking `kvm_open2()` only once. Although this approach is
effective, it violates the expected bahaviour of `DoLoadCore()`, loading
core file before the function is invoked. Later when I implement another
flavour of `ProcessFreeBSDKernelCore` inherited from `ProcessElfCore`,
ELF plugin will load core in `DoLoadCore()` while kvm plugin will do so
in the class initializer, causing discrepancy between the two classes.
Like the kvm/fvc precedent, the plugin variant (ELF and kvm) will be
chosen using vtable override, so if the behaviour differs like above, it
gets harder to add new features and debug the code. Thus, detecting and
loading core file in `ProcessFreeBSDKernelCore` should be handled
separately.
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
[AMDGPU][Doc] GFX12.5 Barrier Execution Model (#185632)
- Document GFX12.5-specific intrinsics.
- Rename signal -> arrive, leave -> drop to match C++ terminology.
- Update execution model to support GFX12.5 semantics (e.g. threads can
arrive w/o waiting)
- Various clean-ups & wording updates on the model.
- Added "mutually exclusive" barrier objects.
- Added barrier-phase-with + related constraints.
- Document that barriers can exist at cluster scope too.
- Update GFX12 target semantics/code sequences to include GFX12.5.
The model is no longer marked as incomplete, it is now just
experimental.
There are more updates planned in the future to support more features,
and
improve some known shortcomings of the model. e.g., currently many
relations
[4 lines not shown]
*: remove OWNER definition
OWNER, when it was introduced, was to protect packages deep in the
infrastructure by emphasizing that they should not be touched by
non-MAINTAINERs.
No infrastructure package still sets OWNER.
Note: non-trivial change to packages should be passed by MAINTAINERs.
As discussed on tech-pkg.
system: more natural cron escaping for command #10075
Changes command output from
/usr/local/sbin/configctl -d -- 'system remote backup'
to
/usr/local/sbin/configctl -d -- system remote backup
which is actually correct and needed since c491376.
Not sure what "\n" had to do with it but in the case of the
command it should be a normal string and risk of injection
is lower than parameter (but still mitigated properly).
[opt] Add -mtune option (#187932)
This patch adds a Clang-compatible -mtune option to opt, following up
the addition to llc: https://github.com/llvm/llvm-project/pull/186998,
to enable decoupled ISA and microarchitecture targeting. Example use
case is `MaxInterleaveFactor` for the loop vectorizer.
The implementation registers the new codegen flag for opt, which
consumes it and sets tune-cpu attributes for functions to be consumed by
the backend.
[MLIR] Fix walk() after PostOrderTraversal change (#191357)
make_early_inc_range doesn't keep the range alive, only the iterators.
This breaks with the recent PostOrderTraversal change, which no longer
stores the state in the iterators. Store the range in a variable to keep
it alive for the entire loop.
Fixup of #191047 / 691a130e0f14459d9358a71ffd52a01295e6200a.
[RISCV] Fix stack frame layout diagrams in RISCVFrameLowering (NFC) (#190163)
Fix stack layout diagram by pointing FP to start of the callee allocated
varargs instead of at the end.
[AMDGPU] Always update SETREG MSBs if offset is 0
We can always update immediate if Offset is zero. The bits
HW will write are always at the same position if offset is 0.
In particular it removes redundant mode changes created as seen
in the hazard-setreg-vgpr-msb-gfx1250.mir.
This still relies on thr wrong behaviour that SETREG updates
MSBs, so it will have to be changes later. Test immediates may be
off from desired for that reason in this patch.
[NFC] Replace `expectedToStdOptional` with `expectedToOptional`
Both implementations are currently equivalent. This is likely a leftover
from the past, when `llvm::Optional` existed.
[llubi] Implements common library functions (#190147)
This PR implements common library functions, including malloc, calloc,
free, puts, printf, exit, abort, and terminate.
See also #186976.