Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495889

Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key
Date 2016-10-05 16:10 +0200
Message-ID <soV3s-209-7@gated-at.bofh.it> (permalink)
References (1 earlier) <skegq-8a2-33@gated-at.bofh.it> <soSff-bT-3@gated-at.bofh.it> <soTO1-11H-5@gated-at.bofh.it> <soU7n-1nW-3@gated-at.bofh.it> <soUqK-1wC-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 05, 2016 at 10:26:58AM -0300, Arnaldo Carvalho de Melo wrote:
> 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?

hum, the hist_entry__snprintf_alignment just adds missing spaces
if there's any..

I think we should allow the upper layer to align based on its needs

but maybe change hist_entry__snprintf_alignment to also force the
width (like cut the overlap) in case it overflows

jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-05 13:10 +0200
  Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Jiri Olsa <jolsa@redhat.com> - 2016-10-05 14:50 +0200
    Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Jiri Olsa <jolsa@redhat.com> - 2016-10-05 15:10 +0200
      Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-05 15:30 +0200
        Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Jiri Olsa <jolsa@redhat.com> - 2016-10-05 15:40 +0200
        Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Jiri Olsa <jolsa@redhat.com> - 2016-10-05 16:10 +0200
    Re: [PATCH 20/57] perf c2c report: Add dcacheline dimension key Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-05 15:30 +0200

csiph-web