Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182417
b: refs/heads/master
c: c933c1a
h: refs/heads/master
i:
  182415: d189f0f
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 29, 2010
1 parent 821b8a1 commit e4f930a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 272d30be622c9c6cbd514b1211ff359292001baa
refs/heads/master: c933c1a603d5bf700ddce79216c1be0ec3bc0e6c
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,9 +1245,9 @@ static inline int is_x86_event(struct perf_event *event)

static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
{
int i, j, w, num, wmax;
struct event_constraint *c, *constraints[X86_PMC_IDX_MAX];
unsigned long used_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
int i, j, w, wmax, num = 0;
struct hw_perf_event *hwc;

bitmap_zero(used_mask, X86_PMC_IDX_MAX);
Expand All @@ -1260,7 +1260,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
/*
* fastpath, try to reuse previous register
*/
for (i = 0, num = n; i < n; i++, num--) {
for (i = 0; i < n; i++) {
hwc = &cpuc->event_list[i]->hw;
c = constraints[i];

Expand Down Expand Up @@ -1288,7 +1288,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
if (assign)
assign[i] = hwc->idx;
}
if (!num)
if (i == n)
goto done;

/*
Expand Down

0 comments on commit e4f930a

Please sign in to comment.