diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-09-23 09:42:11 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-23 09:42:11 +0200 |
commit | b5727270ecd807f75a8d5d1450cec39495fc794a (patch) | |
tree | b40753b713a39f41179bd0b48668f363814664fd /tools/perf/util/session.c | |
parent | perf/x86/intel: Fix static checker warning in lbr enable (diff) | |
parent | Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-b5727270ecd807f75a8d5d1450cec39495fc794a.tar.xz linux-b5727270ecd807f75a8d5d1450cec39495fc794a.zip |
Merge branch 'perf/urgent' into perf/core to pick up fixes before pulling new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index d1a43a322f96..f5e000030a5e 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1565,7 +1565,10 @@ static int __perf_session__process_events(struct perf_session *session, file_offset = page_offset; head = data_offset - page_offset; - if (data_size && (data_offset + data_size < file_size)) + if (data_size == 0) + goto out; + + if (data_offset + data_size < file_size) file_size = data_offset + data_size; ui_progress__init(&prog, file_size, "Processing events..."); |