Version
v24.14.0
Platform
Linux builder2 6.6.47-12.tl4.loongarch64 #1 SMP loongarch64 GNU/Linux
GCC 12.3.1 (OpenCloudOS 9)
Subsystem
test_runner / v8
What steps will reproduce the bug?
-
Build Node.js v24.14.0 on a loongarch64 host (GCC 12.x).
-
Run the test directly:
./node --allow-natives-syntax
--perf-basic-prof
--no-turbo-inlining
--no-opt
test/fixtures/linux-perf-logger.js
-
Check the generated perf map:
grep 'RegExp' /tmp/perf-.map
-
Or run the test suite directly:
./node test/v8-updates/test-linux-perf-logger.js
How often does it reproduce? Is there a required condition?
100% reproducible on loongarch64.
Required conditions:
- Architecture: loongarch64
- The test must be run on Linux (the test itself skips on non-Linux).
Does not reproduce on x86_64 or aarch64.
What is the expected behavior? Why is that the expected behavior?
The perf map file /tmp/perf-.map should contain RegExp JIT symbol entries
matching the pattern:
/[a-fA-F0-9]+ [a-fA-F0-9]+.* RegExp.> src: 'test-regex' flags: 'gi'/
This is the behavior observed on x86_64 and aarch64.
What do you see instead?
AssertionError [ERR_ASSERTION]: 2 tests failed
[ERROR 1] --perf-basic-prof interpreted
Errors:
- Expected to match /[a-fA-F0-9]+ [a-fA-F0-9]+.* RegExp.> src: 'test-regex' flags: 'gi'/
Perf map content:
7fffeff03d60 4bc Builtin:DeoptimizationEntry_Eager
7fffeff04220 4bc Builtin:DeoptimizationEntry_Lazy
...(only Builtin: and BytecodeHandler: entries, no RegExp.* entries)
The perf map contains only Builtin:* and BytecodeHandler:* entries.
No RegExp JIT symbol entries are written on loongarch64.
Additional information
Root cause hypothesis:
On loongarch64, V8's RegExp compiler may fall back to the bytecode interpreter
(Irregexp) rather than native code generation, or the PerfJitLogger hook is
not invoked by the loongarch64 regexp code generator. As a result, no JIT
symbol is logged for RegExp compilations.
Workaround used in downstream packaging (OpenCloudOS):
Skip this test specifically on loongarch64 via sed before running the test suite.
Related:
Version
v24.14.0
Platform
Subsystem
test_runner / v8
What steps will reproduce the bug?
Build Node.js v24.14.0 on a loongarch64 host (GCC 12.x).
Run the test directly:
./node --allow-natives-syntax
--perf-basic-prof
--no-turbo-inlining
--no-opt
test/fixtures/linux-perf-logger.js
Check the generated perf map:
grep 'RegExp' /tmp/perf-.map
Or run the test suite directly:
./node test/v8-updates/test-linux-perf-logger.js
How often does it reproduce? Is there a required condition?
100% reproducible on loongarch64.
Required conditions:
Does not reproduce on x86_64 or aarch64.
What is the expected behavior? Why is that the expected behavior?
The perf map file /tmp/perf-.map should contain RegExp JIT symbol entries
matching the pattern:
/[a-fA-F0-9]+ [a-fA-F0-9]+.* RegExp.> src: 'test-regex' flags: 'gi'/
This is the behavior observed on x86_64 and aarch64.
What do you see instead?
AssertionError [ERR_ASSERTION]: 2 tests failed
[ERROR 1] --perf-basic-prof interpreted
Errors:
Perf map content:
7fffeff03d60 4bc Builtin:DeoptimizationEntry_Eager
7fffeff04220 4bc Builtin:DeoptimizationEntry_Lazy
...(only Builtin: and BytecodeHandler: entries, no RegExp.* entries)
The perf map contains only Builtin:* and BytecodeHandler:* entries.
No RegExp JIT symbol entries are written on loongarch64.
Additional information
Root cause hypothesis:
On loongarch64, V8's RegExp compiler may fall back to the bytecode interpreter
(Irregexp) rather than native code generation, or the PerfJitLogger hook is
not invoked by the loongarch64 regexp code generator. As a result, no JIT
symbol is logged for RegExp compilations.
Workaround used in downstream packaging (OpenCloudOS):
Skip this test specifically on loongarch64 via sed before running the test suite.
Related:
v8-updates/test-linux-perfno longer works with recent V8 versions #50079 — general test-linux-perf failures with V8 updates