From patchwork Mon Nov 23 18:33:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 57178 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1602618lbb; Mon, 23 Nov 2015 10:34:56 -0800 (PST) X-Received: by 10.68.223.70 with SMTP id qs6mr37891399pbc.109.1448303690425; Mon, 23 Nov 2015 10:34:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si21229032pfa.89.2015.11.23.10.34.50; Mon, 23 Nov 2015 10:34:50 -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 S1755172AbbKWSeq (ORCPT + 28 others); Mon, 23 Nov 2015 13:34:46 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33600 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755166AbbKWSeg (ORCPT ); Mon, 23 Nov 2015 13:34:36 -0500 Received: by pabfh17 with SMTP id fh17so204853455pab.0 for ; Mon, 23 Nov 2015 10:34:36 -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=Fr3nmLWrK01Z73wVHjQ/ITI+ebKo+p1kCAfj5JpJREVP2lv97L74QwMr/wsqKuFaTz 2twpCSGOEHbq4ndvQKefB44EkiCON0CIx1b7fgJyGoH1YRuypg+vUwm2EdWQuch1Ud+X PtrXkdrUK3zBxVlP0diuIz5gmpafQ5wVSQ1nsPe/MrGaCiyyVBmQO03+8fKXbl2O8iM/ Wo0JQ32ySfFj/TKVYep+oeEjrMzDwjFL7jDfyEtCmUfrGpnijTTOy915JI3TP+qoA2At W6TMzccruKF5hAbO+hQXTVM2gVX2JiSKVU5fUnNH/SKELXsVSzW7qNGagFVlznDRgVdo lO6w== 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=HAvmEglLs4RhtiuHqQNFndnXKVK9GF2zFIgOEntwiif3MW4mVrYhCtHE6L8KERrTYM U0M0olFFb04sVqFg56jZMtkKYalb1MP/WX+mfcNCR5wZphGLb5ZA5+5k4wxlc9ZUpGOL ZBZLFZOzsb7IrUi6sB8WgWdBOFIXt+Hf3fkslF5QXXHBmF5IU4vWCK46WGWC9vFBYXUq vUwu9USfj2qESfL3FPfQbbw0hlroVq3EbFhFbjnXFkDaFyirEOBPeQMywV8FEv8nbBJN ZhC9PzAHD9BPqYpDHulP4SCQZlnRsH8X8tRYtxTZW/WIfb97ryJJC1IueGAfHsKwNab2 Hx/w== X-Gm-Message-State: ALoCoQlhrL0ytrizXUft87efb2/atpYDMqL/CY/2EzSN0ldo85Uo7xWMOB5F3J9kpAa/NlMGi92i X-Received: by 10.68.247.35 with SMTP id yb3mr37749394pbc.6.1448303676420; Mon, 23 Nov 2015 10:34:36 -0800 (PST) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id r20sm10865186pfa.93.2015.11.23.10.34.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Nov 2015 10:34:35 -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: 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 Subject: [RESEND PATCH V4 23/26] perf tools: making function set_max_cpu_num() non static Date: Mon, 23 Nov 2015 11:33:15 -0700 Message-Id: <1448303598-11249-24-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448303598-11249-1-git-send-email-mathieu.poirier@linaro.org> References: <1448303598-11249-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);