svenstaro / cargo-profiler

Cargo subcommand to profile binaries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic with "failed to execute process"

matthiasbeyer opened this issue · comments

Here's what I've got:

$ RUST_BACKTRACE=1 cargo profiler callgrind --release

Compiling imag-store in release mode...

Profiling imag-store with callgrind...
thread 'main' panicked at 'failed to execute process: No such file or directory (os error 2)', /home/m/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-profiler-0.1.6/src/parse/callgrind.rs:28
stack backtrace:
   1:     0x7f3af547f85f - std::sys::backtrace::tracing::imp::write::h46e546df6e4e4fe6
   2:     0x7f3af548437b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h077deeda8b799591
   3:     0x7f3af5484007 - std::panicking::default_hook::heb8b6fd640571a4f
   4:     0x7f3af5473b0e - std::panicking::rust_panic_with_hook::hd7b83626099d3416
   5:     0x7f3af54845c1 - std::panicking::begin_panic::h941ea76fc945d925
   6:     0x7f3af54746ca - std::panicking::begin_panic_fmt::h30280d4dd3f149f5
   7:     0x7f3af539879f - cargo_profiler::real_main::hfc1db50b3d8f39f2
   8:     0x7f3af5395f00 - cargo_profiler::main::hbb5817797bfb8430
   9:     0x7f3af5483be8 - std::panicking::try::call::hca715a47aa047c49
  10:     0x7f3af5489f1b - __rust_try
  11:     0x7f3af5489ebe - __rust_maybe_catch_panic
  12:     0x7f3af54837a3 - std::rt::lang_start::h162055cb2e4b9fe7
  13:     0x7f3af47ae2df - __libc_start_main
  14:     0x7f3af5395de9 - _start
                        at ../sysdeps/x86_64/start.S:120
  15:                0x0 - <unknown>

The problem was that valgrind was not installed. I guess crashing is a bad option here, isn't it? A nice error message would do much better! 😄

That's a good idea I'll reopen a ticket around general valgrind installation.