-
Notifications
You must be signed in to change notification settings - Fork 24
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
Tracing federate interactions #178
Conversation
…ssages sent to RTI. But contents are not set yet. Federate tracing is also augmented to report the federation id in the reactor field. This will help in merging information from different lft files.
…fter the check. This reduces the discrepancies while matching communications events with the RTI.
…e points. Still WiP
…ld when calling federate tracing (not done yet when calling RTI tracing, because of a segmentation fault)
…ke worker argument
…+ Additionnal tracepoints
Both are addressed in the two previous commits.
This PR #182 makes compiling pass. The generated trace file, however, is empty. I think that writing to the trace file needs to be part of the sequential execution. |
I still stand by my suggestion here unless there is some reason why that suggestion (moving RTI-specific code to the |
This breaks the CI though... |
Refactoring the tracing mechanism this way is much cleaner than in this PR. Thanks, Edward! |
What do you think we should do here? |
This is true. There are pros and cons. I think its fine to consider this a matter of opinion and keep it as-is for now. We can always change this later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good overall, but there are some minor unaddressed issues. Once fixed, let's merge.
As a practical matter, separating out the code for tracing of federated events is difficult because we would have to somehow split the enums that define event types. I’m sure it could be done, but I think it will complicate maintenance of the code and introduce opportunities for errors. So i vote for keeping the code together. |
Oh yes, good point. It may not be necessary to subtract it, however. What if instead we ensure that the physical time of a tracepoint is always recorded after the flush for start events (reaction start, etc) and before the flush for end events? This suggests one more argument to the tracepoint function. |
@ChadliaJerad, when a concrete code suggestion is given, you can also just click on "Commit suggestion" and save the time of copying the code, committing, and pushing. Also, once a comment has been addressed, please hit the "Resolve conversation" button (unless, of course, there is still more conversation to be had about the issue at hand). Thanks! |
I think all the issues have been addressed, but there is one that says "I agree with Peter. Let's handle this now, before merging." I have no idea what this refers to and there seems to be no way to mark it resolved. |
The comment
relates to this discussion on RTI-specific code in I read your comment and can kind of see why the change I requested might be difficult. I would like to avoid having a long discussion about this. If it turns out to be a problem later, then someone else can submit another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: the failing test is due to the runner not being able to download Gradle. This problem comes up with Windows runners because its caching is broken (see lf-lang/lingua-franca#1664)
This PR, co-authored by @ChadliaJerad, adds trace points to the interactions between federates and the RTI.
It also removes the tracing mechanism's dependency on the ability to create threads and uses the platform-independent critical section API instead.