Lines Matching refs:filter

42  * trigger has a filter associated with it, rec will checked against
43 * the filter and if the record matches the trigger will be invoked.
64 struct event_filter *filter;
76 filter = rcu_dereference_sched(data->filter);
77 if (filter && !filter_match_preds(filter, rec))
526 * If an event has triggers and any of those triggers has a filter or
540 if (data->filter || event_command_post_trigger(data->cmd_ops) ||
658 * [trigger] [if filter]
668 * param - text following cmd and ':' and stripped of filter
669 * filter - the optional filter text following (and including) 'if'
678 * - 'if pid == 0' is the filter
684 * - there is no filter
690 * - 'if prio > 50' is the filter
697 * - there is no filter
703 * - there is no filter
721 * it has special requirements for handling the filter.
759 * event_trigger_separate_filter - separate an event trigger from a filter
760 * @param_and_filter: String containing trigger and possibly filter
762 * @filter: outparam, will be filled with a pointer to the filter
765 * Given a param string of the form '[trigger] [if filter]', this
766 * function separates the filter from the trigger and returns the
767 * trigger in @param and the filter in @filter. Either the @param
768 * or the @filter may be set to NULL by this function - if not set to
770 * filter.
779 * and assumes param just contains a filter and there's nothing else
785 char **filter, bool param_required)
789 *param = *filter = NULL;
800 * below. Otherwise we assume what's left is a filter and
801 * return it as the filter string for the caller to deal with.
804 *filter = param_and_filter;
809 * Separate the param from the filter (param [if filter]).
811 * param and an optional filter.
816 * Here we have a filter, though it may be empty.
819 *filter = skip_spaces(param_and_filter);
820 if (!**filter)
821 *filter = NULL;
864 RCU_INIT_POINTER(trigger_data->filter, NULL);
902 * event_trigger_set_filter - set an event trigger's filter
905 * @param: The string containing the filter
908 * Set the filter for the trigger. If the filter is NULL, just return
925 * event_trigger_reset_filter - reset an event trigger's filter
929 * Reset the filter for the trigger to no filter.
986 * @param_and_filter: The param and filter portion of the string used to register the trigger
1002 char *param, *filter;
1008 ret = event_trigger_separate_filter(param_and_filter, &param, &filter, false);
1028 ret = event_trigger_set_filter(cmd_ops, file, filter, trigger_data);
1052 * @filter_str: The filter string for the trigger, NULL to remove filter
1056 * Common implementation for event command filter parsing and filter
1062 * Also used to remove a filter (if filter_str = NULL).
1071 struct event_filter *filter = NULL, *tmp;
1075 if (!filter_str) /* clear the current filter */
1086 /* The filter is for the 'trigger' event, not the triggered event */
1088 filter_str, true, &filter);
1091 if (filter) {
1092 kfree(filter->filter_string);
1093 filter->filter_string = NULL;
1097 * If create_event_filter() fails, filter still needs to be freed.
1098 * Which the calling code will do with data->filter.
1101 tmp = rcu_access_pointer(data->filter);
1103 rcu_assign_pointer(data->filter, filter);
1107 * Make sure the call is done with the filter.
1108 * It is possible that a filter could fail at boot up,
1123 free_event_filter(rcu_access_pointer(data->filter));
1124 data->filter = NULL;
1771 char *param, *filter;
1783 ret = event_trigger_separate_filter(param_and_filter, &param, &filter, true);
1838 ret = event_trigger_set_filter(cmd_ops, file, filter, trigger_data);