Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349993
b: refs/heads/master
c: 2caa48a
h: refs/heads/master
i:
  349991: 687b85c
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 25, 2013
1 parent a6a8337 commit e8d0135
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d9233f205e8855dc762665e28012354cd46af45
refs/heads/master: 2caa48a24061b1f8e8dab43ea3292a608a15e3c9
18 changes: 12 additions & 6 deletions trunk/tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e8d0135

Please sign in to comment.