lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140709224849.GA23232@krava.redhat.com>
Date:	Thu, 10 Jul 2014 00:48:49 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	David Ahern <dsahern@...il.com>,
	Don Zickus <dzickus@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 04/16] perf hists browser: Override ui_browser
 refresh_dimensions method

On Tue, Jul 08, 2014 at 04:02:52PM -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@...hat.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..

> +	/*
> + 	 * 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

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ