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
Incorrect help message when uftrace fails to trace kernel functions #1471
Comments
Hi @shpark, thanks for the report. Could you please send a PR by detecting mount point of debugfs? There is a nice example at https://stackoverflow.com/questions/9280759/linux-function-to-get-mount-points. #include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
int main(void)
{
struct mntent *ent;
FILE *aFile;
aFile = setmntent("/proc/mounts", "r");
if (aFile == NULL) {
perror("setmntent");
exit(1);
}
while (NULL != (ent = getmntent(aFile))) {
printf("%s %s\n", ent->mnt_fsname, ent->mnt_dir);
}
endmntent(aFile);
} If that is difficult, then you can make a workaround based on my previous comment?
|
SG Let me work on this issue. I will soon send a PR 😄 |
I just worried if So we can go ahead with it. @shpark Please send a PR then :) |
It could check the error code and display warnings based on it. It might do additional checks like if tracefs is mounted or if kernel config has a specific feature. |
This issue is resolved by #1762 so I will close it. |
I tried to trace kernel functions with uftrace using the following command:
sudo uftrace record -k ./a.out
.It failed to trace kernel function, saying that:
However, it seemed that the config was enabled for my setting (Debian 10 running inside a Docker container on MacOS Monterey 12.0.1 host on M1 pro chip):
After looking at more verbose logs, I concluded that the root cause was prolly the absence of
tracing_on
file on proper path:Imho the error message would better be refined to provide better suggestions (e.g, mount debugfs, etc.).
Maybe related to #797
The text was updated successfully, but these errors were encountered: