From patchwork Fri Nov 13 18:45:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 56539 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1214040lbb; Fri, 13 Nov 2015 10:47:58 -0800 (PST) X-Received: by 10.68.65.74 with SMTP id v10mr34005272pbs.67.1447440478356; Fri, 13 Nov 2015 10:47:58 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id we6si25135916pab.216.2015.11.13.10.47.58; Fri, 13 Nov 2015 10:47:58 -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 S1755143AbbKMSr4 (ORCPT + 28 others); Fri, 13 Nov 2015 13:47:56 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34657 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755003AbbKMSqx (ORCPT ); Fri, 13 Nov 2015 13:46:53 -0500 Received: by padhx2 with SMTP id hx2so107759821pad.1 for ; Fri, 13 Nov 2015 10:46:52 -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=TAKMQ7BNI3mZBefMOSSuX5pFq4HZlFH9taH7/JghNKbQ5jbDz7WlT+6Ee0ImEJe9Qb FInJC0xjPLlP7gtaHKr+IRhqzWZ4pey9YY0/1+QxfN6Rode9/81DPZf08os7pY5pvH7D EdQCDAoUoXIRRfC6bi9K3FE49PxUoUrjNfPn4kVpcHJZyYVwT9nytgAodULzDg+p8vKw 7N7XBAkGEHr8n5NQqRO6YIwPsQIHQyp1ocQXtdbtxyqe3+hG5Zz+XnxtBTrJeVr2fmtG Bb6dyVm+BJXhjVVVT5h4rufszEabBFTA+VKDqw9zR1VLANJ2wOyEda3Uqx4hstcvOQIU RHFQ== 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=Kv5nxhoZucwWZuqyU3EL5ZfJWt3Vz8bOwKSC9od+6Wg20u8KURsWsn1eWurbZFRSDy LOzLD1Udrfearw/uv4lY+oAAiQ7uFsdjNVHMXXUytv/a38d/goxxMLxbAHPUXVEIqDos 1StYsR8Yug5Vf0BBn8SXwRxOUXV4OXFkmEt5c18gimYJ+h8rub/fCK5EwTRVWHWbgOod qjzH7DyIxJ39N5PUgchNzkyKRsp54kRbjORMIzHrwcmtxK8AvG8pzms0s56NirhYO6mC TEoDmPesruDrKlloi9Qeyjv+M7fD6omv5Xg8OWqWR88Uwk58SmpOVj8Kts/80oMFOfvI v7wQ== X-Gm-Message-State: ALoCoQlb5822pbgI87S5UA5C6Uz9IZFtvV+1eTw/LCvhzs0AEgCi+eICMaD99ES/lNgwUOoAhvrI X-Received: by 10.66.252.129 with SMTP id zs1mr14345494pac.59.1447440412800; Fri, 13 Nov 2015 10:46:52 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [184.64.168.246]) by smtp.gmail.com with ESMTPSA id xi7sm21737967pbc.56.2015.11.13.10.46.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 10:46:52 -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 V4 23/26] perf tools: making function set_max_cpu_num() non static Date: Fri, 13 Nov 2015 11:45:14 -0700 Message-Id: <1447440317-1977-24-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447440317-1977-1-git-send-email-mathieu.poirier@linaro.org> References: <1447440317-1977-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);