Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754936Ab2JEJHQ (ORCPT ); Fri, 5 Oct 2012 05:07:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:33071 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754770Ab2JEJHJ (ORCPT ); Fri, 5 Oct 2012 05:07:09 -0400 Date: Fri, 5 Oct 2012 02:06:46 -0700 From: tip-bot for Namhyung Kim Message-ID: Cc: acme@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, namhyung.kim@lge.com, namhyung@kernel.org, jolsa@redhat.com, fweisbec@gmail.com, tglx@linutronix.de, asharma@fb.com Reply-To: mingo@kernel.org, hpa@zytor.com, eranian@google.com, linux-kernel@vger.kernel.org, acme@redhat.com, peterz@infradead.org, namhyung.kim@lge.com, namhyung@kernel.org, jolsa@redhat.com, fweisbec@gmail.com, tglx@linutronix.de, asharma@fb.com In-Reply-To: <1349354994-17853-9-git-send-email-namhyung@kernel.org> References: <1349354994-17853-9-git-send-email-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf hists: Move he->stat. nr_events initialization to a template Git-Commit-ID: c4b35351ef3145c9abad64999d1de0de1b8361ab 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Fri, 05 Oct 2012 02:06:51 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2130 Lines: 59 Commit-ID: c4b35351ef3145c9abad64999d1de0de1b8361ab Gitweb: http://git.kernel.org/tip/c4b35351ef3145c9abad64999d1de0de1b8361ab Author: Namhyung Kim AuthorDate: Thu, 4 Oct 2012 21:49:42 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 4 Oct 2012 13:35:14 -0300 perf hists: Move he->stat.nr_events initialization to a template Since it is set to 1 for a new hist entry, no need to set to separately. Move it to a template entry. Signed-off-by: Namhyung Kim Cc: Arun Sharma Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1349354994-17853-9-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/hist.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 3197f3f..02476cb 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -223,7 +223,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template) if (he != NULL) { *he = *template; - he->stat.nr_events = 1; + if (he->ms.map) he->ms.map->referenced = true; if (symbol_conf.use_callchain) @@ -323,6 +323,7 @@ struct hist_entry *__hists__add_branch_entry(struct hists *self, .level = al->level, .stat = { .period = period, + .nr_events = 1, }, .parent = sym_parent, .filtered = symbol__parent_filter(sym_parent), @@ -348,6 +349,7 @@ struct hist_entry *__hists__add_entry(struct hists *self, .level = al->level, .stat = { .period = period, + .nr_events = 1, }, .parent = sym_parent, .filtered = symbol__parent_filter(sym_parent), -- 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/