kernel_optimize_test/scripts/gdb/linux
Xi Kangjie 883d50f56d scripts/gdb/linux/tasks.py: fix get_thread_info
Since kernel 4.9, the thread_info has been moved into task_struct, no
longer locates at the bottom of kernel stack.

See commits c65eacbe29 ("sched/core: Allow putting thread_info into
task_struct") and 15f4eae70d ("x86: Move thread_info into
task_struct").

Before fix:
  (gdb) set $current = $lx_current()
  (gdb) p $lx_thread_info($current)
  $1 = {flags = 1470918301}
  (gdb) p $current.thread_info
  $2 = {flags = 2147483648}

After fix:
  (gdb) p $lx_thread_info($current)
  $1 = {flags = 2147483648}
  (gdb) p $current.thread_info
  $2 = {flags = 2147483648}

Link: http://lkml.kernel.org/r/20180118210159.17223-1-imxikangjie@gmail.com
Fixes: 15f4eae70d ("x86: Move thread_info into task_struct")
Signed-off-by: Xi Kangjie <imxikangjie@gmail.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Kieran Bingham <kbingham@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-01-19 10:09:41 -08:00
..
__init__.py
.gitignore scripts/gdb: add constants.py to .gitignore 2016-07-15 14:54:27 +09:00
constants.py.in scripts/gdb: add lx-fdtdump command 2017-07-12 16:26:00 -07:00
cpus.py scripts/gdb: cast CPU numbers to integer 2016-05-23 17:04:14 -07:00
dmesg.py scripts/gdb: lx-dmesg: use explicit encoding=utf8 errors=replace 2017-07-12 16:26:01 -07:00
lists.py scripts/gdb: provide kernel list item generators 2016-05-23 17:04:14 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
modules.py scripts/gdb: support !CONFIG_MODULES gracefully 2016-05-23 17:04:14 -07:00
proc.py scripts/gdb: add lx-fdtdump command 2017-07-12 16:26:00 -07:00
symbols.py scripts/gdb: Perform path expansion to lx-symbol's arguments 2016-07-15 14:54:27 +09:00
tasks.py scripts/gdb/linux/tasks.py: fix get_thread_info 2018-01-19 10:09:41 -08:00
utils.py scripts/gdb: improve types abstraction for gdb python scripts 2016-05-23 17:04:14 -07:00