Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#6662 public traces, part 5: func_id_filter_t #6820

Merged
merged 13 commits into from
Jun 7, 2024
Merged

Conversation

edeiana
Copy link
Contributor

@edeiana edeiana commented May 21, 2024

Adds a new filter: func_id_filter_t to record_filter, which filters TRACE_MARKER_TYPE_FUNC_ markers based on the function ID.

The filter is enabled by -filter_keep_func_ids followed by a list of integers that represent the function IDs bound to TRACE_MARKER_TYPE_FUNC_ markers to keep in the trace.
Specifically, whenever we encounter a TRACE_MARKER_TYPE_FUNC_ID marker whose marker value is in the list we set a per-shard flag to indicate that all TRACE_MARKER_TYPE_FUNC_[ID | ARG | RETVAL | RETADDR] markers related to that function ID need to be preserved. We remove the TRACE_MARKER_TYPE_FUNC_ markers related to functions whose ID is not in the list.

This filter can be invoked with:

drrun -t drmemtrace -tool record_filter -filter_keep_func_ids 1,2,3,4 -indir path/to/input/trace -outdir path/to/output/trace

To preserve TRACE_MARKER_TYPE_FUNC_ markers related to functions with ID: 1, 2, 3, 4, and remove the TRACE_MARKER_TYPE_FUNC_ markers for all other ID values.

We use this filter to preserve markers related to SYS_futex functions in the public release of traces.

Issue #6662

edeiana added 3 commits May 20, 2024 17:52
The public version of a trace needs to preserve the
TRACE_MARKER_TYPE_FUNC_[ID | ARG | RETVAL] markers
related to SYS_futex system calls.
We add this feature to encodings2regdeps_filter_t.
This filter still drops the TRACE_MARKER_TYPE_FUNC_
markers related to other functions that are not SYS_futex.
However, we still rely on type_filter_t to remove
the additional markers that we don't want to preserve
in the public trace.

Issue #6662
@edeiana edeiana marked this pull request as ready for review May 21, 2024 01:29
@edeiana edeiana requested a review from derekbruening May 21, 2024 01:55
@edeiana edeiana changed the title i#6662 public traces, part 5: SYS_futex i#6662 public traces, part 5: func_marker_filter_t May 29, 2024
@edeiana edeiana requested a review from derekbruening May 29, 2024 11:51
api/docs/release.dox Outdated Show resolved Hide resolved
api/docs/release.dox Show resolved Hide resolved
clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/CMakeLists.txt Outdated Show resolved Hide resolved
clients/drcachesim/tests/record_filter_unit_tests.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tests/record_filter_unit_tests.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tests/record_filter_unit_tests.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tests/record_filter_unit_tests.cpp Outdated Show resolved Hide resolved
@edeiana edeiana changed the title i#6662 public traces, part 5: func_marker_filter_t i#6662 public traces, part 5: func_id_filter_t Jun 4, 2024
@edeiana edeiana requested a review from derekbruening June 4, 2024 20:59
api/docs/release.dox Show resolved Hide resolved
api/docs/release.dox Show resolved Hide resolved
api/docs/release.dox Outdated Show resolved Hide resolved
clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tests/record_filter_unit_tests.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tests/record_filter_unit_tests.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tools/filter/func_id_filter.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/filter/record_filter_create.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/record_filter_launcher.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tools/filter/func_id_filter.h Outdated Show resolved Hide resolved
@derekbruening
Copy link
Contributor

derekbruening commented Jun 6, 2024 via email

@edeiana edeiana merged commit d25d160 into master Jun 7, 2024
17 checks passed
@edeiana edeiana deleted the i6662-sysfutex branch June 7, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants