From patchwork Sun Oct 18 18:24:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 55191 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 031C022FFA for ; Sun, 18 Oct 2015 18:26:35 +0000 (UTC) Received: by lffy185 with SMTP id y185sf32560620lff.2 for ; Sun, 18 Oct 2015 11:26:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=JagjQuNDMlsgHCF8w4GX0JVnkxBEgUxXtetijOsXHl0=; b=CrWnAbIFGR+HsRhUffYW6d/kMj/6qeK/EgDEuQ9IpcF7NvdvJco0ZDmat78VC5MVYz mx8O5ltF9L5hP+WcQeKVD+J5red0zUVvG6Nww5Y9CuNoUhCPBBag1iaP9z7yUXiQCe3G HYcErbAu50gNXR+96PawXjUaRScm1B8nB1kAwWHt6elt9Ay3SEDCFj4icUaQN0e+U+tw fAPbzYUyy7m4tFt2OnRmIW7w/PPpGAR01jY0r5Y9nCggs4Z+XQLxN9w0QbSIbDxi+Sf5 lE/uIH6U+zRS+/A982bQiwYwtQnUD8sNJ89rkhD1k5cTZglnIoGuwtxHuFu8vEfJIyXl oQhg== X-Gm-Message-State: ALoCoQkKGrawInVcm264IdSvZtIyPF0uILTgcAD1P24l/sdC0h8dFLpV45eMOZ3z0iAw9b9C7esw X-Received: by 10.194.248.131 with SMTP id ym3mr296775wjc.7.1445192793777; Sun, 18 Oct 2015 11:26:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.17.203 with SMTP id 72ls464565lfr.24.gmail; Sun, 18 Oct 2015 11:26:33 -0700 (PDT) X-Received: by 10.25.207.82 with SMTP id f79mr8452414lfg.73.1445192793595; Sun, 18 Oct 2015 11:26:33 -0700 (PDT) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id b7si20097246lfb.164.2015.10.18.11.26.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 11:26:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lfaz124 with SMTP id z124so97489975lfa.1 for ; Sun, 18 Oct 2015 11:26:33 -0700 (PDT) X-Received: by 10.25.150.199 with SMTP id y190mr8414353lfd.35.1445192793443; Sun, 18 Oct 2015 11:26:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1078051lbq; Sun, 18 Oct 2015 11:26:32 -0700 (PDT) X-Received: by 10.66.182.135 with SMTP id ee7mr29751854pac.95.1445192784612; Sun, 18 Oct 2015 11:26:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yj10si46408823pab.237.2015.10.18.11.26.24; Sun, 18 Oct 2015 11:26:24 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752648AbbJRS0U (ORCPT + 28 others); Sun, 18 Oct 2015 14:26:20 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:34535 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752409AbbJRS0O (ORCPT ); Sun, 18 Oct 2015 14:26:14 -0400 Received: by padhk11 with SMTP id hk11so6284212pad.1 for ; Sun, 18 Oct 2015 11:26:13 -0700 (PDT) X-Received: by 10.68.194.73 with SMTP id hu9mr30359488pbc.146.1445192773647; Sun, 18 Oct 2015 11:26:13 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [184.64.168.246]) by smtp.gmail.com with ESMTPSA id hq1sm20402076pbb.43.2015.10.18.11.26.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Oct 2015 11:26:13 -0700 (PDT) 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, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org Subject: [PATCH V2 24/30] perf tools: making function set_max_cpu_num() non static Date: Sun, 18 Oct 2015 12:24:41 -0600 Message-Id: <1445192687-24112-25-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445192687-24112-1-git-send-email-mathieu.poirier@linaro.org> References: <1445192687-24112-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , For memory allocation purpuses, 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(-) 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);