Adds an analyzer where trace filtering logic can be implemented. Currently, it simply writes out everything from the original trace. The actual filtering logic will follow in next PRs.
Converts analyzer_t and analysis_tool_t into templates to allow the core driver logic to work on trace_entry_ts as well. The trace_entry_t versions are record_analyzer_t and record_analysis_tool_t.
Implements trace_filter_t, the first record_analysis_tool_t, which is for filtering trace_entry_t entries in a stored offline trace. trace_filter_t takes in a vector of trace_filter_func_t pointers, each of which implements filtering logic in its parallel_shard_filter() method. Adds a null_filter_t that does not perform any filtering, as an example.
Adds a new get_stream_name routine to memtrace_stream_t that returns the base name of the file that stores the shard's data on disk. This is used by trace_filter_t to open the output file for each shard by the same name in the output directory.
Adds record_file_reader_t that iterates over the raw trace_entry_t objects in the trace. The current implementation supports reading gzip'd or uncompressed trace files. Support for filtering zip files will follow in next PRs. This reader does not support serial iteration currently. Added a detailed TODO for the work required to add that support (#5727).
Adds an API to basic_counts_t to return counts in a struct, which is useful for tests (#3068).
Adds a unit test for the trace_filter_t analyzer.
Closed #5697 in favour of this approach.
Issue: #5675