Re: [PATCH 02/61] perf tools: Remove superfluous initialization of weight

From: Arnaldo Carvalho de Melo
Date: Wed Sep 21 2016 - 11:15:30 EST


Em Mon, Sep 19, 2016 at 03:09:11PM +0200, Jiri Olsa escreveu:
> Removing superfluous initialization of weight,
> it's already set to 0 via memset.

Thanks, applied.

> Link: http://lkml.kernel.org/n/tip-1fmf7sw8p16zwl9q6au10t7c@xxxxxxxxxxxxxx
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> ---
> tools/perf/util/evsel.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 21fd573106ed..f3225a2e6eee 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -1728,7 +1728,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
> data->cpu = data->pid = data->tid = -1;
> data->stream_id = data->id = data->time = -1ULL;
> data->period = evsel->attr.sample_period;
> - data->weight = 0;
> data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
>
> if (event->header.type != PERF_RECORD_SAMPLE) {
> @@ -1935,7 +1934,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
> }
> }
>
> - data->weight = 0;
> if (type & PERF_SAMPLE_WEIGHT) {
> OVERFLOW_CHECK_u64(array);
> data->weight = *array;
> --
> 2.7.4