diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/header.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index fccd69dbbbb..e17a8fe9c4d 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2921,16 +2921,22 @@ int perf_event__process_tracing_data(union perf_event *event, session->repipe); padding = PERF_ALIGN(size_read, sizeof(u64)) - size_read; - if (readn(session->fd, buf, padding) < 0) - die("reading input file"); + if (readn(session->fd, buf, padding) < 0) { + pr_err("%s: reading input file", __func__); + return -1; + } if (session->repipe) { int retw = write(STDOUT_FILENO, buf, padding); - if (retw <= 0 || retw != padding) - die("repiping tracing data padding"); + if (retw <= 0 || retw != padding) { + pr_err("%s: repiping tracing data padding", __func__); + return -1; + } } - if (size_read + padding != size) - die("tracing data size mismatch"); + if (size_read + padding != size) { + pr_err("%s: tracing data size mismatch", __func__); + return -1; + } perf_evlist__prepare_tracepoint_events(session->evlist, session->pevent); |