Async Profiler - add support for AArch64#1443
Conversation
| String arch = System.getProperty("os.arch").toLowerCase(); | ||
| if (os.contains("linux")) { | ||
| if (arch.contains("arm") || arch.contains("aarch")) { | ||
| if (arch.contains("arm")) { |
There was a problem hiding this comment.
Does this binary work for both 64 and 32-bit arm?
| if (arch.contains("arm")) { | ||
| return "libasyncProfiler-linux-arm"; | ||
| } else if (arch.contains("aarch")) { | ||
| return "libasyncProfiler-linux-aarch64"; |
There was a problem hiding this comment.
Does this binary work for both 64 and 32-bit aarch? Is there even a 32-bit version? Throw exception if not 64 bit?
There was a problem hiding this comment.
It's 64-specific. I believe the value of the os.arch System property for aarch32 should be arm.
@apangin can you confirm?
There was a problem hiding this comment.
Right, os.arch for 32-bit ARM is arm, for 64-bit ARM is aarch64.
There was even a fix to make os.arch return arm on systems that report aarch32.
There was a problem hiding this comment.
Thanks for confirming! Seems like it should be good enough then, but do you think it's better to look for aarch64? Can there be a AArch64 OS where the os.arch contains aarch but not aarch64?
There was a problem hiding this comment.
IMO, doesn't matter. You may look for aarch or aarch64 - I expect this to be the same set of systems.
There was a problem hiding this comment.
There was even a fix to make os.arch return arm on systems that report aarch32
Even though this fix is old, I made it more specific so that we do not fail on such old JDKs.
Closes #1439