perf evsel: Remove superfluous initialization of weight
[cascardo/linux.git] / tools / perf / util / evsel.c
index 21fd573..f3225a2 100644 (file)
@@ -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;