miri
heaptrack
miri | heaptrack | |
---|---|---|
121 | 19 | |
3,955 | 3,021 | |
2.3% | 1.8% | |
10.0 | 8.9 | |
7 days ago | 8 days ago | |
Rust | C++ | |
Apache License 2.0 | GNU Lesser General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
miri
-
Bytecode VMs in Surprising Places
Miri [0] is an interpreter for the mid-level intermediate representation (MIR) generated by the Rust compiler. MIR is input for more processing steps of the compiler. However miri also runs MIR directly. This means miri is a VM. Of course it's not a bytecode VM, because MIR is not a bytecode AFAIK. I still think that miri is a interesting example.
And why does miri exist?
It is a lot slower. However it can check for some undefined behavior.
[0]: https://github.com/rust-lang/miri
-
RFC: Rust Has Provenance
Provenance is a dynamic property of pointer values. The actual underlying rules that a program must follow, even when using raw pointers and `unsafe`, are written in terms of provenance. Miri (https://github.com/rust-lang/miri) represents provenance as an actual value stored alongside each pointer's address, so it can check for violations of these rules.
Lifetimes are a static approximation of provenance. They are erased after being validated by the borrow checker, and do not exist in Miri or have any impact on what transformations the optimizer may perform. In other words, the provenance rules allow a superset of what the borrow checker allows.
- Mir: Strongly typed IR to implement fast and lightweight interpreters and JITs
-
Running rustc in a browser
There has been discussion of doing this with MIRI, which would be easier than all of rustc.
-
Piecemeal dropping of struct members causes UB? (Miri)
This issue has been fixed: https://github.com/rust-lang/miri/issues/2964
- Erroneous UB Error with Miri?
-
I've incidentally created one of the fastest bounded MPSC queue
Actually, I've done more advanced tests with MIRI (see https://github.com/rust-lang/miri/issues/2920 for example) which allowed me to fix some issues. I've also made the code compatible with loom, but I didn't found the time yet to write and execute loom tests. That's on the TODO-list, and I need to track it with an issue too.
-
Interested in "secure programming languages", both theory and practice but mostly practice, where do I start?
He is one of the big brains behind Miri, which is a interpreter that runs on the MIR (compiler representation between human code and asm/machine code) and detects undefined behavior. Super useful tool for language safety, pretty interesting on its own.
-
Formal verification for unsafe code?
I would also run your tests in Miri (https://github.com/rust-lang/miri) to try to cover more bases.
-
Ouroboros is also unsound
You can run miri and it will tell you if the given run triggered any undefined behavior. It will not analyze it for every possible use of the code, but checking for the presence of this specific issue using it should be fairly simple.
heaptrack
-
Tracking Java Native Memory with JDK Flight Recorder
If we are talking replacing the libc allocator, then something like heaptrack is worth mentioning.
https://github.com/KDE/heaptrack
- Ask HN: Are There Viewers for Memory Layout?
-
How to Perf profile functions?
For accurate memory usage I prefer a memory profiler that overrides malloc and friends instead of the ones that probe the OS at regular intervals. You won't find memory spikes with the latter. Try heaptrack on Linux. I haven't found a good one for Windows yet.
-
What is your favourite profiling tool for C++?
I know it is not a profiler, but it is so criminally underrated that I decided to share it: https://github.com/KDE/heaptrack
-
My Rust program (Well, game) is leaking memory, 4MB/s.
If none of the above helps - I recommend heaptrack as a tool for tracking down your memory usage.
-
Lessons learned from 15 years of SumatraPDF, an open source Windows app
> memory leaks. It's surprisingly hard to find an easy to use memory leak detection tool.
I can vouch for heaptrack[1] nowadays, although it's pretty much Linux only. It's under the umbrella of KDE, but a heaptrack trace only requires a CLI app, and there is a nice Qt viewer to analyse the memory consumption.
It tracks the memory utilization at the level of malloc'd/free'd bytes. It's fine if your memory leak or other memory utilization problem is on this level. Recently I dealt with an issue, where increasing memory utilization was caused by fragmentation within the allocator. This didn't show up in heaptrack as an increasing memory utilization, but heaptrack still pointed out where most of the temporary allocations happened, leading to the culprit of the fragmentation.
[1] https://github.com/KDE/heaptrack
- Show HN: I wrote a tool in Rust for tracking all allocations in a Linux process
-
Implementing a C++ memory allocator to track our framework memory usage
This is probably what you are looking for https://github.com/KDE/heaptrack
-
Memory Leak? Free memory not being reclaimed? What is happening here
When I had this kind problems (heap related) I always use heaptrack. Take a look here for the details: https://github.com/KDE/heaptrack
- Hi, I’m new in rust, I have some expirience with c# and its classes ans structs. I can’t find information about that is happend with struct in rust when I pass it to function argument. Are there some copy effect ?
What are some alternatives?
cons-list - Singly-linked list implementation in Rust
bytehound - A memory profiler for Linux.
sanitizers - AddressSanitizer, ThreadSanitizer, MemorySanitizer
memory-profiler - A memory profiler for Linux. [Moved to: https://github.com/koute/bytehound]
rust - Empowering everyone to build reliable and efficient software.
dhat-rs - Heap profiling and ad hoc profiling for Rust programs.
Rust-Full-Stack - Rust projects here are easy to use. There are blog posts for them also.
flamegraph - Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3
rfcs - RFCs for changes to Rust
pprof - pprof is a tool for visualization and analysis of profiling data
nomicon - The Dark Arts of Advanced and Unsafe Rust Programming
profiler - Firefox Profiler — Web app for Firefox performance analysis