i#6662 func_id_filter: large function IDs #6870
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When filtering function related markers (i.e., TRACE_MARKER_TYPE_FUNC_) by function ID we need to provide the original marker value (function ID) in the trace to func_id_filter.
When filtering out system calls, the ID can be large due to TRACE_FUNC_ID_SYSCALL_BASE (which is 0x100000000ULL == 4294967296 for x64) that is added to the system call number, and can cause an std::out_of_range error.
We now use std::stoull to handle large function IDs.
We add a test which runs func_id_filter (part of record_filter) with a large function ID and then checks that there is no function marker left in the filtered trace with basic_counts.
Issue #6662