]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - tools/perf/util/cpumap.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[mirror_ubuntu-artful-kernel.git] / tools / perf / util / cpumap.c
index 9bcf2bed3a6d1b7369ee4deee7f38e9c4abab06d..02d801670f30053fa1f6344f7a944bc8e2047842 100644 (file)
@@ -587,3 +587,15 @@ int cpu__setup_cpunode_map(void)
        closedir(dir1);
        return 0;
 }
+
+bool cpu_map__has(struct cpu_map *cpus, int cpu)
+{
+       int i;
+
+       for (i = 0; i < cpus->nr; ++i) {
+               if (cpus->map[i] == cpu)
+                       return true;
+       }
+
+       return false;
+}