From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754272AbbEZNpx (ORCPT ); Tue, 26 May 2015 09:45:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753418AbbEZNpu (ORCPT ); Tue, 26 May 2015 09:45:50 -0400 Date: Tue, 26 May 2015 12:09:12 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, eranian@google.com, Andi Kleen Subject: Re: [PATCH 04/10] perf, tools, report: Add processing for cycle histograms Message-ID: <20150526100912.GE6555@krava.brq.redhat.com> References: <1431265926-4766-1-git-send-email-andi@firstfloor.org> <1431265926-4766-5-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431265926-4766-5-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 10, 2015 at 06:52:00AM -0700, Andi Kleen wrote: SNIP > mi = he->mem_info; > err = addr_map_symbol__inc_samples(&mi->daddr, evsel->idx); > diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c > index 302fc05..cf6b48b 100644 > --- a/tools/perf/util/hist.c > +++ b/tools/perf/util/hist.c > @@ -1412,6 +1412,39 @@ int hists__link(struct hists *leader, struct hists *other) > return 0; > } > > +void hist__account_cycles(struct branch_stack *bs, struct addr_location *al, > + struct perf_sample *sample, bool nonstd_branch_mode) > +{ > + struct branch_info *bi; > + > + /* If we have branch cycles always annotate them. */ > + if (bs && bs->nr && bs->entries[0].flags.cycles) { hum, so this is assuming that having cycles fort 1st entry means there'll be for the rest? Also in that case why is there the '!= cycles' check within addr_map_symbol__account_cycles ? jirka