Skip to content
Snippets Groups Projects
Commit a74ee2f8 authored by lnx build's avatar lnx build Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Icc564c83,I24a3fca7 into opensource-tools.lnx.1.0-dev.1.0

* changes:
  lrdp_v2 : Add checks for slabsummary
  lrdp_V2: Fix for borken memusage.py for kernel version > 4.9
parents d4f538a1 a11b2a46
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(
......
......@@ -145,5 +145,8 @@ class Slabinfo_summary(RamParser):
def parse(self):
slab_out = self.ramdump.open_file('slabsummary.txt')
self.print_slab_summary(slab_out)
if(self.ramdump.is_config_defined('CONFIG_SLUB_DEBUG_ON')):
self.print_slab_summary(slab_out)
else:
slab_out.write('CONFIG_SLUB_DEBUG_ON is disabled in this build')
slab_out.close()
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