Skip to content

Commit

Permalink
tools/compactsnoop: Add aarch64 support (#5180)
Browse files Browse the repository at this point in the history
Add aarch64 support.

Signed-off-by: Feng Yang <[email protected]>
  • Loading branch information
kknjh authored Jan 12, 2025
1 parent 9846a21 commit fea5b15
Showing 1 changed file with 12 additions and 4 deletions.
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':
{
0: "ZONE_DMA",
1: "ZONE_DMA32",
2: "ZONE_NORMAL",
3: "ZONE_MOVABLE",
4: "ZONE_DEVICE"
}
}

Expand Down

0 comments on commit fea5b15

Please sign in to comment.