[XRay] Ignore debug instructions in instruction threshold (#219400)
Debug instructions currently contribute to `xray-instruction-threshold`,
so
enabling debug information can change whether a function is
instrumented.
Count raw machine instructions while excluding only debug instructions.
Using
the raw instruction range preserves the existing treatment of bundled
instructions and non-debug meta instructions.
The first commit records the existing behavior. The second applies the
fix and
updates the test expectations.
Fixes #219376
Assisted-by: OpenAI Codex 5.6 Sol, co-reviewed by Claude and Yongqiang
Tian.
ping: use CLOCK_REALTIME for ICMP Originate Timestamp
RFC 792 defines the ICMP Originate Timestamp field as milliseconds
since midnight UTC. However, ping(8) currently derives this value
from CLOCK_MONOTONIC, which represents time since an unspecified
starting point and is not related to UTC.
The issue was introduced by commit 1ad76f1b6047, which replaced
gettimeofday(2) with clock_gettime(CLOCK_MONOTONIC) for timekeeping
in ping(8).
Fix this by using CLOCK_REALTIME when generating the ICMP originate
timestamp.
Before:
$ ping -Mt -c1 127.0.0.1
ICMP_TSTAMP
PING 127.0.0.1 (127.0.0.1): 56 data bytes
[17 lines not shown]
ping: fix test timestamp_origin when tstamprepl is disabled
The timestamp_origin test sends an ICMP Timestamp Request (ping -Mt) and parses
the tso/tsr fields out of the reply.
When the sysctl net.inet.icmp.tstamprepl is 0, the kernel silently drops the
request, ping receives no reply, and the sed extraction yields an empty $tso.
The test then fails inside atf_check test -n "$tso" with the unhelpful message
Approved by: maxim
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57287
(cherry picked from commit ff873565bc2c3e47fe1d070305aa851189ee8bcf)
[lldb] Fix SymbolFileDWARFTests link failure on Windows (#234441)
LLDB unit tests don't link clang libraries themselves, use
ObjCInterfaceDecl::getObjCRuntimeNameAsString() instead.
Assisted-by: Claude
Merge tag 'thermal-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki:
"These are mostly updates of thermal drivers including a new Exynos
ACPM thermal driver for Google GS101, new Renesas RZ/G3L thermal
sensor support, new Qualcomm MSM8952 TSENS support, new Qualcomm
PMAU0102 Master BandGap temperature monitor support in DT bindings,
and new rugged Panther Lake support in intel_tcc_cooling. Moreover,
the AN7583 driver is extended to register separate thermal zones for
bandgap, GbE and CPU (its DT bindings are updated accordingly).
There are also multiple fixes and assorted cleanups, as usual.
Specifics:
- Make the Intel powerclamp thermal driver reject invalid window_size
values, drop redundant clamp() from duration_set() in it, and
simplify 4 functions in it (Thorsten Blum)
[122 lines not shown]
Merge tag 'pm-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
"This time, the most visible part are the ACPI CPPC updates from
Christian Loehle, including CPPC cpufreq driver changes, even though
updates of cpufreq drivers proper are still the largest topic group.
However, the updates of cpufreq drivers depend on the ACPI CPPC
updates, so they should really be counted together and that is well
over 1/2 of the total commit count.
Interestingly enough, almost all of the updates included here are
fixes or cleanups, with some new feature support in the amd-pstate
cpufreq driver and IPQ9650 support in the qcom-nvmem cpufreq driver.
The runtime PM documentation improvements from Brian Norris can also
be mostly regarded as fixes, but a new kunit test goes along with
them.
Specifics:
[116 lines not shown]
[MachineScheduler] Fix stale read-undef flags when rescheduling physreg copies (#227897)
`GenericScheduler::reschedulePhysReg` can leave stale `read-undef` flags
when moving an already-scheduled COPY. This can be exposed most commonly
if a user introduces a large inline assembly section that can otherwise
limit the registers that are available to the compiler.
This addresses this bug in 2 steps:
1) Check for backends that can produce `read-undef` on subregisters in a
way that can meaningful move (e.g. has lane mask).
2) After a move regenerate the `read-undef` flags for just the region of
"movement" between the old/new location in the code.
You can find the motivating example here:
https://gist.github.com/njriasan/73a4b080e98cdb54bd0b59138bc5ad9c
ping: do a better job with what we received from the net, part 2
When we see a difference between the payload we sent and what we
received, we dump both but we were not prepared for the case when
the received payload is less than we sent. In this case we were trying
to dump more than needed.
Funny enough, 23 years ago I already fixed a similar issue here but
didn't pay attention to this small dumping loop.
Test written by jlduran.
Reviewed by: jlduran
MFC after: 1 month
Found with: Claude Code Sonnet 5
Differential Revision: https://reviews.freebsd.org/D59556
Differential Revision: https://reviews.freebsd.org/D59582
(cherry picked from commit 0b9434d707c71de7b1b62e400e6e780224f0384d)
ping: do a better job checking what we receive from the net
- zero out a buffer for the incoming icmp message that
we are about to parse
- for ICMP_MASKREPLY and ICMP_TSTAMPREPLY responses check their length
and warn and reject them if they are truncated
Without these checks a part of stack allocated struct icmp icp could
be printed out which seems low severity since we already dropped root
privileges by the time icp is allocated.
Reviewed by: glebius
MFC after: 1 month
Found with: Claude Code Sonnet 5
Differential Revision: https://reviews.freebsd.org/D59555
(cherry picked from commit aa6683207d189a0b58ccf8806bd9f8793914bc45)
PPC: Fold 64-bit zero-extending word load feeding extsw subregister (#211107)
A gprc LWZ/LWZX feeding EXTSW_32_64 is rewritten into a sign-extending
LWA/LWAX load. Extend the same fold to the 64-bit zero-extending word
loads LWZ8/LWZX8 when the EXTSW_32_64 reads their sub_32 subregister,
producing a single LWA/LWAX instead of a redundant lwz+extsw pair.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[ThinLTO] Import locals with colliding GUIDs (#234247)
The ThinLTO importer treated a local already defined in the destination
as satisfying any reference with the same GUID. Distinct locals in
different modules can share a GUID when their source filenames and names
match. A needed definition was then skipped, tripping the export/import
consistency assertion for read-only variables.
Check the referencing module before skipping the import.
Assisted-by: OpenAI Codex
[RISCV][P-ext] Fold (sext_inreg (bitcast (ppaire X, Y)), SrcVT) -> (sext_inreg (bitcast (freeze X)), SrcVT). (#233951)
If SrcVT is extending from only the even elements for the ppaire. In the
changed tests, the ppaire is a zext_inreg due to the second operand
being a zero vector. This transform doesn't care what the second operand
of the ppaire is since it is a discarded.
PowerPC: Use minimal tablegen inputs for TargetParser
Generate PPCGenTargetFeatures.inc from a file that only includes the
feature and processor definitions, instead of the full PPC.td. Add
stub SchedMachineModel, as was recently done for AArch64 in #231954,
since the TargetParser usage does not need them.
llvm-min-tblgen -gen-target-features
Gigainstructions Peak RSS .td deps
PPC.td 1.72 85 MB 81
PPCTargetParserDef.td 0.01 6 MB 7
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
PowerPC: Move subtarget features to PPCFeatures.td
Move the subtarget features, predicates and processor feature lists out
of PPC.td, so they can be used without parsing the instruction and
register definitions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
PowerPC: Move the PPC32 and PPC64 hardware modes to PPCRegisterInfo.td
They are only used by the register, instruction and calling convention
definitions. This allows the feature definitions to be used without
HwMode.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc++] Replace integrals helper by types::integer_types (#233923)
integrals imprecisely describes the list of all integer
types, only 'char' is included from character types