Skip to content
Snippets Groups Projects
Commit c18b922f authored by Patrick Daly's avatar Patrick Daly
Browse files

lrdp: vmstat read by signed api


NR_ZONE_INACTIVE_FILE is expected to read as -28, instead
of a large positive number

Change-Id: Ie36d3e39d25c80ba9b81ad6b9c38c83c3f6fc763
Reported-by: default avatarKassey Li <yingangl@qti.qualcomm.com>
parent ac6d0745
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2013-2015, 2017 The Linux Foundation. All rights reserved. # Copyright (c) 2013-2015, 2017, 2019 The Linux Foundation. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and # it under the terms of the GNU General Public License version 2 and
...@@ -67,7 +67,12 @@ class ZoneInfo(RamParser): ...@@ -67,7 +67,12 @@ class ZoneInfo(RamParser):
else: else:
vmstats_addr = self.ramdump.address_of('vm_zone_stat') vmstats_addr = self.ramdump.address_of('vm_zone_stat')
for i in xrange(0, max_zone_stats): for i in xrange(0, max_zone_stats):
print_out_str('{0:30}: {1:8}'.format(vmstat_names[i], self.ramdump.read_word( if self.ramdump.arm64:
print_out_str('{0:30}: {1:8}'.format(vmstat_names[i], self.ramdump.read_s64(
self.ramdump.array_index(vmstats_addr, 'atomic_long_t', i))))
else:
print_out_str('{0:30}: {1:8}'.format(vmstat_names[i], self.ramdump.read_s32(
self.ramdump.array_index(vmstats_addr, 'atomic_long_t', i)))) self.ramdump.array_index(vmstats_addr, 'atomic_long_t', i))))
print_out_str('Total system pages: {0}'.format(self.ramdump.read_word( print_out_str('Total system pages: {0}'.format(self.ramdump.read_word(
self.ramdump.address_of('totalram_pages')))) self.ramdump.address_of('totalram_pages'))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment