diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-17 19:55:13 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-17 19:55:13 -0400 |
commit | 9d066a252786e1a18484a6283f82614d42a9f4ac (patch) | |
tree | 72188d2f86b3d0c4100257c8d5734f2c648a8bc7 /scripts/gdb/linux/tasks.py | |
parent | 79ee2e8f730411a30b271d5f9cdeae189fa66174 (diff) | |
parent | b00345d1994d588fa2687e1238fcd542f0320cba (diff) |
Merge branches 'pm-opp' and 'pm-cpufreq-fixes'
* pm-opp:
PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table
* pm-cpufreq-fixes:
cpufreq: intel_pstate: Adjust _PSS[0] freqeuency if needed
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r-- | scripts/gdb/linux/tasks.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 862a4ae24d49..1bf949c43b76 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py | |||
@@ -114,3 +114,22 @@ variable.""" | |||
114 | 114 | ||
115 | 115 | ||
116 | LxThreadInfoFunc() | 116 | LxThreadInfoFunc() |
117 | |||
118 | |||
119 | class LxThreadInfoByPidFunc (gdb.Function): | ||
120 | """Calculate Linux thread_info from task variable found by pid | ||
121 | |||
122 | $lx_thread_info_by_pid(PID): Given PID, return the corresponding thread_info | ||
123 | variable.""" | ||
124 | |||
125 | def __init__(self): | ||
126 | super(LxThreadInfoByPidFunc, self).__init__("lx_thread_info_by_pid") | ||
127 | |||
128 | def invoke(self, pid): | ||
129 | task = get_task_by_pid(pid) | ||
130 | if task: | ||
131 | return get_thread_info(task.dereference()) | ||
132 | else: | ||
133 | raise gdb.GdbError("No task of PID " + str(pid)) | ||
134 | |||
135 | LxThreadInfoByPidFunc() | ||