While it seems interesting functionality, this hasn't been documented,
maintained or knowingly leveraged for many years.
There are various other approaches today, too:
* We track the number of event handler invocations regardless of
profiling. It's possible to approximate a load_sample event by
comparing the result of two get_event_stats() calls. Or, visualize
the corresponding counters in a Prometheus setup to get an idea of
event/s broken down by event names.
* HookCallFunction() allows to intercept script execution, including
measuring the time execution takes.
* The global call_stack and g_frame_stack can be used from plugins
(and even external processes) to walk the Zeek script stack at certain
points to implement a sampling profiler.
* USDT probes or more plugin hooks will likely be preferred over Zeek
builtin functionality in the future.
Relates to #3458
Passing the `broker::data` paramter for `threading_field_to_data` by
value forces copies. However, the function only needs const access to
its parameter. Hence, taking the parameter as const-ref is the logical
choice and avoids unnecessary copies of individual data fields.
The SMB::State$recent_files field is meant to have expiring entries.
However, due to usage of &default=string_set(), the &read_expire
attribute is not respected causing unbounded state growth. Replace
&default=string_set() with &default=set().
Thanks to ya-sato on Slack for reporting!
Related: zeek/zeek-docs#179, #3513.
Cannot remove the destructor as otherwise the compiler attempts to create
its implementation in Type.h where CompositeHash isn't a complete type
yet and std::unique_ptr's delete fails to be instantiated.
* origin/topic/awelzel/3494-no-more-btest-script-coverage-locally:
ci/btest: Remove ZEEK_PROFILER_FILE from btest.cfg, set in ci/test.sh explicitly
ci: Remove ZEEK_CI_DISABLE_SCRIPT_PROFILING logic
The produced coverage files are of little use in current local workflows
and usually just end-up taking up disk space. ZEEK_PROFILER_FILE can be
set explicitly if there's a one-off need to produce these locally, too.
* topic/christian/ci-updates:
CI: Move Debian variations from 11 to 12
CI: Bump Ubuntu 23.04 to 23.10
CI: Drop openSUSE Leap 15.4, about to EOL.
CI: FreeBSD 14 is out now, 12 is about to EOL.
CI: distro EOL comment tweaks
CI: drop Fedora 37, add Fedora 39
This switches the ARM and static builds from 11 to 12. x86 and ARM now build by
default, and 11 only with fullci. 10 remains as-is, because we like to torture
ourselves.
* origin/topic/vern/script-opt-maint.Dec23:
recent BTests that should be skipped when using -O gen-C++
expanded ZAM maintenance notes & support scripts
script optimization tracking of functions called by event engine or indirectly
memory-handling fixes for information associated with low-level ZAM instructions
fix for -O C++ lambda functions reporting errors/warnings
revert problems with profiling attributes introduced by recent script-opt PR
script optimization fixes for pattern tables
regularized (some) types of pointers used in script optimization
splitting off script optimization CSE into its own source files
some very minor tidying of script optimization code/documentation
fix for Trigger's whose termination leads to deleting other Trigger's
bug fix for delayed logging
* origin/topic/vern/CSE-opt:
incorporate latest version of gen-zam to correctly generate indirect calls
added sub-directory for tracking ZAM maintenance issues
BTest to stress-test AST optimizer's assessment of side effects
reworked AST optimizers analysis of side effects during aggregate operations & calls
script optimization support for tracking information associated with BiFs/functions
fix for AST analysis of inlined functions
improved AST optimizer's analysis of variable usage in inlined functions
new method for Stmt nodes to report whether they could execute a "return"
bug fixes for indirect function calls when using ZAM
minor fixes for script optimization, exporting of attr_name, script layout tweak