Skip to content

Async Profiler - add support for AArch64#1443

Merged
eyalkoren merged 4 commits intoelastic:masterfrom
eyalkoren:async-profiler-add-aarch64-support
Oct 26, 2020
Merged

Async Profiler - add support for AArch64#1443
eyalkoren merged 4 commits intoelastic:masterfrom
eyalkoren:async-profiler-add-aarch64-support

Conversation

@eyalkoren
Copy link
Contributor

@eyalkoren eyalkoren commented Oct 19, 2020

Closes #1439

@ghost
Copy link

ghost commented Oct 19, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #1443 updated]

  • Start Time: 2020-10-22T11:43:54.053+0000

  • Duration: 46 min 38 sec

Test stats 🧪

Test Results
Failed 0
Passed 1612
Skipped 12
Total 1624

String arch = System.getProperty("os.arch").toLowerCase();
if (os.contains("linux")) {
if (arch.contains("arm") || arch.contains("aarch")) {
if (arch.contains("arm")) {
Copy link
Member

Choose a reason for hiding this comment

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

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";
Copy link
Member

Choose a reason for hiding this comment

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

Does this binary work for both 64 and 32-bit aarch? Is there even a 32-bit version? Throw exception if not 64 bit?

Copy link
Contributor Author

@eyalkoren eyalkoren Oct 19, 2020

Choose a reason for hiding this comment

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

It's 64-specific. I believe the value of the os.arch System property for aarch32 should be arm.
@apangin can you confirm?

Copy link

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link

Choose a reason for hiding this comment

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

IMO, doesn't matter. You may look for aarch or aarch64 - I expect this to be the same set of systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@eyalkoren eyalkoren merged commit 4ef35f7 into elastic:master Oct 26, 2020
@eyalkoren eyalkoren deleted the async-profiler-add-aarch64-support branch October 26, 2020 16:20
@zube zube bot removed the [zube]: Done label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants