summaryrefslogtreecommitdiff
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2012-08-16 19:10:17 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-17 15:38:07 (GMT)
commitf4d834367cda98eee3769638da6ad687607c74e6 (patch)
tree09330b6187bdfab61645324f4fd0788a13bf79c7 /tools/perf/util/evsel.h
parent0985a94891c73740dea1e2697f9d598a4a7810ab (diff)
downloadlinux-fsl-qoriq-f4d834367cda98eee3769638da6ad687607c74e6.tar.xz
perf tools: Fix type for evsel->ids and add size check for ids
Use same type for ids everywhere. In case of writing to perf.data the size is u32. In pipe mode it is limited to header.size (less than u16). Adding a size check here. Size overflow due to casting shouldn't actually happen in practice, but during development this may cause type missmatch warninngs/errors, unifying types avoids this. Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1345144224-27280-2-git-send-email-robert.richter@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 65f39fd..94f6ba1 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -53,7 +53,7 @@ struct perf_evsel {
u64 *id;
struct perf_counts *counts;
int idx;
- int ids;
+ u32 ids;
struct hists hists;
char *name;
struct event_format *tp_format;