From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbcJEN1N (ORCPT ); Wed, 5 Oct 2016 09:27:13 -0400 Received: from mail.kernel.org ([198.145.29.136]:38826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146AbcJEN1M (ORCPT ); Wed, 5 Oct 2016 09:27:12 -0400 Date: Wed, 5 Oct 2016 10:26:58 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Jiri Olsa , lkml , Don Zickus , Joe Mario , Ingo Molnar , Peter Zijlstra , Namhyung Kim , David Ahern , Andi Kleen Subject: Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Message-ID: <20161005132658.GC30363@kernel.org> References: <1474558645-19956-1-git-send-email-jolsa@kernel.org> <1474558645-19956-21-git-send-email-jolsa@kernel.org> <20161005110141.GM7143@kernel.org> <20161005124537.GB14500@krava> <20161005130929.GA19307@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005130929.GA19307@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Oct 05, 2016 at 03:09:29PM +0200, Jiri Olsa escreveu: > On Wed, Oct 05, 2016 at 02:45:37PM +0200, Jiri Olsa wrote: > > SNIP > > > > > + > > > > + if (he->mem_info) > > > > + addr = cl_address(he->mem_info->daddr.addr); > > > > + > > > > + return snprintf(hpp->buf, hpp->size, "%*s", width, hex_str(addr)); > > > > > > So here you get that static buffer and then truncate it? Wouldn't the > > > perf_hpp stuff take care of this? Can't we stop using that static buffer > > > and this truncation at such a level? > > > > I think we need to cut it on this level, but I actualy might recall some > > change you did for perf_hpp to cut this on column width later on? > > > > I'll check on that.. > > ok, so it's cut later on, but it allows only for left-side alignment > while we use the right-side one > > if I leave it on perf_hpp to deal with it I end up with following output: > (check the Cacheline column) Which is not _that_ bad, I guess it gets like that because we expect kernel addresses as well (longer)? [root@jouet ~]# grep icmp_rcv /proc/kallsyms | cut -d' ' -f 1 | wc -c 17 [root@jouet ~]# echo -n .................. | wc -c 18 [root@jouet ~]# How to indicate to the hpp code that we want right alignment? Namhyung? > > # Total Rmt ----- LLC Load Hitm ----- ---- Store Reference ---- --- Load Dram ---- LLC Total ----- Core Load Hit > # Index Cacheline records Hitm Total Lcl Rmt Total L1Hit L1Miss Lcl Rmt Ld Miss Loads FB L1 > # ..... .................. ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... .. > # > 0 0x3d2e300 273 0.53% 44 22 22 40 40 0 0 0 22 233 107 78 > 1 0x3d001c0 68 0.51% 22 1 21 2 2 0 0 2 25 66 30 7 > 2 0x3d00200 165 0.48% 22 2 20 20 20 0 0 0 20 145 89 34 > 3 0x3d5ca80 22 0.41% 19 2 17 3 3 0 0 0 17 19 0 0 > > > while current code does: > > # Total Rmt ----- LLC Load Hitm ----- ---- Store Reference ---- --- Load Dram ---- LLC Total ----- Core Load Hit > # Index Cacheline records Hitm Total Lcl Rmt Total L1Hit L1Miss Lcl Rmt Ld Miss Loads FB L1 > # ..... .................. ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... .. > # > 0 0x3d2e300 273 0.53% 44 22 22 40 40 0 0 0 22 233 107 78 > 1 0x3d001c0 68 0.51% 22 1 21 2 2 0 0 2 25 66 30 7 > 2 0x3d00200 165 0.48% 22 2 20 20 20 0 0 0 20 145 89 34 > 3 0x3d5ca80 22 0.41% 19 2 17 3 3 0 0 0 17 19 0 0 > > > I'll make the snprintf/scnprintf replacement > based on your acme/tmp.perf/c2c.2 Thanks, > thanks, > jirka