-
Notifications
You must be signed in to change notification settings - Fork 63
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 does not get enabled in all files of reactor-c #1067
Comments
It's not so much that Cmake breaks anything but that the code generator inserts the define in the wrong place. I believe @hokeun already has a fix. |
@lhstrh I tried that solution after our meeting, but I found that the solution didn't solve this bug. So this bug still exists. |
There is a mechanism to fix this in the CGenerator. This will expose the appropriate compile definition to CMake in the generated CMakeLists.txt. |
Could you please elaborate a bit? Does this solution match my comment above? |
If you can push this to a branch and issue a (draft) PR, we can help. |
Thank you, Edward, Soroush, and Marten!
I worked with @edwardalee on this solution by @Soroosh129 , and it works! Just for reference, the solution I tried after the scheduling meeting (but didn't work) is here: 1827ed8 The solution is in this PR: #1068 |
Hokeun was chasing a mysterious bug where some tracing functions were not being called even though tracing is turned on. The file trace.h has this:
The file
scheduler_GEDF_NP.c
has a pound include of the above .h file, which, when separately compiled, results in the second definition, regardless of whether tracing is turned on our not.Tracing used to work when the generated .c file included within it the other needed .c files because it would have, near the top, the following line:
But now, that #define is never seen in any separately compiled file. So we need to find some other way to do this conditional compilation. Note that it is extremely important that tracing have exactly zero overhead when turned off, which is what the above strategy accomplishes. It defines
tracepoint_worker_wait_starts
as an empty macro that takes an arbitrary number of arguments.The only way I can see to fix this is to change the code generator so that it creates, in addition to a .c file, a .h file with some common name, and then every other LF core file needs to have #include for that generated .h file. Any other ideas? Any volunteers to fix this? Perhaps one you who insisted on this separate compilation strategy? :-)
The text was updated successfully, but these errors were encountered: