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

Predicate the call to trace_mem() #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moncefmechri
Copy link
Contributor

The pin sampler inserts a call to trace_mem() and a predicated
call to trace_update_access_counter() that is NOT called if the current instruction is a predicate (cmov, ...)
and the condition is false.

This could lead to the situation where the access counter is not updated but the memory access is recorded by the sampler, and
thus to the situation where two samples accessing the same memory location have the same timestamp.
This causes the current model to exit with this error:

File "/home/moncef/coding/uart/util/python/util/analysis_orig/utils.py", line 50, in usf_read_events
assert(event.begin.time < event.end.time)
AssertionError

This patch makes the call to trace_mem() predicated too so that if the current instruction is a predicate and the condition is false,
the memory access is not passed to the sampler

The pin sampler inserts a call to trace_mem() and a predicated
call to trace_update_access_counter() that is NOT called if the current instruction is a predicate (cmov, ...)
and the condition is false.

This could lead to the situation where the access counter is not updated but the memory access is recorded by the sampler, and
thus to the situation where two samples accessing the same memory location have the same timestamp.
This causes the current model to exit with this error:

  File "/home/moncef/coding/uart/util/python/util/analysis_orig/utils.py", line 50, in usf_read_events
    assert(event.begin.time < event.end.time)
AssertionError

This patch makes the call to trace_mem() predicated too so that if the current instruction is a predicate and the condition is false,
the memory access is not passed to the sampler
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.

1 participant