Skip to content
Snippets Groups Projects
Commit 72bdc160 authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

lrdp-v2: add missing argument to cfs_node_func

[29d3f2ed: "lrdp-v2: refactor Iommu domain parsing code"] introduced
an extra argument for rb_tree `walker' functions, but didn't update the
runqueue rb_tree user, so the ramdump parser currently fails to print
the runqueue state. Fix this.

For certain dumps, before this change we would see the following
backtrace:

    Traceback (most recent call last):
      File "ramparse.py", line 266, in <module>
        p.cls(dump).parse()
      File "parsers/runqueue.py", line 196, in parse
        self.print_cfs_state(cfs_rq_addr)
      File "parsers/runqueue.py", line 101, in print_cfs_state
        rb_walker.walk(tasks_timeline_addr, self.cfs_node_func)
      File "rb_tree.py", line 54, in walk
        self._walk(node, func, [], extra)
      File "rb_tree.py", line 39, in _walk
        self._walk(left_node, func, seen, extra)
      File "rb_tree.py", line 39, in _walk
        self._walk(left_node, func, seen, extra)
      File "rb_tree.py", line 41, in _walk
        func(node, extra)
    TypeError: cfs_node_func() takes exactly 2 arguments (3 given)

Change-Id: Ic19ec42d6cfbe87b6e0a0e99c6adf7c41e5b35e9
parent c761d7fa
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
# Copyright (c) 2013-2014, 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
......@@ -70,7 +70,7 @@ class RunQueues(RamParser):
self.print_cfs_state(my_q_addr)
self.tab_offset -= 1
def cfs_node_func(self, node):
def cfs_node_func(self, node, extra):
run_node_offset = self.ramdump.field_offset(
'struct sched_entity', 'run_node')
......
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