Function report |
Source Code:kernel\events\core.c |
Create Date:2022-07-28 13:35:25 |
Last Modify:2022-05-20 07:50:19 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:_perf_ioctl
Proto:static long _perf_ioctl(struct perf_event *event, unsigned int cmd, unsigned long arg)
Type:long
Parameter:
Type | Parameter | Name |
---|---|---|
struct perf_event * | event | |
unsigned int | cmd | |
unsigned long | arg |
5244 | Case cmd == Ioctls that can be done on a perf event fd: |
5245 | func = Enable an event |
5246 | Break |
5247 | Case cmd == PERF_EVENT_IOC_DISABLE |
5248 | func = Disable an event |
5249 | Break |
5250 | Case cmd == PERF_EVENT_IOC_RESET |
5251 | func = _perf_event_reset |
5252 | Break |
5254 | Case cmd == PERF_EVENT_IOC_REFRESH |
5255 | Return _perf_event_refresh(event, arg) |
5257 | Case cmd == PERF_EVENT_IOC_PERIOD |
5264 | Return _perf_event_period(event, value) |
5266 | Case cmd == PERF_EVENT_IOC_ID |
5272 | Return 0 |
5275 | Case cmd == PERF_EVENT_IOC_SET_OUTPUT |
5278 | If arg != -1 Then |
5281 | ret = perf_fget_light(arg, & output) |
5285 | ret = perf_event_set_output(event, output_event) |
5287 | Else |
5288 | ret = perf_event_set_output(event, NULL) |
5290 | Return ret |
5293 | Case cmd == PERF_EVENT_IOC_SET_FILTER |
5294 | Return perf_event_set_filter(event, (void__user * )arg) |
5296 | Case cmd == PERF_EVENT_IOC_SET_BPF |
5297 | Return perf_event_set_bpf_prog(event, arg) |
5299 | Case cmd == PERF_EVENT_IOC_PAUSE_OUTPUT |
5304 | If Not rb || Not nr of data pages Then |
5306 | Return -EINVAL |
5308 | rb_toggle_paused(rb, !!arg) |
5310 | Return 0 |
5313 | Case cmd == PERF_EVENT_IOC_QUERY_BPF |
5314 | Return perf_event_query_prog_array(event, (void__user * )arg) |
5316 | Case cmd == PERF_EVENT_IOC_MODIFY_ATTRIBUTES |
5318 | err = perf_copy_attr((structperf_event_attr__user * )arg, & new_attr) |
5324 | Return perf_event_modify_attr(event, & new_attr) |
5326 | Default |
5327 | Return -ENOTTY |
5330 | If flags & PERF_IOC_FLAG_GROUP Then perf_event_for_each(event, func) |
5335 | Return 0 |
Name | Describe |
---|---|
perf_ioctl |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |