Skip to content

Cross compile tools for ARM (aarch64) #394

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

echiugoog
Copy link
Contributor

Cross compile supporting toolchain (where possible)
For perf, I bumped up the version to get a newer version of perf that supports Neoverse V2 cores

processwatch has ARM support, but we can't crosscompile right now as we need an ARM kernel to do the btf dump
e.g.

src/bpf/insn/build.sh
${BPFTOOL} btf dump file /sys/kernel/btf/vmlinux format c > ${DIR}/vmlinux.h

Did a basic perf test on a Neoverse V2 guest to validate perf:

$ sudo ./perf stat -- sleep 1

 Performance counter stats for 'sleep 1':

              0.53 msec task-clock                       #    0.001 CPUs utilized
                 2      context-switches                 #    3.784 K/sec
                 0      cpu-migrations                   #    0.000 /sec
                65      page-faults                      #  122.975 K/sec
           1547407      instructions                     #    1.10  insn per cycle
                                                  #    0.34  stalled cycles per insn
           1412410      cycles                           #    2.672 GHz
            504472      stalled-cycles-frontend          #   35.72% frontend cycles idle
            519564      stalled-cycles-backend           #   36.79% backend cycles idle
              8354      branch-misses

@echiugoog echiugoog requested a review from harp-intel as a code owner June 26, 2025 18:40
Copy link
Contributor

@harp-intel harp-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome. One issue with where to get the aarch64 binaries when building with the container.

@harp-intel
Copy link
Contributor

Too bad turbostat is x86 only. It's really useful for telemetry.

@echiugoog echiugoog force-pushed the tools-cross-compile-arm branch from b5ffee6 to 952062d Compare July 3, 2025 17:39
Copy link
Contributor

@harp-intel harp-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I said in the comment. This is very close. If I could make this one change myself I would do it and then merge, but I think you need to do it. Then, I can run my internal tests. I don't see any reason they would fail from these changes. Once passed, I can merge.
Thanks!

@@ -51,7 +51,7 @@ jobs:
name: perfspect
- name: run test
run: |
tar -xf perfspect*
Copy link
Contributor

@harp-intel harp-intel Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So close! This issue is also preventing my internal tests from running. Instead of, or in addition to, this change...

It would work best if the ARM build was in a separate artifact. So, the upload perfspect step (line 22) needs to be modified to only include perfspect.tgz. And, add an additional step to upload the ARM build.

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

Successfully merging this pull request may close these issues.

2 participants