jvm-profiling-tools / perf-map-agent

A java agent to generate method mappings to use with the linux `perf` tool
GNU General Public License v2.0
1.64k stars 260 forks source link

Cross-compiling for Aarch64 #93

Open Desperado17 opened 1 year ago

Desperado17 commented 1 year ago

Greetings,

I want to cross-compile this for an Aarch64 Poky Linux target using a toolchain that supplies among others aarch64-linux-gnu-g++. The target itself has a JRE in a preset path for which I could obtain the corresponding JDK both for Aarch64 and the corresponding version for host Linux that would conduct the compile.

Is there a manual somewhere on how to achieve this?

Regards

jrudolph commented 1 year ago

An alternative path might be to setup an aarch root or docker multiarch setup and compile using qemu emulation instead of setting up a cross compilation tool chain.

That said, since this is a standard cmake project any General instructions about cross compilation might just apply.

Desperado17 commented 1 year ago

Just in theory:

If it has a JAVA_ROOT and a g++ it should be fine, yes?

Desperado17 commented 1 year ago

Ok, I successfully built attach-main.jar and libperfmap.so for the target. Now, how do I deploy these? I understand that I have to combine them somehow with the contents of /bin but how? I don't understand the manual completely in that regard.