Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Valgrind
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Overview== Valgrind is in essence a [[virtual machine]] using [[just-in-time compilation]] techniques, including [[dynamic recompilation]]. Nothing from the original program ever gets run directly on the host [[Central processing unit|processor]]. Instead, Valgrind first translates the program into a temporary, simpler form called [[intermediate representation]] (IR), which is a processor-neutral, [[static single assignment form]]-based form. After the conversion, a tool (see below) is free to do whatever transformations it would like on the IR, before Valgrind translates the IR back into machine code and lets the host processor run it. Valgrind recompiles [[binary code]] to run on host and target (or simulated) CPUs of the same architecture. It also includes a [[GDB]] stub to allow debugging of the target program as it runs in Valgrind, with "monitor commands" that allow querying the Valgrind tool for various information. A considerable amount of performance is lost in these transformations (and usually, the code the tool inserts); usually, code run with Valgrind and the "none" tool (which does nothing to the IR) runs at 20% to 25% of the speed of the normal program.<ref>[https://valgrind.org/info/about.html Valgrind homepage]</ref><ref>[https://valgrind.org/docs/manual/valgrind_manual.pdf Valgrind Manual]</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)