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#2820 trace thread subset: reset callbacks at exit #2844

Merged
merged 5 commits into from
Feb 22, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clients/drcachesim/tracer/tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,12 @@ event_exit(void)
if (file_ops_func.exit_cb != NULL)
(*file_ops_func.exit_cb)(file_ops_func.exit_arg);

/* Clear callbacks to support reset. */
memset(&file_ops_func, 0, sizeof(file_ops_func));
if (!offline_instru_t::custom_module_data(nullptr, nullptr, nullptr))
DR_ASSERT(false && "failed to clear custom module callbacks");
should_trace_thread_cb = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about thread_filtering_enabled, and trace_thread_cb_user_data just in case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this is a heavyweight client and a few stores won't matter. Done.


if (!dr_raw_tls_cfree(tls_offs, MEMTRACE_TLS_COUNT))
DR_ASSERT(false);

Expand Down