Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profraw: raw profile version mismatch while collecting converage #6

Closed
sugamadhiakri opened this issue Jun 25, 2024 · 5 comments
Closed

Comments

@sugamadhiakri
Copy link

First I followed the instructions with LLVM 19 and ran into #5 then I installed LLVM-18 and ran into #4 .

I used the following command:

sudo usermod -aG kvm $USER
newgrp kvm

Now, when trying to execute this command chain:

mkdir -p $MCDC_HOME/analysis
mv profraw $MCDC_HOME/analysis
cd $MCDC_HOME/analysis

llvm-profdata merge profraw -o profdata
llvm-cov show --show-mcdc                                                      \
              --show-mcdc-summary                                              \
              --show-region-summary=false                                      \
              --show-branch-summary=false                                      \
              --format=html                                                    \
              -show-directory-coverage                                         \
              -output-dir=html-coverage-reports                                \
              -instr-profile profdata                                          \
              $MCDC_HOME/linux/vmlinux

I am getting the following error:

image

@whentojump
Copy link
Member

Make sure you are using the same toolchain to produce and to consume the profile.

From what I can see you built the kernel with LLVM 18, but your invocations of llvm-profdata and llvm-cov look like 19.

llvm-profdata --version
llvm-cov --version

@sugamadhiakri
Copy link
Author

Thank you. I looked into the PATH and it didn't have the path to LLVM 18. After updating the path, I was able to get the coverage reports. Are there any tasks for me now? Should I look into your reply at #5 ?

@whentojump
Copy link
Member

Sounds great! Hopefully you've had a big picture now. You are always encouraged to rethink this whole process, explore and ask if there's anything unclear.

Are there any tasks for me now? Should I look into your reply at #5 ?

Yeah please do that. Depending on your expertise and interests, you may also start fixing some LLVM bugs. If you prefer the latter, let's talk more in emails.

cc @darko-marinov

@sugamadhiakri
Copy link
Author

sugamadhiakri commented Jun 28, 2024 via email

@whentojump
Copy link
Member

The issue in the original post is addressed. Let's discuss your plan in the other channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants