Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323797
b: refs/heads/master
c: 32c7f73
h: refs/heads/master
i:
  323795: f829686
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Sep 9, 2012
1 parent 96a9081 commit 414c962
Show file tree
Hide file tree
Showing 2 changed files with 9 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: d5cb2aef4fda355fbafe8db4f425b73ea94d2019
refs/heads/master: 32c7f7383a096a4fc878fdda686c7725945e8a8f
14 changes: 8 additions & 6 deletions trunk/tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,14 +1023,16 @@ static int __test__rdpmc(void)

fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
if (fd < 0) {
die("Error: sys_perf_event_open() syscall returned "
"with %d (%s)\n", fd, strerror(errno));
pr_debug("Error: sys_perf_event_open() syscall returned "
"with %d (%s)\n", fd, strerror(errno));
return -1;
}

addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
if (addr == (void *)(-1)) {
die("Error: mmap() syscall returned "
"with (%s)\n", strerror(errno));
pr_debug("Error: mmap() syscall returned with (%s)\n",
strerror(errno));
goto out_close;
}

for (n = 0; n < 6; n++) {
Expand All @@ -1051,9 +1053,9 @@ static int __test__rdpmc(void)
}

munmap(addr, page_size);
close(fd);

pr_debug(" ");
out_close:
close(fd);

if (!delta_sum)
return -1;
Expand Down

0 comments on commit 414c962

Please sign in to comment.