@@ -66,7 +66,8 @@ static const char * ops[] = { OPS };
6666 C(INVALID_FILTER, "Meaningless filter expression"), \
6767 C(IP_FIELD_ONLY, "Only 'ip' field is supported for function trace"), \
6868 C(INVALID_VALUE, "Invalid value (did you forget quotes)?"), \
69- C(NO_FILTER, "No filter found"),
69+ C(ERRNO, "Error"), \
70+ C(NO_FILTER, "No filter found")
7071
7172#undef C
7273#define C (a , b ) FILT_ERR_##a
@@ -76,7 +77,7 @@ enum { ERRORS };
7677#undef C
7778#define C (a , b ) b
7879
79- static char * err_text [] = { ERRORS };
80+ static const char * err_text [] = { ERRORS };
8081
8182/* Called after a '!' character but "!=" and "!~" are not "not"s */
8283static bool is_not (const char * str )
@@ -947,8 +948,14 @@ static void append_filter_err(struct filter_parse_error *pe,
947948 if (pe -> lasterr > 0 ) {
948949 trace_seq_printf (s , "\n%*s" , pos , "^" );
949950 trace_seq_printf (s , "\nparse_error: %s\n" , err_text [pe -> lasterr ]);
951+ tracing_log_err ("event filter parse error" ,
952+ filter -> filter_string , err_text ,
953+ pe -> lasterr , pe -> lasterr_pos );
950954 } else {
951955 trace_seq_printf (s , "\nError: (%d)\n" , pe -> lasterr );
956+ tracing_log_err ("event filter parse error" ,
957+ filter -> filter_string , err_text ,
958+ FILT_ERR_ERRNO , 0 );
952959 }
953960 trace_seq_putc (s , 0 );
954961 buf = kmemdup_nul (s -> buffer , s -> seq .len , GFP_KERNEL );
0 commit comments