From: Don Zickus Date: Mon, 7 Apr 2014 18:55:21 +0000 (-0400) Subject: perf tools: Allow ability to map cpus to nodes easily X-Git-Tag: omap-for-v3.16/fixes-against-rc1~34^2~35^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7780c25bae59fd042281710f5e1243268e2c18dc;p=pandora-kernel.git perf tools: Allow ability to map cpus to nodes easily This patch figures out the max number of cpus and nodes that are on the system and creates a map of cpu to node. This allows us to provide a cpu and quickly get the node associated with it. It was mostly copied from builtin-kmem.c and tweaked slightly to use less memory (use possible cpus instead of max). It also calculates the max number of nodes. Signed-off-by: Don Zickus Reviewed-by: Namhyung Kim Link: http://lkml.kernel.org/r/1396896924-129847-2-git-send-email-dzickus@redhat.com [ Removing out label code in init_cpunode_map ] [ Adding check for snprintf error ] [ Removing unneeded returns ] Signed-off-by: Jiri Olsa --- Reading git-diff-tree failed