From patchwork Wed Nov 11 22:18:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 56398 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp75144lbb; Wed, 11 Nov 2015 14:20:22 -0800 (PST) X-Received: by 10.67.30.227 with SMTP id kh3mr18095077pad.69.1447280419011; Wed, 11 Nov 2015 14:20:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ir5si15226884pbb.212.2015.11.11.14.20.18; Wed, 11 Nov 2015 14:20:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753246AbbKKWUD (ORCPT + 28 others); Wed, 11 Nov 2015 17:20:03 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35032 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753189AbbKKWT5 (ORCPT ); Wed, 11 Nov 2015 17:19:57 -0500 Received: by pasz6 with SMTP id z6so44326211pas.2 for ; Wed, 11 Nov 2015 14:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NGonuTmP2J8ciOTa5udK/K8cFJu568hPEslr18CwvH8=; b=zdxc7kK8HuBES4lO2fJUkXC59jho+Q3iJFqJsISkcMR/VcAZDOMGr2OhzcCvBEIqzS PNV31vsmysANV7v9OaCqsx5pu5611TJfsmUCwXDXe3P7t65uA3amodZn9ZDXPrypJqN6 9MWonDQJ0m7IOsetYe/oKxivj8kZAG2YSFD9pAbeP9GvoudZC5xNtoIxhjUM1femadGq cUFF6ecAPjlmPYF5aplS7Veeh61PXajWBlLm0Nk9bfMkAc/2E3ezwMI4jih0HepMtYck eNVuyiwu0y3VCoASbzmYOH7We6u1a7OHhnoKl//5hhLQIaAgh6VPq6CZ4HrhUX1Cmsi1 GZyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NGonuTmP2J8ciOTa5udK/K8cFJu568hPEslr18CwvH8=; b=eB2GGjNJOwblaPDnevNL9nYkJa1+kwoAZQ+iSZlcKVjz5Ktujx+7nJD1hpi2PlIWxV Q6nuA1aXee5mua6GM5GubNic4hOYwdiFCI/RDT33G49j0+cD+tVo00V9lbmi5zJWIsgr fIcRtXLO3pRE6vzs9vfchqGXa0BY6/m5FQMTmrFyBCTFIU8j9YezFhjU3CL2fzhdFo2A 8hbmuX5h/LKpIRiT6UpxLmVQATtVk9Qnh6fcgGvzD5WOuY+5x/OVHhL49mbklkZt3o7p XujD8zvgYUBy4HVQN4SJTSU6MWJ2fWMsTDHRHhImMkSToatLiAHNc729B2vMYCogp0oI Gv3Q== X-Gm-Message-State: ALoCoQnM2hPsLnrva25ZxrsKBlgTuPuwjF6P9SIULUoVNAODtAiAS6kCDxUsC8pMrRxbtptCARrH X-Received: by 10.68.87.161 with SMTP id az1mr17935830pbb.57.1447280397045; Wed, 11 Nov 2015 14:19:57 -0800 (PST) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id h10sm11156697pat.7.2015.11.11.14.19.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Nov 2015 14:19:56 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org, a.p.zijlstra@chello.nl, alexander.shishkin@linux.intel.com, acme@kernel.org, mingo@redhat.com, corbet@lwn.net, nicolas.pitre@linaro.org Cc: adrian.hunter@intel.com, zhang.chunyan@linaro.org, mike.leach@arm.com, tor@ti.com, al.grant@arm.com, pawel.moll@arm.com, fainelli@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org Subject: [PATCH V3 23/26] perf tools: making function set_max_cpu_num() non static Date: Wed, 11 Nov 2015 15:18:13 -0700 Message-Id: <1447280296-19147-24-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447280296-19147-1-git-send-email-mathieu.poirier@linaro.org> References: <1447280296-19147-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For memory allocation purposes, code located in other places then util/cpumap.c may want to know how many CPUs the system has. This patch is making function set_max_cpu_num() available to other parts of the perf tool so that global variable @max_cpu_num gets the right value when referenced by cpu__max_cpu(). Signed-off-by: Mathieu Poirier --- tools/perf/util/cpumap.c | 2 +- tools/perf/util/cpumap.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index 3667e2123e5b..97ef46e4a0f6 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -373,7 +373,7 @@ out: } /* Determine highest possible cpu in the system for sparse allocation */ -static void set_max_cpu_num(void) +void set_max_cpu_num(void) { const char *mnt; char path[PATH_MAX]; diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 0af9cecb4c51..6f7dce7dcca6 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -14,6 +14,7 @@ struct cpu_map { int map[]; }; +void set_max_cpu_num(void); struct cpu_map *cpu_map__new(const char *cpu_list); struct cpu_map *cpu_map__dummy_new(void); struct cpu_map *cpu_map__read(FILE *file);