From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764240AbdDSOPs (ORCPT ); Wed, 19 Apr 2017 10:15:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39526 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764206AbdDSOPn (ORCPT ); Wed, 19 Apr 2017 10:15:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7728F811A7 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7728F811A7 Date: Wed, 19 Apr 2017 16:15:23 +0200 From: Jiri Olsa To: Jin Yao Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v5 6/7] perf report: Show branch type statistics for stdio mode Message-ID: <20170419141523.GC19643@krava> References: <1492616894-3635-1-git-send-email-yao.jin@linux.intel.com> <1492616894-3635-7-git-send-email-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1492616894-3635-7-git-send-email-yao.jin@linux.intel.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 19 Apr 2017 14:15:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 19, 2017 at 11:48:13PM +0800, Jin Yao wrote: SNIP > +static void branch_type_stat_display(FILE *fp, struct branch_type_stat *stat) > +{ > + u64 total = 0; > + int i; > + > + for (i = 0; i < PERF_BR_MAX; i++) > + total += stat->counts[i]; > + > + if (total == 0) > + return; > + > + fprintf(fp, "\n#"); > + fprintf(fp, "\n# Branch Statistics:"); > + fprintf(fp, "\n#"); > + > + if (stat->jcc_fwd > 0) > + fprintf(fp, "\n%12s: %5.1f%%", > + "JCC forward", > + 100.0 * (double)stat->jcc_fwd / (double)total); > + > + if (stat->jcc_bwd > 0) > + fprintf(fp, "\n%12s: %5.1f%%", > + "JCC backward", > + 100.0 * (double)stat->jcc_bwd / (double)total); > + > + if (stat->cross_4k > 0) > + fprintf(fp, "\n%12s: %5.1f%%", > + "CROSS_4K", > + 100.0 * (double)stat->cross_4k / (double)total); > + > + if (stat->cross_2m > 0) > + fprintf(fp, "\n%12s: %5.1f%%", > + "CROSS_2M", > + 100.0 * (double)stat->cross_2m / (double)total); {} brackets here as well thanks, jirka