-
Notifications
You must be signed in to change notification settings - Fork 570
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
drmemtrace timestamp and cpu_id are documented as before but are really after their buffer contents #5537
Comments
I would not expect this to matter much: buffers are output prior to syscalls or signals, so at most this is a couple thousand instructions. Given the granularity of accuracy overall and use by analyzers/simulators of the timestamps and cpu_id I don't see it having much effect one way or the other. |
Could thread preemption cause large delays? Or would that be rare since we are going into the kernel for IO frequently? For |
I was also trying to use the timestamps to "visualize" the traces but we no longer have the information on gaps. Suppose a thread tid0 was running on CPUx and then migrated to CPUy and then back to CPUx in the following manner where
We can only get this information from the trace markers. Also, since the timestamps are in microseconds many consecutive markers occur at the "same time".
Would it make sense to record both start and stop timestamps and record finer grained timestamps (e.g. using rdtsc) |
The recorded schedule with the tracing overhead and coarse-grain snapshots will always have accuracy limitations, but your suggested improvement of a stop timestamp is reasonable. If you wanted to implement that and submit a pull request that sounds ok to me. You'd add the stop timestamp as another marker in the buffer header I would assume. For rdtsc, there may be concerns about TSC synch across multi-processor setups: maybe these days these are less common corner cases? We have not generally been using the recorded schedule and are using a synthetic schedule of the software threads in many cases, especially when simulating on a different number of cores. |
This is being solved in #2039 where we move timestamps to buffer start |
The drcachesim trace buffer unit header contains a timestamp and a cpu_id. These are collected when we're flushing the buffer (
dynamorio/clients/drcachesim/tracer/tracer.cpp
Line 1135 in 3f1d9f5
We should either update the documentation to be more accurate (like
dynamorio/clients/drcachesim/common/trace_entry.h
Line 242 in 3f1d9f5
dynamorio-users discussion: https://groups.google.com/g/dynamorio-users/c/AxOo5PMuEQU
The text was updated successfully, but these errors were encountered: