]> git.lizzy.rs Git - rust.git/commit
Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 26 Apr 2018 05:35:24 +0000 (15:35 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Thu, 26 Apr 2018 09:22:35 +0000 (19:22 +1000)
commit2e4f66a86f7baa5644d18bb2adc07a8cd1c7409d
tree886b843b43ba8b643554b1dcd546da3d72a66df3
parentcc794209681d6b11a63282bcd1513caa50127816
Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.

Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.

The patch also removes some now-unnecessary log_enabled! tests at call
sites.
src/librustc_mir/interpret/eval_context.rs
src/librustc_mir/interpret/memory.rs
src/librustc_mir/interpret/place.rs