Skip to content
Snippets Groups Projects
Commit 402549fd authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of opensource-tools.lnx.1.0-00015.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
2068589   Ia36735bc22c1165ee2736ac39bf93fb2e4a86d0f   lrdp-v2: vmstat: Fix broken vm_stat for kernel 4.9

Change-Id: I6da6f876d8bac8499f8d01e85115a1da2a381b3e
CRs-Fixed: 2068589
parents 1e6464db 81aa751d
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. # Copyright (c) 2013-2015, 2017 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
...@@ -62,7 +62,10 @@ class ZoneInfo(RamParser): ...@@ -62,7 +62,10 @@ class ZoneInfo(RamParser):
zone = zone + sizeofzone zone = zone + sizeofzone
print_out_str('\nGlobal Stats') print_out_str('\nGlobal Stats')
vmstats_addr = self.ramdump.address_of('vm_stat') if self.ramdump.kernel_version < (4,9,0):
vmstats_addr = self.ramdump.address_of('vm_stat')
else:
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( print_out_str('{0:30}: {1:8}'.format(vmstat_names[i], self.ramdump.read_word(
self.ramdump.array_index(vmstats_addr, 'atomic_long_t', i)))) self.ramdump.array_index(vmstats_addr, 'atomic_long_t', i))))
......
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