]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Add file size check and factor dso__data_read_offset
authorJiri Olsa <jolsa@kernel.org>
Wed, 7 May 2014 16:51:41 +0000 (18:51 +0200)
committerJiri Olsa <jolsa@kernel.org>
Thu, 12 Jun 2014 14:53:21 +0000 (16:53 +0200)
commit1c0162fe09be83629616fa13495fee43e18923fc
treef3704df2485b4250ac7df3027edf7a665ef68cb1
parent2b39b265337fb7058abddbe37e93a50ad445a875
perf tools: Add file size check and factor dso__data_read_offset

Adding file size check, because the lseek will succeed for
any offset behind file size and thus succeed when it was
expected to fail.

Factoring the code to check the offset against file size
earlier in the flow.

Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1401892622-30848-8-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
tools/perf/util/dso.c
tools/perf/util/dso.h