You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ find src -type f
src/lib.rs
src/bin/prof_bin.rs
$ cat src/lib.rs
pub fn libfunc() {
println!("This is a library function");
}
$ cat src/bin/prof_bin.rs
use cargo_profiler_example::*;
fn main() {
libfunc();
}
$ cargo run --bin prof_bin
Compiling cargo-profiler-example v0.1.0 (/home/novadenizen/prog/cargo-profiler-example)
Finished dev [unoptimized + debuginfo] target(s) in 0.30s
Running `target/debug/prof_bin`
This is a library function
$ cargo profiler cachegrind --bin prof_bin
error: Invalid binary. make sure binary exists.
I did an strace of the cargo profiler command, and found that the current directory is unchanged from the project directory, and it's trying to open the prof_bin binary in the current directory.
I created an empty prof_bin file in the project directory and you can see the error changes.
$ touch prof_bin
$ cargo profiler cachegrind --bin prof_bin
Profiling prof_bin with cachegrind...
error: Misaligned data arrays due to regex error -- please file a bug.
$
The text was updated successfully, but these errors were encountered:
I did an strace of the cargo profiler command, and found that the current directory is unchanged from the project directory, and it's trying to open the
prof_bin
binary in the current directory.I created an empty
prof_bin
file in the project directory and you can see the error changes.The text was updated successfully, but these errors were encountered: