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

tools/compactsnoop: Add aarch64 support #5180

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions tools/compactsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,12 @@
}
"""

if platform.machine() != 'x86_64' and platform.machine() != 'ppc64le':
if (platform.machine() != 'x86_64' and platform.machine() != 'ppc64le'
and platform.machine() != 'aarch64'):
print("""
Currently only support x86_64 and power servers, if you want
Currently only support x86_64 , aarch64 and power servers, if you want
to use it on other platforms(including power embedded processors),
please refer include/linux/mmzone.h to modify zone_idex_to_str to
please refer include/linux/mmzone.h to modify zone_idx_to_str to
get the right zone type
""")
exit()
Expand Down Expand Up @@ -295,7 +296,6 @@

def zone_idx_to_str(idx):
# from include/linux/mmzone.h
# NOTICE: consider only x86_64 servers
zone_type = {
'x86_64':
{
Expand All @@ -308,6 +308,14 @@ def zone_idx_to_str(idx):
{
0: "ZONE_NORMAL",
1: "ZONE_MOVABLE"
},
'aarch64':
Copy link
Contributor

Choose a reason for hiding this comment

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

It appears that the notice '# NOTICE: consider only x86_64 servers' in line 299 is no longer valid.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @ekyooo. the patch looks good. But let us remove the outdated line 299 as in the above comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already deleted

{
0: "ZONE_DMA",
1: "ZONE_DMA32",
2: "ZONE_NORMAL",
3: "ZONE_MOVABLE",
4: "ZONE_DEVICE"
}
}

Expand Down
Loading