diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-09-19 09:09:11 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-21 11:07:24 -0400 |
commit | 82deb8a242cd8aceaf553c9fb731f91dbdc1f9a6 (patch) | |
tree | 90ea3719d9d61f4ebd3a24a788fff18eda5b0bf2 /tools/perf | |
parent | 89f1c2c59c4aef8e26edbc7db5175e6ffb0e9ec7 (diff) |
perf evsel: Remove superfluous initialization of weight
Removing superfluous initialization of weight, it's already set to 0 via
memset.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1474290610-23241-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/evsel.c | 2 |
1 files changed, 0 insertions, 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, | |||
1728 | data->cpu = data->pid = data->tid = -1; | 1728 | data->cpu = data->pid = data->tid = -1; |
1729 | data->stream_id = data->id = data->time = -1ULL; | 1729 | data->stream_id = data->id = data->time = -1ULL; |
1730 | data->period = evsel->attr.sample_period; | 1730 | data->period = evsel->attr.sample_period; |
1731 | data->weight = 0; | ||
1732 | data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 1731 | data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
1733 | 1732 | ||
1734 | if (event->header.type != PERF_RECORD_SAMPLE) { | 1733 | if (event->header.type != PERF_RECORD_SAMPLE) { |
@@ -1935,7 +1934,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, | |||
1935 | } | 1934 | } |
1936 | } | 1935 | } |
1937 | 1936 | ||
1938 | data->weight = 0; | ||
1939 | if (type & PERF_SAMPLE_WEIGHT) { | 1937 | if (type & PERF_SAMPLE_WEIGHT) { |
1940 | OVERFLOW_CHECK_u64(array); | 1938 | OVERFLOW_CHECK_u64(array); |
1941 | data->weight = *array; | 1939 | data->weight = *array; |