-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
build/docs: running emulator in valgrind #4280
base: main
Are you sure you want to change the base?
Conversation
…t passed as scons vars so that we don't have to write "USE_FOO=$(USE_FOO)" 20 times every time we add such flag
Here we change all FOO=VALUE defines to be tuples ("FOO", "VALUE"). Also, VALUE is always the raw string you want to end up in the C file, instead of attempting to shell-escape it while specifying. By all rights scons _should_ be using shlex.quote() on the CPPDEFINES, but it doesn't, so we hack it by specifying the define prefix as `-D'` and suffix as `'`. That way the arguments in shell are '-escaped, and we're (currently) not using ' in any argument value so this should work fine. At the same time, when passing the flags to cargo, we can shlex.quote the whole thing and get the right strings passed all the way into build.rs -- as long as no argument contains a comma, which is the split character...
[no changelog]
[no changelog]
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.
LGTM, can be merged.
I have found only few punctuation details in the docs - fell free to ignore them.
docs/core/emulator/valgrind.md
Outdated
@@ -0,0 +1,34 @@ | |||
# Profiling emulator with Valgrind | |||
|
|||
Sometimes it can be helpful to know which parts of your code take most of the CPU time. |
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.
NIT: punctuation
Sometimes it can be helpful to know which parts of your code take most of the CPU time. | |
Sometimes, it can be helpful to know which parts of your code take most of the CPU time. |
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.
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.
Neat. Though for me emulator dies after unlock with ERROR: rs
, but seems unrelated.
6752623
to
f7d1e6c
Compare
6f95dd5
to
5b2a1cf
Compare
Some docs and ad-hoc CLI changes to make running emulator in Valgrind easier.
Depends on #4234 as otherwise the build command doesn't work.