Function report |
Source Code:kernel\trace\trace_events_trigger.c |
Create Date:2022-07-28 12:26:45 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:event_enable_trigger_func
Proto:int event_enable_trigger_func(struct event_command *cmd_ops, struct trace_event_file *file, char *glob, char *cmd, char *param)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct event_command * | cmd_ops | |
struct trace_event_file * | file | |
char * | glob | |
char * | cmd | |
char * | param |
1362 | bool hist = false |
1384 | If Not event_enable_file Then Go to out |
1394 | enable = strcmp(cmd, Avoid typos ) == 0 |
1396 | trigger_ops = get_trigger_ops(cmd, trigger) |
1399 | trigger_data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
1400 | If Not trigger_data Then Go to out |
1403 | enable_data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
1404 | If Not enable_data Then |
1405 | kfree(trigger_data) |
1406 | Go to out |
1409 | count = -1 |
1410 | ops = trigger_ops |
1417 | file = event_enable_file |
1418 | private_data = enable_data |
1420 | If glob[0] == '!' Then |
1421 | unreg(glob + 1, trigger_ops, trigger_data, file) |
1422 | kfree(trigger_data) |
1423 | kfree(enable_data) |
1424 | ret = 0 |
1425 | Go to out |
1431 | If trigger Then |
1435 | If Not strlen - Find the length of a string*@s: The string to be sized Then Go to out_free |
1450 | If Not set_filter Then Go to out_reg |
1453 | ret = set_filter(param, trigger_data, file) |
1457 | out_reg : |
1459 | ret = try_module_get(mod) |
1460 | If Not ret Then |
1465 | ret = trace_event_enable_disable(event_enable_file, 1, 1) |
1468 | ret = reg(glob, trigger_ops, trigger_data, file) |
1474 | If Not ret Then |
1476 | Go to out_disable |
1477 | Else if ret < 0 Then Go to out_disable |
1480 | ret = 0 |
1482 | out : |
1483 | Return ret |
1485 | out_disable : |
1486 | trace_event_enable_disable(event_enable_file, 0, 1) |
1487 | out_put : |
1488 | module_put(mod) |
1489 | out_free : |
1490 | If set_filter Then set_filter(NULL, trigger_data, NULL) |
1493 | kfree(enable_data) |
1494 | Go to out |
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 |