Open yuhui518 opened 9 months ago
The llvm-cov's command is: 1.cd target/debug 2.llvm-profdata merge -sparse *.profraw -o json5format.profdata 3.cd ../.. 4.. llvm-cov report --use-color --ignore-filename-regex='/.cargo/registry' --instr-profile=target/debug/json5format.profdata --object target/debug/hello_world
1.cargo new hello_world 2.RUSTFLAGS="-C instrument-coverage" cargo cuild 3.cd target/debug && ./hello_world
Next, I use the llvm-cov tool to get the same profraw file's code covrage,the result is:
I just only excute the "hello_world" binary one times, the grcov's result is three times, and the llvm-cov's result is correct.