From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753905AbbF3Eyo (ORCPT ); Tue, 30 Jun 2015 00:54:44 -0400 Received: from terminus.zytor.com ([198.137.202.10]:38474 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753976AbbF3Eyh (ORCPT ); Tue, 30 Jun 2015 00:54:37 -0400 Date: Mon, 29 Jun 2015 21:54:20 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: tglx@linutronix.de, adrian.hunter@intel.com, dsahern@gmail.com, acme@redhat.com, a.p.zijlstra@chello.nl, namhyung@kernel.org, jolsa@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org, hpa@zytor.com, eranian@google.com, mingo@kernel.org Reply-To: a.p.zijlstra@chello.nl, namhyung@kernel.org, jolsa@kernel.org, tglx@linutronix.de, acme@redhat.com, dsahern@gmail.com, adrian.hunter@intel.com, mingo@kernel.org, eranian@google.com, hpa@zytor.com, ak@linux.intel.com, linux-kernel@vger.kernel.org In-Reply-To: <1435310967-14570-8-git-send-email-jolsa@kernel.org> References: <1435310967-14570-8-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf stat: Rename struct perf_counts:: cpu member to values Git-Commit-ID: 57b289159ab4fe1f7b2b531464cf67f65e48dd00 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 57b289159ab4fe1f7b2b531464cf67f65e48dd00 Gitweb: http://git.kernel.org/tip/57b289159ab4fe1f7b2b531464cf67f65e48dd00 Author: Jiri Olsa AuthorDate: Fri, 26 Jun 2015 11:29:12 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 26 Jun 2015 11:25:03 -0300 perf stat: Rename struct perf_counts::cpu member to values Renaming 'struct xyarray *cpu' pointer to more fitting/generic values, because now we store both cpu and thread values. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1435310967-14570-8-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/stat.c | 12 ++++++------ tools/perf/util/stat.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 7bcc19b..197a2db 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -100,15 +100,15 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads) struct perf_counts *counts = zalloc(sizeof(*counts)); if (counts) { - struct xyarray *cpu; + struct xyarray *values; - cpu = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); - if (!cpu) { + values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); + if (!values) { free(counts); return NULL; } - counts->cpu = cpu; + counts->values = values; } return counts; @@ -117,14 +117,14 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads) void perf_counts__delete(struct perf_counts *counts) { if (counts) { - xyarray__delete(counts->cpu); + xyarray__delete(counts->values); free(counts); } } static void perf_counts__reset(struct perf_counts *counts) { - xyarray__reset(counts->cpu); + xyarray__reset(counts->values); } void perf_evsel__reset_counts(struct perf_evsel *evsel) diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h index e0b8dc5..295d1e2 100644 --- a/tools/perf/util/stat.h +++ b/tools/perf/util/stat.h @@ -46,13 +46,13 @@ struct perf_counts_values { struct perf_counts { s8 scaled; struct perf_counts_values aggr; - struct xyarray *cpu; + struct xyarray *values; }; static inline struct perf_counts_values* perf_counts(struct perf_counts *counts, int cpu, int thread) { - return xyarray__entry(counts->cpu, cpu, thread); + return xyarray__entry(counts->values, cpu, thread); } void update_stats(struct stats *stats, u64 val);