Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277270
b: refs/heads/master
c: 5d81e5c
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Vagin authored and Ingo Molnar committed Nov 14, 2011
1 parent 5ec8566 commit bac1209
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 9251f904f95175b4a1d8cbc0449e748f9edd7629
refs/heads/master: 5d81e5cfb37a174e8ddc0413e2e70cdf05807ace
7 changes: 6 additions & 1 deletion trunk/kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4528,7 +4528,6 @@ static void perf_swevent_overflow(struct perf_event *event, u64 overflow,
struct hw_perf_event *hwc = &event->hw;
int throttle = 0;

data->period = event->hw.last_period;
if (!overflow)
overflow = perf_swevent_set_period(event);

Expand Down Expand Up @@ -4562,6 +4561,12 @@ static void perf_swevent_event(struct perf_event *event, u64 nr,
if (!is_sampling_event(event))
return;

if ((event->attr.sample_type & PERF_SAMPLE_PERIOD) && !event->attr.freq) {
data->period = nr;
return perf_swevent_overflow(event, 1, data, regs);
} else
data->period = event->hw.last_period;

if (nr == 1 && hwc->sample_period == 1 && !event->attr.freq)
return perf_swevent_overflow(event, 1, data, regs);

Expand Down

0 comments on commit bac1209

Please sign in to comment.