Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182416
b: refs/heads/master
c: 272d30b
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 29, 2010
1 parent d189f0f commit 821b8a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 63b146490befc027a7e0923e333269e68b20d380
refs/heads/master: 272d30be622c9c6cbd514b1211ff359292001baa
9 changes: 5 additions & 4 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/uaccess.h>
#include <linux/highmem.h>
#include <linux/cpu.h>
#include <linux/bitops.h>

#include <asm/apic.h>
#include <asm/stacktrace.h>
Expand Down Expand Up @@ -76,6 +77,7 @@ struct event_constraint {
};
int code;
int cmask;
int weight;
};

struct cpu_hw_events {
Expand All @@ -95,6 +97,7 @@ struct cpu_hw_events {
{ .idxmsk64[0] = (n) }, \
.code = (c), \
.cmask = (m), \
.weight = HWEIGHT64((u64)(n)), \
}

#define INTEL_EVENT_CONSTRAINT(c, n) \
Expand Down Expand Up @@ -1242,8 +1245,7 @@ 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;
int weight, wmax;
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)];
struct hw_perf_event *hwc;
Expand Down Expand Up @@ -1320,8 +1322,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
c = constraints[i];
hwc = &cpuc->event_list[i]->hw;

weight = bitmap_weight(c->idxmsk, X86_PMC_IDX_MAX);
if (weight != w)
if (c->weight != w)
continue;

for_each_bit(j, c->idxmsk, X86_PMC_IDX_MAX) {
Expand Down

0 comments on commit 821b8a1

Please sign in to comment.