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]
Date:	Mon, 12 Jan 2015 17:40:50 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Namhyung Kim <namhyung@...nel.org>, Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	Kan Liang <kan.liang@...el.com>, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH 5/7] perf tools: Pass struct perf_hpp_fmt to its callbacks

On Mon, Jan 12, 2015 at 01:27:36PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Jan 12, 2015 at 01:21:40PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Jan 08, 2015 at 09:45:46AM +0900, Namhyung Kim escreveu:
> > > Currently ->cmp, ->collapse and ->sort callbacks doesn't pass
> > > corresponding fmt.  But it'll be needed by upcoming changes in
> > > perf diff command.
> > > 
> > > Suggested-by: Jiri Olsa <jolsa@...nel.org>
> > 
> > 
> >   CC       /tmp/build/perf/builtin-evlist.o
> > builtin-diff.c: In function ‘data__hpp_register’:
> > builtin-diff.c:1036:11: error: assignment from incompatible pointer type [-Werror]
> >   fmt->cmp    = hist_entry__cmp_nop;
> >            ^
> > builtin-diff.c:1037:16: error: assignment from incompatible pointer type [-Werror]
> >   fmt->collapse = hist_entry__cmp_nop;
> >                 ^
> > builtin-diff.c:1043:13: error: assignment from incompatible pointer type [-Werror]
> >    fmt->sort  = hist_entry__cmp_baseline;
> >              ^
> > builtin-diff.c:1047:13: error: assignment from incompatible pointer type [-Werror]
> >    fmt->sort  = hist_entry__cmp_delta;
> >              ^
> > builtin-diff.c:1051:13: error: assignment from incompatible pointer type [-Werror]
> >    fmt->sort  = hist_entry__cmp_ratio;
> >              ^
> > builtin-diff.c:1055:13: error: assignment from incompatible pointer type [-Werror]
> >    fmt->sort  = hist_entry__cmp_wdiff;
> >              ^
> > builtin-diff.c:1058:13: error: assignment from incompatible pointer type [-Werror]
> >    fmt->sort  = hist_entry__cmp_nop;
> >              ^
> > cc1: all warnings being treated as errors
> >   LINK     plugin_kvm.so
> > make[1]: *** [/tmp/build/perf/builtin-diff.o] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> >   LINK     plugin_mac80211.so
> 
> Am I missing something? Lemme continue trying applying the rest of the
> kit...

hum,
looks like those (= hist_entry__cmp_delta,.. functions) are fixed (=added fmt param)
later in patch 6/7 of this series.. which is wrong, should be updated in this patch,
as you did below

jirka


> 
> - Arnaldo
>  
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index ae8f62151b34..4816989a84b0 100644
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -554,14 +554,16 @@ hist_entry__cmp_compute(struct hist_entry *left, struct hist_entry *right,
>  }
>  
>  static int64_t
> -hist_entry__cmp_nop(struct hist_entry *left __maybe_unused,
> +hist_entry__cmp_nop(struct perf_hpp_fmt *fmt __maybe_unused,
> +		    struct hist_entry *left __maybe_unused,
>  		    struct hist_entry *right __maybe_unused)
>  {
>  	return 0;
>  }
>  
>  static int64_t
> -hist_entry__cmp_baseline(struct hist_entry *left, struct hist_entry *right)
> +hist_entry__cmp_baseline(struct perf_hpp_fmt *fmt __maybe_unused,
> +			 struct hist_entry *left, struct hist_entry *right)
>  {
>  	if (sort_compute)
>  		return 0;
> @@ -572,19 +574,22 @@ hist_entry__cmp_baseline(struct hist_entry *left, struct hist_entry *right)
>  }
>  
>  static int64_t
> -hist_entry__cmp_delta(struct hist_entry *left, struct hist_entry *right)
> +hist_entry__cmp_delta(struct perf_hpp_fmt *fmt __maybe_unused,
> +		      struct hist_entry *left, struct hist_entry *right)
>  {
>  	return hist_entry__cmp_compute(right, left, COMPUTE_DELTA);
>  }
>  
>  static int64_t
> -hist_entry__cmp_ratio(struct hist_entry *left, struct hist_entry *right)
> +hist_entry__cmp_ratio(struct perf_hpp_fmt *fmt __maybe_unused,
> +		      struct hist_entry *left, struct hist_entry *right)
>  {
>  	return hist_entry__cmp_compute(right, left, COMPUTE_RATIO);
>  }
>  
>  static int64_t
> -hist_entry__cmp_wdiff(struct hist_entry *left, struct hist_entry *right)
> +hist_entry__cmp_wdiff(struct perf_hpp_fmt *fmt __maybe_unused,
> +		      struct hist_entry *left, struct hist_entry *right)
>  {
>  	return hist_entry__cmp_compute(right, left, COMPUTE_WEIGHTED_DIFF);
>  }
--
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