Skip to content
Snippets Groups Projects
Commit 975731e3 authored by c_ankurb's avatar c_ankurb
Browse files

lrdp_V2: Fix for borken memusage.py for kernel version > 4.9

variable name is changed from vm_stat -> vm_zone_stat in
kernel version 4.9

Change-Id: I24a3fca72ee747e686a3d81eb6fda3f09cb2009b
parent c4771750
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2016 The Linux Foundation. All rights reserved.
# Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
#
# 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
......@@ -18,7 +18,10 @@ def do_dump_process_memory(ramdump):
"NR_FREE_PAGES", "NR_SLAB_RECLAIMABLE",
"NR_SLAB_UNRECLAIMABLE", "NR_SHMEM"]
vmstat_data = {}
vmstats_addr = ramdump.address_of('vm_stat')
if(ramdump.kernel_version >= (4,9,0)):
vmstats_addr = ramdump.address_of('vm_zone_stat')
else:
vmstats_addr = ramdump.address_of('vm_stat')
for x in vmstat_names:
i = ramdump.gdbmi.get_value_of(x)
vmstat_data[x] = ramdump.read_word(
......
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