-
Notifications
You must be signed in to change notification settings - Fork 694
YQ-3561 add features for FQ-run #14826
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
YQ-3561 add features for FQ-run #14826
Conversation
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
a66bbe9
to
887af1f
Compare
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
||
fqrun_pid=$(pgrep -u $USER fqrun) | ||
|
||
sudo perf record -F 50 --call-graph dwarf -g --proc-map-timeout=10000 --pid $fqrun_pid -v -o profdata -- sleep ${1:-'30'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А нужно ли тут sudo
? (возможно, в некоторых случаях -- да, но в некоторых случаях -- тот же пользователь, отсутствие параноидальных настроек с ptrace -- работает и без него). (Насколько я понимаю, это просто скопировано из kqprun, так что те же вопросы можно адресовать и к тому скрипту)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Иногда без sudo у меня perf ругался, оставил чтобы работало скорее всегда (если прав на sudo нет, что редко, можно в ручную убрать).
Это ведь не засоряет лишними файлами fs для супер пользователя?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perf record
вроде ничего трогать не должен, и не сильно страшен; только вот он сохраняет perf.data с 0600 root:root
, что побуждает и perf script
запускать с sudo
, а он делает всякое-страшное (и насчёт загрязнения не уверен)
В общем, чем с меньшими правами всякое запускается -- тем меньше шансов случайно отстрелить.
Я бы скорее вставил в скрипт что-то вроде $SUDO perf [...] и оставил выставление SUDO=sudo ./flame-graph.sh
на пользователя (если у него без sudo не работает)
Но можно оставить и как есть
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хорошее замечание, поправлю в следующем PR
@@ -20,6 +20,7 @@ PEERDIR( | |||
ydb/library/security | |||
ydb/library/yql/providers/pq/provider | |||
ydb/tests/tools/kqprun/runlib | |||
yql/essentials/minikql | |||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
рекомендую сортировать списки. util лучше убери, он всегда неявно подключается
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я стараюсь везде сортировать список PEERDIR по возрастанию, где тут нарушился порядок? С ходу не видно
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ну вот ты добавил строчку не по алфавиту
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
util тоже не по алфавиту был
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
Added features for FQ-run
Changelog category
Description for reviewers