Vern Paxson
adf3648554
fixes (to avoid collisions) for AST profiling's function hash computations
2024-09-27 13:24:35 -07:00
Vern Paxson
d1c31927c4
fix to -O gen-C++ for recent AST profiling changes for identifying function parameters
2024-09-27 13:23:06 -07:00
Arne Welzel
71e9c8d436
script_opt: Use Func::GetName()
2024-09-27 15:11:17 +02:00
Arne Welzel
9d1d4e28b3
ScriptOpt: Ensure global statements have non-null scope
...
The ProfileFunc() logic assumed that GetScope() returned a non-nullptr.
This holds except for the synthetic global statements function.
Fix the latter and add an assert, also add a name to the type so it's
easier to recognize in a debugger what's going on, otherwise the name
is "".
This was found by UBSAN due to it seeing the ->OrderedVars() call on a
nullptr. Elsewhere, num_params == 0 shielded from that access and so
didn't lead to crashes.
2024-08-16 13:59:24 +02:00
Vern Paxson
2477213619
simpler and more robust identification of function parameters for AST profiling
2024-08-16 11:19:02 +02:00
Vern Paxson
857df9f063
support for more in-depth AST profiling
2024-08-16 11:18:57 +02:00
Vern Paxson
d2c6208421
allow profiling without updating of hash values
2024-08-16 11:18:57 +02:00
Vern Paxson
4b719ef45a
script optimization for record operations sourced (in part) from other records
2024-06-24 09:38:37 +02:00
Vern Paxson
37c1f6641c
script optimization support for "add" and "delete" being expressions
2024-05-29 12:40:06 -07:00
Vern Paxson
8c4c224c93
fix for ZAM profiling potentially accessing freed memory
2024-04-25 09:15:12 -07:00
Vern Paxson
c29db63fdd
ZAM execution changes to support richer profiling
2024-03-19 10:59:49 -07:00
Vern Paxson
037f76e384
refined ZAM function profiling to include (correct) statement line number blocks
2024-03-19 10:59:49 -07:00
Vern Paxson
74d36eb759
script optimization support for clearing tables/vectors using "delete"
2024-03-08 19:09:46 +01:00
Vern Paxson
896238c173
streamlining of some script optimization APIs
2024-01-15 15:03:56 +01:00
Vern Paxson
dd91790f1e
script optimization tracking of functions called by event engine or indirectly
2023-12-12 09:45:19 +01:00
Vern Paxson
6e0ce17c22
revert problems with profiling attributes introduced by recent script-opt PR
2023-12-12 09:45:19 +01:00
Vern Paxson
740a087765
reworked AST optimizers analysis of side effects during aggregate operations & calls
2023-12-06 12:26:27 -08:00
Benjamin Bannier
f5a76c1aed
Reformat Zeek in Spicy style
...
This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
2023-10-30 09:40:55 +01:00
Vern Paxson
110ba7a0a1
AST profiling enhnacements in support of script optimization for lambdas/whens
2023-06-30 09:36:14 +02:00
Vern Paxson
0c434ca4f8
changed function_ingredients struct to FunctionIngredients class with accessors
2023-04-02 11:34:16 -07:00
Vern Paxson
65a2900bb7
removed -O add-C++ option and updated documentation
2023-01-24 10:52:58 -08:00
Josh Soref
cd201aa24e
Spelling src
...
These are non-functional changes.
* accounting
* activation
* actual
* added
* addresult
* aggregable
* aligned
* alternatively
* ambiguous
* analysis
* analyzer
* anticlimactic
* apparently
* application
* appropriate
* arithmetic
* assignment
* assigns
* associated
* authentication
* authoritative
* barrier
* boundary
* broccoli
* buffering
* caching
* called
* canonicalized
* capturing
* certificates
* ciphersuite
* columns
* communication
* comparison
* comparisons
* compilation
* component
* concatenating
* concatenation
* connection
* convenience
* correctly
* corresponding
* could
* counting
* data
* declared
* decryption
* defining
* dependent
* deprecated
* detached
* dictionary
* directional
* directly
* directory
* discarding
* disconnecting
* distinguishes
* documentation
* elsewhere
* emitted
* empty
* endianness
* endpoint
* enumerator
* essentially
* evaluated
* everything
* exactly
* execute
* explicit
* expressions
* facilitates
* fiddling
* filesystem
* flag
* flagged
* for
* fragments
* guarantee
* guaranteed
* happen
* happening
* hemisphere
* identifier
* identifies
* identify
* implementation
* implemented
* implementing
* including
* inconsistency
* indeterminate
* indices
* individual
* information
* initial
* initialization
* initialize
* initialized
* initializes
* instantiate
* instantiated
* instantiates
* interface
* internal
* interpreted
* interpreter
* into
* it
* iterators
* length
* likely
* log
* longer
* mainly
* mark
* maximum
* message
* minimum
* module
* must
* name
* namespace
* necessary
* nonexistent
* not
* notifications
* notifier
* number
* objects
* occurred
* operations
* original
* otherwise
* output
* overridden
* override
* overriding
* overwriting
* ownership
* parameters
* particular
* payload
* persistent
* potential
* precision
* preexisting
* preservation
* preserved
* primarily
* probably
* procedure
* proceed
* process
* processed
* processes
* processing
* propagate
* propagated
* prototype
* provides
* publishing
* purposes
* queue
* reached
* reason
* reassem
* reassemble
* reassembler
* recommend
* record
* reduction
* reference
* regularly
* representation
* request
* reserved
* retrieve
* returning
* separate
* should
* shouldn't
* significant
* signing
* simplified
* simultaneously
* single
* somebody
* sources
* specific
* specification
* specified
* specifies
* specify
* statement
* subdirectories
* succeeded
* successful
* successfully
* supplied
* synchronization
* tag
* temporarily
* terminating
* that
* the
* transmitted
* true
* truncated
* try
* understand
* unescaped
* unforwarding
* unknown
* unknowndata
* unspecified
* update
* usually
* which
* wildcard
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 12:08:15 -05:00
Vern Paxson
5c21240daf
fixes for initializing scripts compiled to C++
2022-09-29 15:09:37 -07:00
Vern Paxson
9ada7ac4e7
tracking of when statements/expressions occur in a "when" context
2022-05-12 13:45:45 -07:00
Matthew Luckie
11f8729997
remove deprecated union and timer types, addressing #1898
2022-02-19 19:17:51 +13:00
Tim Wojtulewicz
3d9d6e953b
Merge remote-tracking branch 'origin/topic/vern/when-lambda'
...
* origin/topic/vern/when-lambda:
explicitly provide the frame for evaluating a "when" timeout expression
attempt to make "when" btest deterministic
tests for new "when" semantics/errors
update existing test suite usage of "when" statements to include captures
update uses of "when" in base scripts to include captures
captures for "when" statements update Triggers to IntrusivePtr's and simpler AST traversal introduce IDSet type, migrate associated "ID*" types to "const ID*"
logic (other than in profiling) for assignments that yield separate values
option for internal use to mark a function type as allowing non-expression returns
removed some now-obsolete profiling functionality
minor commenting clarifications
2022-01-14 14:41:42 -07:00
Vern Paxson
f895008c34
captures for "when" statements
...
update Triggers to IntrusivePtr's and simpler AST traversal
introduce IDSet type, migrate associated "ID*" types to "const ID*"
2022-01-07 14:50:35 -08:00
Vern Paxson
6cb5ea6835
removed some now-obsolete profiling functionality
2022-01-07 11:50:01 -08:00
Vern Paxson
a09c5e6bde
fix: don't treat pseudo-identifiers in type cases as local variables
2021-12-23 11:37:17 -08:00
Vern Paxson
a10fafe398
tweak to keep clang-format happy
2021-12-12 12:43:30 -08:00
Vern Paxson
2f7137999f
restored support for incremental compilation of scripts to C++
2021-12-12 12:36:45 -08:00
Vern Paxson
4ea5785908
fixed for profiling missing some profile elements
2021-12-12 12:33:06 -08:00
Vern Paxson
9069e744f9
replace --optimize-only with --optimize-funcs and --optimize-files
2021-12-10 12:45:27 -08:00
Vern Paxson
f865897cac
AST profiles track the associated function/body/expression
2021-11-24 15:18:40 -08:00
Tim Wojtulewicz
4423574d26
clang-format: Set IndentCaseBlocks to false
2021-09-27 10:49:48 -07:00
Tim Wojtulewicz
b2f171ec69
Reformat the world
2021-09-16 15:35:39 -07:00
Vern Paxson
da6ac0b521
switch to ID definition regions; reworked driver functions; more info for reporting uncompilable functions
2021-09-08 10:23:38 -07:00
Vern Paxson
9a9995bdd1
tracking of optimization information associated with identifiers
2021-09-08 10:23:38 -07:00
Vern Paxson
fb101f7b0e
track implicit assignments when profiling, associate counts with assignees
2021-09-08 10:23:38 -07:00
Vern Paxson
9900a3468c
support for profiling function bodies w/o needing accompanying ScriptFunc object
2021-05-30 17:44:24 -07:00
Jon Siwek
3e85375010
Fix various compiler/linter warnings in script_opt/CPP code
2021-05-05 16:55:05 -07:00
Vern Paxson
158e82a2c1
expand profiling to include values to which globals are assigned
2021-05-05 16:55:04 -07:00
Vern Paxson
dd05beff50
fixed missing profiling for ?$ operator
2021-05-05 16:55:04 -07:00
Vern Paxson
72f62f398a
FuncInfo now tracks priority; some tidying/widening of its accessors
2021-05-05 16:55:04 -07:00
Jon Siwek
d57848828e
Avoid a redundant set operation in ProfileFuncs::MergeInProfile()
2021-04-02 11:55:22 -07:00
Vern Paxson
0b45ff2179
optionally hash original, not extended, form of records for profiling
...
profile types associated with global initializations
incorporate type name, if present, into type hash
2021-04-01 20:20:12 -07:00
Jon Siwek
be21843859
Add missing errno include to ProfileFunc.cc
2021-03-31 15:14:27 -07:00
Jon Siwek
bdadbabf18
Adjust GetAttrs() usage in ProfileFunc::PreExpr() to const-reference
2021-03-31 14:52:01 -07:00
Jon Siwek
dc9e7f6d03
Fix whitespace in ProfileFunc::PreExpr()
2021-03-31 14:50:45 -07:00
Jon Siwek
ccd27a3dfa
Avoid redundant map/set searches in various ProfileFunc methods
2021-03-31 14:48:02 -07:00