The dhat::Profiler profiler gives zero heap stats (i.e., not allocating any blocks) when I use the rustc_driver crate to start a rustc instance. After debugging, I find that dhat::Alloc::alloc does not get called.
@nnethercote I wonder if this problem is relevant to the fact that rustc has a special mechanism to use jemalloc. BTW, valgrind --tool=dhat works for my project (already helped resolving OOM problems but took dozens of hours to run), and I guess dhat-rs would run significantly faster.
The
dhat::Profiler
profiler gives zero heap stats (i.e., not allocating any blocks) when I use therustc_driver
crate to start arustc
instance. After debugging, I find thatdhat::Alloc::alloc
does not get called.@nnethercote I wonder if this problem is relevant to the fact that
rustc
has a special mechanism to usejemalloc
. BTW,valgrind --tool=dhat
works for my project (already helped resolving OOM problems but took dozens of hours to run), and I guessdhat-rs
would run significantly faster.