-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor MemoryProfiler #356
base: master
Are you sure you want to change the base?
Conversation
Refactored the MemoryProfiler code replacing C file I/O and string parsing with C++ streams and regex. Look for environment variables only once. Signed-off-by: Christoph Niethammer <[email protected]>
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.
Nice effort to modernize the plugin!
Just some comments:
- Checks if files exist/error handling of input
- More comments in the code would be beneficial
- Test not only with unit tests but also run a real simulation and compare the result with the previous implementation
- Keep in mind that
std::regex
might be slower compared to the previous solution
#include "sys/sysinfo.h" | ||
|
||
#ifndef _SX |
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.
What is the preprocessor macro _SX
? I cannot find any definition in our code base or online.
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 preprocessor macro is specific to NEC platforms which do not run standard unix/linux like the https://en.wikipedia.org/wiki/NEC_SX-Aurora_TSUBASA.
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.
Thank you for the clarification 👍 Does anybody still use ls1 on those machines or is it just legacy?
Refactored the MemoryProfiler code replacing C file I/O and string parsing with C++ streams and regex. Look for environment variables only once.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.