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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150107074258.GE849@sejong>
Date:	Wed, 7 Jan 2015 16:42:58 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 4/5] perf diff: Fix output ordering to honor next column

Hi Jiri,

On Sun, Jan 04, 2015 at 07:16:40PM +0100, Jiri Olsa wrote:
> On Sat, Dec 27, 2014 at 02:06:32PM +0900, Namhyung Kim wrote:
> 
> SNIP
> 
> >  	if (!pairs_left || !pairs_right)
> >  		return pairs_left ? -1 : 1;
> >  
> > -	p_left  = get_pair_data(left,  &data__files[sort_compute]);
> > -	p_right = get_pair_data(right, &data__files[sort_compute]);
> > +	p_left  = get_pair_data(left,  &data__files[sort_idx]);
> > +	p_right = get_pair_data(right, &data__files[sort_idx]);
> >  
> >  	if (!p_left && !p_right)
> >  		return 0;
> > @@ -555,8 +560,13 @@ hist_entry__cmp_nop(struct hist_entry *left __maybe_unused,
> >  static int64_t
> >  hist_entry__cmp_baseline(struct hist_entry *left, struct hist_entry *right)
> >  {
> > -	if (sort_compute)
> > -		return 0;
> > +	/*
> > +	 * This function will be called first for each entry to resort
> > +	 * output.  Next compare-functions use this idx to find their
> > +	 * data and increase it for next data so we need to initialize
> > +	 * it everytime.
> > +	 */
> > +	data_idx = 0;
> 
> hum, could we omit the global 'data_idx' variable usage by passing
> 'struct perf_hpp_fmt' into color fmt callbacks? (like hist_entry__cmp_delta..)
> 
> we could get the data_idx from 'struct diff_hpp_fmt'::idx

Right, I thought that too.  But it requires adding '__maybe_unused
fmt' argument to all callbacks so I just decided to use a quick
solution.  I'll convert to pass the fmt argument as it'll make
possible future changes easier.

Thanks,
Namhyung
--
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