We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88ec7ee commit 0d39844Copy full SHA for 0d39844
kernel/events/core.c
@@ -5969,14 +5969,15 @@ static int _perf_event_period(struct perf_event *event, u64 value)
5969
if (!value)
5970
return -EINVAL;
5971
5972
- if (event->attr.freq && value > sysctl_perf_event_sample_rate)
5973
- return -EINVAL;
5974
-
5975
- if (perf_event_check_period(event, value))
5976
5977
5978
- if (!event->attr.freq && (value & (1ULL << 63)))
5979
+ if (event->attr.freq) {
+ if (value > sysctl_perf_event_sample_rate)
+ return -EINVAL;
+ } else {
+ if (perf_event_check_period(event, value))
+ if (value & (1ULL << 63))
5980
+ }
5981
5982
event_function_call(event, __perf_event_period, &value);
5983
0 commit comments