Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Perf tool does not work as expected in Linux ARM runners #11689

Open
3 of 15 tasks
visheshruparelia opened this issue Feb 28, 2025 · 1 comment
Open
3 of 15 tasks

Comments

@visheshruparelia
Copy link

Description

In Linux ARM based runners, the perf record command does not collect any samples.
I have set the kernel.perf_event_paranoid=1 and kernel.kptr_restrict=0. Upon running the command: sudo perf record -g -e cycles -a -o perf.data sleep 5 it collects no samples in case of Linux ARM runners.
The same command works just fine in Linux x64 runners.

This can be consistently reproduced and reproducer can be found here: https://github.com/visheshruparelia/gh-linux-arm-perf-tool-issue

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Please check the reproducer build here: https://github.com/visheshruparelia/gh-linux-arm-perf-tool-issue/actions/runs/13587925274

When you compare the output of the step named View perf output on both the different runners, you can clearly see that it works as expected in x64 but does not collect any data in ARM.

Is it regression?

Yes - this is not seen any Linux x64 machines.

Expected behavior

The Linux ARM machine should also produce output similar to x64 machine in the last step of the job (name: View perf output).

Actual behavior

The ARM machine does not collect any samples and thus the output is empty.

Repro steps

Run the following steps on Linux ARM runner and the last step will give an empty output.

    steps:
      - name: Install perf
        run: sudo apt-get install linux-tools-generic
      - name: Enable perf event paranoid flag
        run: sudo sysctl kernel.perf_event_paranoid=1
      - name: Set Kernel KPTR  Restriction
        run: sudo sysctl kernel.kptr_restrict=0
      - name: Run perf command with -a
        run:  sudo perf record -g -e cycles -a -o perf.data sleep 5
      - name: Run ls
        run: ls -la
      - name: View perf output
        run: sudo perf script -i perf.data

I have created a simple reproducer for your convenience: https://github.com/visheshruparelia/gh-linux-arm-perf-tool-issue/blob/main/.github/workflows/perf-tool-issue.yml

@RaviAkshintala
Copy link
Contributor

Hi @visheshruparelia Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants