Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147291
b: refs/heads/master
c: 0fd112e
h: refs/heads/master
i:
  147289: 53917f9
  147287: 00d6c73
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 6, 2009
1 parent b9c7924 commit 3014c9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: cbe46555dc4de6403cd757139d42289b5f21abb9
refs/heads/master: 0fd112e41cd6f6d4779cbe327c3632d087e31476
11 changes: 6 additions & 5 deletions trunk/Documentation/perf_counter/kerneltop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,10 +1157,10 @@ static void mmap_read(struct mmap_data *md)

int main(int argc, char *argv[])
{
struct pollfd event_array[MAX_NR_CPUS][MAX_COUNTERS];
struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS];
struct mmap_data mmap_array[MAX_NR_CPUS][MAX_COUNTERS];
struct perf_counter_hw_event hw_event;
int i, counter, group_fd;
int i, counter, group_fd, nr_poll = 0;
unsigned int cpu;
int ret;

Expand Down Expand Up @@ -1214,8 +1214,9 @@ int main(int argc, char *argv[])
if (group && group_fd == -1)
group_fd = fd[i][counter];

event_array[i][counter].fd = fd[i][counter];
event_array[i][counter].events = POLLIN;
event_array[nr_poll].fd = fd[i][counter];
event_array[nr_poll].events = POLLIN;
nr_poll++;

mmap_array[i][counter].counter = counter;
mmap_array[i][counter].prev = 0;
Expand Down Expand Up @@ -1247,7 +1248,7 @@ int main(int argc, char *argv[])
}

if (hits == events)
ret = poll(event_array[0], nr_cpus, 1000);
ret = poll(event_array, nr_poll, 1000);
hits = events;
}

Expand Down

0 comments on commit 3014c9d

Please sign in to comment.