-
Notifications
You must be signed in to change notification settings - Fork 288
Tracefs location #710
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
base: master
Are you sure you want to change the base?
Tracefs location #710
Changes from 2 commits
75bee5f
e49008a
262cd7d
1d452dd
b7959f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,7 @@ QByteArray perfBuildOptions(const QString& perfPath) | |
|
|
||
| bool canTrace(const QString& path) | ||
| { | ||
| const QFileInfo info(QLatin1String("/sys/kernel/debug/tracing/") + path); | ||
| const QFileInfo info(QLatin1String("/sys/kernel/tracing/") + path); | ||
| if (!info.isDir() || !info.isReadable()) { | ||
| return false; | ||
| } | ||
|
|
@@ -116,7 +116,7 @@ bool privsAlreadyElevated() | |
| struct stat buf; | ||
| return stat(path, &buf) == 0 && ((buf.st_mode & 07777) & required) == required; | ||
| }; | ||
| static const auto paths = {"/sys/kernel/debug", "/sys/kernel/debug/tracing"}; | ||
| static const auto paths = {"/sys/kernel/", "/sys/kernel/tracing"}; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checking
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so, yes - the old code was needed back then (Linux 3.x I think), because there tracing was mounted into debug, and thus needed to be checked separately
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that said, I wouldn't mind if we could rework this code: check first if |
||
| isElevated = std::all_of(paths.begin(), paths.end(), checkPerms); | ||
|
|
||
| return isElevated; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.