Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163775
b: refs/heads/master
c: 8b41266
h: refs/heads/master
i:
  163773: 8f7c3db
  163771: 36f480e
  163767: 1d46efc
  163759: 05f2e27
  163743: d64db90
  163711: cd5a55b
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 17, 2009
1 parent 2dc5469 commit 2bbfa46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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: 2667de81f3256c944b06abdf2c56c2f192fcb724
refs/heads/master: 8b412664d0a487c2e16ac43f4fcede346df33254
13 changes: 12 additions & 1 deletion trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ static int __cmd_record(int argc, const char **argv)
pid_t pid = 0;
int flags;
int ret;
unsigned long waking = 0;

page_size = sysconf(_SC_PAGE_SIZE);
nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
Expand Down Expand Up @@ -634,10 +635,20 @@ static int __cmd_record(int argc, const char **argv)
if (hits == samples) {
if (done)
break;
ret = poll(event_array, nr_poll, 100);
ret = poll(event_array, nr_poll, -1);
waking++;
}

if (done) {
for (i = 0; i < nr_cpu; i++) {
for (counter = 0; counter < nr_counters; counter++)
ioctl(fd[i][counter], PERF_COUNTER_IOC_DISABLE);
}
}
}

fprintf(stderr, "[ perf record: Woken up %ld times to write data ]\n", waking);

/*
* Approximate RIP event size: 24 bytes.
*/
Expand Down

0 comments on commit 2bbfa46

Please sign in to comment.