Lines Matching +full:per +full:- +full:cpu

4 #  per-cpu tools
6 # Copyright (c) Siemens AG, 2011-2013
27 return gdb.selected_thread().num - 1
31 raise gdb.GdbError("Sorry, obtaining the current CPU is not yet "
35 def per_cpu(var_ptr, cpu): argument
36 if cpu == -1:
37 cpu = get_current_cpu()
40 "trap_block[{0}].__per_cpu_base".format(str(cpu)))
44 "__per_cpu_offset[{0}]".format(str(cpu)))
77 entry = -1
94 cpu = entry * bits_per_entry + bit
99 yield int(cpu)
103 for cpu in cpu_list("__cpu_online_mask"):
104 yield cpu
108 for cpu in cpu_list("__cpu_present_mask"):
109 yield cpu
113 for cpu in cpu_list("__cpu_possible_mask"):
114 yield cpu
118 for cpu in cpu_list("__cpu_active_mask"):
119 yield cpu
123 """List CPU status arrays
125 Displays the known state of each CPU based on the kernel masks
129 super(LxCpus, self).__init__("lx-cpus", gdb.COMMAND_DATA)
142 """Return per-cpu variable.
144 $lx_per_cpu("VAR"[, CPU]): Return the per-cpu variable called VAR for the
145 given CPU number. If CPU is omitted, the CPU of the current context is used.
151 def invoke(self, var, cpu=-1): argument
152 return per_cpu(var.address, cpu).dereference()
159 """Return per-cpu pointer.
161 $lx_per_cpu_ptr("VAR"[, CPU]): Return the per-cpu pointer called VAR for the
162 given CPU number. If CPU is omitted, the CPU of the current context is used.
168 def invoke(self, var, cpu=-1): argument
169 return per_cpu(var, cpu)
175 def get_current_task(cpu): argument
186 return per_cpu(var_ptr, cpu).dereference()
217 $lx_current([CPU]): Return the per-cpu task variable for the given CPU
218 number. If CPU is omitted, the CPU of the current context is used."""
223 def invoke(self, cpu=-1): argument
224 return get_current_task(cpu)