Lines Matching +full:per +full:- +full:cpu
4 # per-cpu tools
6 # Copyright (c) Siemens AG, 2011-2013
24 return gdb.selected_thread().num - 1
27 if tid > (0x100000000 - MAX_CPUS - 2):
28 return 0x100000000 - tid - 2
30 return tasks.get_thread_info(tasks.get_task_by_pid(tid))['cpu']
32 raise gdb.GdbError("Sorry, obtaining the current CPU is not yet "
36 def per_cpu(var_ptr, cpu): argument
37 if cpu == -1:
38 cpu = get_current_cpu()
41 "trap_block[{0}].__per_cpu_base".format(str(cpu)))
45 "__per_cpu_offset[{0}]".format(str(cpu)))
78 entry = -1
95 cpu = entry * bits_per_entry + bit
100 yield int(cpu)
104 for cpu in cpu_list("__cpu_online_mask"):
105 yield cpu
109 for cpu in cpu_list("__cpu_present_mask"):
110 yield cpu
114 for cpu in cpu_list("__cpu_possible_mask"):
115 yield cpu
119 for cpu in cpu_list("__cpu_active_mask"):
120 yield cpu
124 """List CPU status arrays
126 Displays the known state of each CPU based on the kernel masks
130 super(LxCpus, self).__init__("lx-cpus", gdb.COMMAND_DATA)
143 """Return per-cpu variable.
145 $lx_per_cpu("VAR"[, CPU]): Return the per-cpu variable called VAR for the
146 given CPU number. If CPU is omitted, the CPU of the current context is used.
152 def invoke(self, var_name, cpu=-1): argument
154 return per_cpu(var_ptr, cpu)
163 $lx_current([CPU]): Return the per-cpu task variable for the given CPU
164 number. If CPU is omitted, the CPU of the current context is used."""
169 def invoke(self, cpu=-1): argument
171 return per_cpu(var_ptr, cpu).dereference()