libc: Fix dtor order in __cxa_thread_atexit
The thread_local variable may creates another thread_local variable
inside its dtor. This new object is immediately be registered in
__cxa_thread_atexit() and need to be freed before processing another
variable.
This fixes the libcxx test thread_local_destruction_order.pass.cpp.
Reported by: kib
Approved by: lwhsu (mentor)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55826
kern_time: Honor the precise option when counting diff
When preecise option is used, the true elapsed time should also use the
precise timer.
This fixes the test case sleep_for.signals.pass.cpp in libcxx.
Reviewed by: kib, imp
Approved by: lwhsu (mentor)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55824
tcp: fix up !VIMAGE builds
The tcp_seq.h uses getmicrouptime() in an inline function, but it doesn't
include <sys/time.h>. This was usually masked by having tcp_var.h always
before tcp_seq.h, so restore that.
Fixes: c0462c2deafdcfe885e8d6f91b529d8cbddc6014
inpcb: fix up !VIMAGE builds
There are some files that don't include mutex.h and rwlock.h, but use
inpcb locking macros. With VIMAGE the net/vnet.h pulls half of the
possible kernel includes, masking the problem. The in_pcb.h also used to
mask the problem, so restore that.
Fixes: 041e9eb1ae094a81e55fbcaba37eb2ac194658cc
[Driver] Enable -ftime-trace for CUDA/HIP device compilation (#179701)
Previously, -ftime-trace only generated trace files for host compilation
when compiling CUDA/HIP code. Device compilation was excluded because
the OffloadingPrefix was non-empty, causing handleTimeTrace() to be
skipped.
This patch enables -ftime-trace for offload device compilation by:
1. Passing the offloading prefix to handleTimeTrace()
2. Including the bound architecture in the trace filename
3. Deriving the trace output directory from the -o option for device
compilation (since the device output is a temp file)
Trace files are now generated for each offload target:
- Host: output.json
- Device: output-hip-amdgcn-amd-amdhsa-gfx906.json
Note: When using --save-temps, multiple compilation phases (preprocess,
compile, codegen) write to the same trace file, with each phase
[3 lines not shown]
[CUDA/HIP][SYCL] Deduplicate deferred diagnostics across multiple callers (#185926)
[CUDA/HIP][SYCL] Deduplicate deferred diagnostics across multiple
callers
Deferred diagnostics for a function were emitted once per caller that
forced the function into device context. When multiple device functions
called the same host-device function containing errors, the diagnostics
were repeated for each caller, producing noisy duplicate output.
Change the deferred diagnostic emission to a two-pass approach:
1. During the call graph walk, collect callers in DeviceKnownEmittedFns
(now storing multiple callers per function) and mark functions that
need diagnostics, but don't emit yet.
2. After the walk completes, emit diagnostics once per function with
all callers listed as notes.
Call chain notes now use "called by" for the first caller in each chain
and "which is called by" for subsequent callers in the chain, making it
[5 lines not shown]
[lldb] Nominate myself for FreeBSD maintainer (#180053)
I've been FreeBSD src contributor since 2022 and started working for the
FreeBSD Foundation starting from January. I created and have been
actively working on #180061 to achieve [LLDB improvement on
FreeBSD](https://wiki.freebsd.org/SummerOfCodeIdeas#Improve_LLDB_on_FreeBSD)
which was originally Google Summer of Code idea.
The initial LLDB support for userspace and kernel debugging on FreeBSD
was initiated by Moritz system back in 2020, but there are some missing
bits like architecture support due to lack of time. Due to this, FreeBSD
developers still depend on GDB-derived kernel debugger and it still
remains de-facto tier 1 debugger (e.g. no scripts in source tree for
lldb).
To track what/how I'm working on this task, please take a look at my
foundation [status report on LLDB
improvement](https://github.com/FreeBSDFoundation/status-updates/blob/main/Minsoo_Choo/kdb.md).
As you see, I will also improve Lua scripting on LLDB as Lua remains
[13 lines not shown]
[flang][cuda][openacc] Fix interoperability when host_data is not generated (#186516)
Update lowering to not process operands if the operation will not be
generated because of a `if(.false.)` clause. This was breaking when
enabling CUDA Fortran on the same test.
[NFC][sanitizer] Accept ETIMEDOUT in getpwnam_r_invalid_user.cpp (#186538)
On some systems, looking up an result in a timeout.
Error here is not a sign of compiler-rt issue.
Fixes flakiness on
https://lab.llvm.org/buildbot/#/builders/sanitizer-ppc64le-linux
plug a memory leak when detaching codel ifq disciplines on an interface.
fqcodel_alloc() takes (moves) ownership of memory allocated as part
of the pf queue code that sets up the queue discipline, but nothing
releases it when the discipline is removed from the interface. every
time you load a pf rulese that uses codel, it temporarily resets
an interface to priq before creating and attaching new codel
instances. this means every ruleset load would leak memory, to the
point where M_DEVBUF allocations exhaust the kernel map.
this has fqcodel_free() call fqcodel_pf_free to free the now unused
codel discipline.
found and fixed by lexi wilson
[RISCV] Add codegen patterns to support short forward branches with immediates (#185643)
This is a follow-up to #182456. This PR adds support for short forward
branches where branches are from Qualcomm uC `Xqcibi` extension.