public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Don Zickus <dzickus@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 04/16] perf hists browser: Override ui_browser refresh_dimensions method
Date: Thu, 10 Jul 2014 10:50:22 -0300	[thread overview]
Message-ID: <20140710135022.GB8014@kernel.org> (raw)
In-Reply-To: <20140709224849.GA23232@krava.redhat.com>

Em Thu, Jul 10, 2014 at 12:48:49AM +0200, Jiri Olsa escreveu:
> On Tue, Jul 08, 2014 at 04:02:52PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> 
> SNIP
> 
> > index ca63564d203a..ef7abf896f5a 100644
> > --- a/tools/perf/ui/browsers/hists.c
> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -56,11 +56,19 @@ static u32 hist_browser__nr_entries(struct hist_browser *hb)
> >  	return nr_entries + hb->nr_callchain_rows;
> >  }
> >  
> > -static void hist_browser__refresh_dimensions(struct hist_browser *browser)
> > +static void hist_browser__refresh_dimensions(struct ui_browser *browser)
> >  {
> > +	struct hist_browser *hb = container_of(browser, struct hist_browser, b);
> > +
> >  	/* 3 == +/- toggle symbol before actual hist_entry rendering */
> > -	browser->b.width = 3 + (hists__sort_list_width(browser->hists) +
> > -			     sizeof("[k]"));
> > +	browser->width = 3 + (hists__sort_list_width(hb->hists) + sizeof("[k]"));
> 
> why not remove this completely? it'll get overwritten in the
> following ui_browser__refresh_dimensions call anyway..

I thought I left a comment below it explaining that this would get fixed
at a later patch, but yeah, we can comment it out, leaving it just as a
hint at what needs to be done if we ever want to partition the screen
horizontally.
 
> > +	/*
> > + 	 * FIXME: Just keeping existing behaviour, but this really should be
> > + 	 *	  before updating browser->width, as it will invalidate the
> > + 	 *	  calculation above. Fix this and the fallout in another
> > + 	 *	  changeset.
> > + 	 */
> 
> extra whitespace above

Gack, thought I had that fixed, will check my pre-commit hooks... now:

  [acme@zoo linux]$ ls -la .git/hooks/pre-commit.sample 
  -rwxrwxr-x. 1 acme acme 1704 Abr 16  2013 .git/hooks/pre-commit.sample
  [acme@zoo linux]$ mv .git/hooks/pre-commit.sample .git/hooks/pre-commit
  [acme@zoo linux]$ vim .git/hooks/pre-commit
  [acme@zoo linux]$ tail -3 .git/hooks/pre-commit

  # If there are whitespace errors, print the offending file names and
  # fail.
  exec git diff-index --check --cached $against --
  [acme@zoo linux]

I guess I should catch those on this machine from now on.

- Arnaldo

  reply	other threads:[~2014-07-10 13:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 19:02 [GIT PULL 00/16] perf/cor improvements and fixes Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 01/16] perf ui browser: Add ->rows to disambiguate from ->height Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 02/16] perf ui browser: Allow overriding refresh_dimensions method Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 03/16] perf hists browser: Introduce gotorc method Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 04/16] perf hists browser: Override ui_browser refresh_dimensions method Arnaldo Carvalho de Melo
2014-07-09 22:48   ` Jiri Olsa
2014-07-10 13:50     ` Arnaldo Carvalho de Melo [this message]
2014-07-08 19:02 ` [PATCH 05/16] perf hists browser: Add support for showing columns header Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 06/16] perf hists browser: Display columns header text on 'H' press Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 07/16] perf hists browser: Add ui.show-headers config file option Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 08/16] perf hists browser: Left justify column headers Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 09/16] perf kvm: Introduce HAVE_KVM_STAT_SUPPORT flag Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 10/16] perf kvm: Simplify exit reasons tables definitions Arnaldo Carvalho de Melo
2014-07-08 19:02 ` [PATCH 11/16] perf kvm: Refactoring of cpu_isa_config() Arnaldo Carvalho de Melo
2014-07-08 19:03 ` [PATCH 12/16] perf tools: Allow to use cpuinfo on s390 Arnaldo Carvalho de Melo
2014-07-08 19:03 ` [PATCH 13/16] perf tools: Convert open coded equivalents to asprintf() Arnaldo Carvalho de Melo
2014-07-08 19:03 ` [PATCH 14/16] perf tools: Suggest using -f to override perf.data file ownership message Arnaldo Carvalho de Melo
2014-07-08 19:03 ` [PATCH 15/16] perf trace: Add pagefault statistics Arnaldo Carvalho de Melo
2014-07-08 19:03 ` [PATCH 16/16] perf trace: Fix build on 32-bit systems Arnaldo Carvalho de Melo
2014-07-16 11:47 ` [GIT PULL 00/16] perf/cor improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140710135022.GB8014@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=dzickus@redhat.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox