diff options
author | Dan Williams <dan.j.williams@intel.com> | 2024-01-02 11:03:04 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2024-01-02 11:03:04 -0800 |
commit | 11c83932028714014e4259072bd230473d6db730 (patch) | |
tree | ba5de3af7a65a6a60ebb1f0a36328fd853130ecd /scripts/gdb/linux/tasks.py | |
parent | 58f1e9d3a30438042fc9ed65b3dc56b2e5f7886a (diff) | |
parent | 185c1a489f873cb71520fc089401e02dbf302dcd (diff) | |
download | linux-11c83932028714014e4259072bd230473d6db730.tar.gz linux-11c83932028714014e4259072bd230473d6db730.tar.bz2 linux-11c83932028714014e4259072bd230473d6db730.zip |
Merge branch 'for-6.8/cxl-cdat' into for-6.8/cxl
Pick up the CDAT parsing and QOS class infrastructure for v6.8.
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r-- | scripts/gdb/linux/tasks.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 17ec19e9b5bf..aa5ab6251f76 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py @@ -13,7 +13,7 @@ import gdb -from linux import utils +from linux import utils, lists task_type = utils.CachedType("struct task_struct") @@ -22,19 +22,15 @@ task_type = utils.CachedType("struct task_struct") def task_lists(): task_ptr_type = task_type.get_type().pointer() init_task = gdb.parse_and_eval("init_task").address - t = g = init_task + t = init_task while True: - while True: - yield t + thread_head = t['signal']['thread_head'] + for thread in lists.list_for_each_entry(thread_head, task_ptr_type, 'thread_node'): + yield thread - t = utils.container_of(t['thread_group']['next'], - task_ptr_type, "thread_group") - if t == g: - break - - t = g = utils.container_of(g['tasks']['next'], - task_ptr_type, "tasks") + t = utils.container_of(t['tasks']['next'], + task_ptr_type, "tasks") if t == init_task: return |