]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix type for evsel->ids and add size check for ids
authorRobert Richter <robert.richter@amd.com>
Thu, 16 Aug 2012 19:10:17 +0000 (21:10 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 17 Aug 2012 15:38:07 +0000 (12:38 -0300)
commiteaaa18f2fd8eca4a1e4d76b2baa636021690f296
tree09330b6187bdfab61645324f4fd0788a13bf79c7
parentba39e05b6c17a013dd6bca21cc0324add8b447e1
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>
tools/perf/util/evsel.h
tools/perf/util/header.c
tools/perf/util/header.h