Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp68363imm; Wed, 5 Sep 2018 15:08:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBphr6B/ASMU0OeeK3Xyg91N8vVjSDf5MiCiLNQsQwBXNmkFE8OSFL+VJ60cmTb8t6DcQ2 X-Received: by 2002:a63:2445:: with SMTP id k66-v6mr32246788pgk.405.1536185290157; Wed, 05 Sep 2018 15:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185290; cv=none; d=google.com; s=arc-20160816; b=lSHl743IdzTc4W7P5kj3b9cms0lQjaDPLFmBovM1HaJxlCRcJu21LpQnZK2JGuZEy/ tozOtS7NM5kmKKH6jOlr6W/IsMEHyuVs2adJiBRbfkR0Hb9oZsVJ4gPAbtA5tT+ga2ou Yat1XptpIj/h3tBGXXUZLoYg+Wa6kWee94rTf845H5Pucs0P9Vut75dQP4Tk42w9lxNM RKaLNWcHaWtG76AjK8uhL27JsEa4F4H6NL61aRZr386EtYQYrtwAKU69vGwBhbJMTNlu EqGOR26Onla+UWVfXzgsSdtdc4opsUDSh9+MGMVX4X5BzfxyDQcHf2jacQDeIJGM1K7M yW6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4lOMnotoQxpabGTQRcW0b3toNaM3vB9LdVAQ6gDzxEA=; b=FhyvGMcml/heqR3uNVMWczfm6+obUYa3QeXjHwj1BbUBCyPdhjpFfBzUD4z+UAwQ1c jz+En1AdvPcg5LaG1M1lKttolNDVxBAFOUXshRv2ZDi/PaFPnXJQB3R07sQqmfDSVf1k s9YLw7291J+mVqTJT9j64ZtZxz9ypR2YF4PSzc7WcLg9pZVCfJLxnNyM4fVFC6ZkosUp 3acysZThg2DPNMTrYUGBzrNVuhYJ4K1mVMrUxYZx8pmTD8e1noNkNlTmoaLMonGGyT5K 5kjGxCmQSReerHzJwEF/+MXVmN/w/WI+JeWMcTDH3e9EI5mE/W5CveAH36pZKb2e0khu XXHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kgir5PRg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t80-v6si3497948pfk.228.2018.09.05.15.07.54; Wed, 05 Sep 2018 15:08:10 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kgir5PRg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728499AbeIFCiW (ORCPT + 99 others); Wed, 5 Sep 2018 22:38:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:52824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728389AbeIFCiV (ORCPT ); Wed, 5 Sep 2018 22:38:21 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F3AF020839; Wed, 5 Sep 2018 22:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185170; bh=GGmqwgd6Or8hYduwL1Rs86U7q5e93Ix1E1tucQs7CTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kgir5PRgPgJUnj6SAkTN15zZDCj+kLKTmzFMGzcTe2O5cIrecHT1t0xFmdWWHtFsM GMRgtZggCrj0DZkI+RYVPFFixUuFIvUuJu8pv+3CdcnSHVQEixW6pWp//RyheCfwTD TsT8eHwUdLhi1wyPgeNCSpBbTU5e+ND3b39OXZH8= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Jiri Olsa , Alexander Shishkin , Andi Kleen , David Ahern , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 29/77] perf stat: Use local config arg for scale in create_perf_stat_counter() Date: Wed, 5 Sep 2018 19:03:52 -0300 Message-Id: <20180905220440.20256-30-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180905220440.20256-1-acme@kernel.org> References: <20180905220440.20256-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa Use the local 'scale' member in the 'struct perf_stat_config' argument instead of the global 'stat_config' variable, to make the function independent. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 84dbac526925..47789558899a 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -240,7 +240,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel, struct perf_event_attr *attr = &evsel->attr; struct perf_evsel *leader = evsel->leader; - if (stat_config.scale) { + if (config->scale) { attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED | PERF_FORMAT_TOTAL_TIME_RUNNING; } -- 2.14.4