Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188250
b: refs/heads/master
c: cc2ad4b
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 10, 2010
1 parent c9ab2f3 commit 8781026
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 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: 07088edb88164c2a2406cd2d9a7be19d8515214b
refs/heads/master: cc2ad4ba8792b9d4ff893ae3b845d2c5a6206fc9
11 changes: 6 additions & 5 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,12 @@ static u64 __read_mostly hw_cache_event_ids
* Returns the delta events processed.
*/
static u64
x86_perf_event_update(struct perf_event *event,
struct hw_perf_event *hwc, int idx)
x86_perf_event_update(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
int shift = 64 - x86_pmu.event_bits;
u64 prev_raw_count, new_raw_count;
int idx = hwc->idx;
s64 delta;

if (idx == X86_PMC_IDX_FIXED_BTS)
Expand Down Expand Up @@ -1064,7 +1065,7 @@ static void x86_pmu_stop(struct perf_event *event)
* Drain the remaining delta count out of a event
* that we are disabling:
*/
x86_perf_event_update(event, hwc, idx);
x86_perf_event_update(event);

cpuc->events[idx] = NULL;
}
Expand Down Expand Up @@ -1112,7 +1113,7 @@ static int x86_pmu_handle_irq(struct pt_regs *regs)
event = cpuc->events[idx];
hwc = &event->hw;

val = x86_perf_event_update(event, hwc, idx);
val = x86_perf_event_update(event);
if (val & (1ULL << (x86_pmu.event_bits - 1)))
continue;

Expand Down Expand Up @@ -1458,7 +1459,7 @@ void __init init_hw_perf_events(void)

static inline void x86_pmu_read(struct perf_event *event)
{
x86_perf_event_update(event, &event->hw, event->hw.idx);
x86_perf_event_update(event);
}

static const struct pmu pmu = {
Expand Down
10 changes: 2 additions & 8 deletions trunk/arch/x86/kernel/cpu/perf_event_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,14 +694,8 @@ static void intel_pmu_enable_event(struct hw_perf_event *hwc, int idx)
*/
static int intel_pmu_save_and_restart(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;
int ret;

x86_perf_event_update(event, hwc, idx);
ret = x86_perf_event_set_period(event);

return ret;
x86_perf_event_update(event);
return x86_perf_event_set_period(event);
}

static void intel_pmu_reset(void)
Expand Down

0 comments on commit 8781026

Please sign in to comment.