summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-08 11:51:31 +0200
committerIngo Molnar <mingo@kernel.org>2013-10-08 11:51:31 +0200
commit429eb051011a580beae2dc9f8caed5dade9591dc (patch)
treeb777c5d032e34c634aa19bf9fc0833390b37d7f1 /tools/perf/util/session.c
parentb7af41a1bc255c0098c37a4bcf5c7e5e168ce875 (diff)
parent1651d120baddf68846188bcdf0ef5350068436cf (diff)
Merge branch 'perf/urgent' into tools/perf/build
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 211b325791a..b97f468af95 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -256,6 +256,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
tool->sample = process_event_sample_stub;
if (tool->mmap == NULL)
tool->mmap = process_event_stub;
+ if (tool->mmap2 == NULL)
+ tool->mmap2 = process_event_stub;
if (tool->comm == NULL)
tool->comm = process_event_stub;
if (tool->fork == NULL)
@@ -1313,7 +1315,7 @@ int __perf_session__process_events(struct perf_session *session,
file_offset = page_offset;
head = data_offset - page_offset;
- if (data_offset + data_size < file_size)
+ if (data_size && (data_offset + data_size < file_size))
file_size = data_offset + data_size;
progress_next = file_size / 16;