From: Avi Kivity <[email protected]> Instead of hardcoding [0, 1].
Signed-off-by: Avi Kivity <[email protected]> diff --git a/kvm/kvm_stat b/kvm/kvm_stat index d373c60..a2033fe 100755 --- a/kvm/kvm_stat +++ b/kvm/kvm_stat @@ -219,7 +219,10 @@ class TracepointProvider(object): return self._fields def select(self, _fields): self._fields = _fields - self.cpus = [0, 1] + cpure = r'cpu([0-9]+)' + self.cpus = [int(re.match(cpure, x).group(1)) + for x in os.listdir('/sys/devices/system/cpu') + if re.match(cpure, x)] fds = [] self.group_leaders = [] for cpu in self.cpus: -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
