diff --git a/src/script_opt/ZAM/maint/README b/src/script_opt/ZAM/maint/README index ee69f88149..df16c2c5a2 100644 --- a/src/script_opt/ZAM/maint/README +++ b/src/script_opt/ZAM/maint/README @@ -1,6 +1,20 @@ This directory holds scripts and associated data to support maintenance of ZAM optimization: +find-special-script-funcs.sh + A shell script that prints to stdout a sorted list of script-level + functions that the event engine knows about. Invoke with the path + to the top-level src/ directory. + + Use this to compare with Special-Script-Funcs.list to see + whether there are any new such functions (or old ones that have + been removed). If so, update src/script_opt/FuncInfo.cc and then + Special-Script-Funcs.list accordingly. + +Special-Script-Funcs.list + The known-to-the-event-engine scripts that were present last time + ZAM maintenance included looking for any updates to these. + list-bifs.zeek A Zeek script that prints to stdout a sorted list of the BiFs available for the Zeek invocation. diff --git a/src/script_opt/ZAM/maint/Special-Script-Funcs.list b/src/script_opt/ZAM/maint/Special-Script-Funcs.list new file mode 100644 index 0000000000..306c3c675b --- /dev/null +++ b/src/script_opt/ZAM/maint/Special-Script-Funcs.list @@ -0,0 +1,14 @@ +Analyzer::disabling_analyzer +Log::__default_rotation_postprocessor +Log::empty_post_delay_cb +Log::log_stream_policy +Log::rotation_format_func +Supervisor::stderr_hook +Supervisor::stdout_hook +assertion_failure +assertion_result +discarder_check_icmp +discarder_check_ip +discarder_check_tcp +discarder_check_udp +from_json_default_key_mapper diff --git a/src/script_opt/ZAM/maint/find-special-script-funcs.sh b/src/script_opt/ZAM/maint/find-special-script-funcs.sh new file mode 100755 index 0000000000..65c5d12170 --- /dev/null +++ b/src/script_opt/ZAM/maint/find-special-script-funcs.sh @@ -0,0 +1,23 @@ +#! /bin/sh + +# Finds script functions known to the event engine by searching through +# the C++ code. Invoke with the top-level src/ directory as an argument. + +# Search for event engine code that looks up script functions. +grep -h -r -w find_func $* | + + # Trim out whatever is leading up to the name. + sed 's,.*find_func,,' | + + # Make sure we're dealing with a literal name in quotes. + grep '"' | + + # Don't be fooled by -O gen-C++, which has code-to-generate-code that + # uses find_Func. + grep -v '\\"' | + + # Get rid of the quotes. + sed 's,^[^"]*",,;s,"[^"]*$,,' | + + # Produce a regularized list for easy diff'ing. + sort -u