Skip to content

test: v8-updates/test-linux-perf-logger fails on loongarch64 - RegExp JIT perf map entries not generated #63279

@SanchezDorso

Description

@SanchezDorso

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?

  1. Build Node.js v24.14.0 on a loongarch64 host (GCC 12.x).

  2. Run the test directly:

    ./node --allow-natives-syntax
    --perf-basic-prof
    --no-turbo-inlining
    --no-opt
    test/fixtures/linux-perf-logger.js

  3. Check the generated perf map:

    grep 'RegExp' /tmp/perf-.map

  4. 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:

  1. 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions