Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182425
b: refs/heads/master
c: 75c9f32
h: refs/heads/master
i:
  182423: 52b2c8d
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 29, 2010
1 parent 3212c60 commit 72065df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 18c01f8abff51e4910cc5ffb4b710e8c6eea60c9
refs/heads/master: 75c9f3284a7ff957829f44baace82406a6354ceb
11 changes: 9 additions & 2 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -5002,8 +5002,15 @@ inherit_event(struct perf_event *parent_event,
else
child_event->state = PERF_EVENT_STATE_OFF;

if (parent_event->attr.freq)
child_event->hw.sample_period = parent_event->hw.sample_period;
if (parent_event->attr.freq) {
u64 sample_period = parent_event->hw.sample_period;
struct hw_perf_event *hwc = &child_event->hw;

hwc->sample_period = sample_period;
hwc->last_period = sample_period;

atomic64_set(&hwc->period_left, sample_period);
}

child_event->overflow_handler = parent_event->overflow_handler;

Expand Down

0 comments on commit 72065df

Please sign in to comment.