-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Custom setproctitle #32667
Custom setproctitle #32667
Conversation
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
Doesn't seem to completely work. Name change isn't reflected in |
In Is this a valid fix? Spent an hour trying to modify the process names in memory with ctypes and no success. Looked at setproctitle source code and would rather flip a bool than steal that |
You can also |
The I think @schlimeszn has proposed a reasonable solution, it's just that AGNOS ships an
But with the process name and not the thread name:
I think it may be good to change that regardless. Additionally, it would be nice to be able to name threads within a multithreaded process and then be able to see which threads are consuming CPU in If we proceed with a thread naming approach, I have some notes:
|
Let's go with what @jyoung8607's outlined. I think this is a reasonable compromise to get rid of a dependency for something that provides minimal value. |
This reverts commit 3365ed5.
Reverted on master since |
* add custom setproctitle * add test * Update poetry.lock * fix lint * support only Linux * test only Linux * final lint * Update test_setproctitle.py * Update setproctitle.py * convert to threadnames * delete proctitles * Check str len and use PR_GET_NAME * fix poetry.lock * lint fix * Update common/threadname.py --------- Co-authored-by: reddyn12 <[email protected]> Co-authored-by: Adeeb Shihadeh <[email protected]>
* Custom setproctitle (#32667) * add custom setproctitle * add test * Update poetry.lock * fix lint * support only Linux * test only Linux * final lint * Update test_setproctitle.py * Update setproctitle.py * convert to threadnames * delete proctitles * Check str len and use PR_GET_NAME * fix poetry.lock * lint fix * Update common/threadname.py --------- Co-authored-by: reddyn12 <[email protected]> Co-authored-by: Adeeb Shihadeh <[email protected]> * revert that for now * use last 15 * fix * use name * update those * and modeld * rm --------- Co-authored-by: schlimeszn <[email protected]> Co-authored-by: reddyn12 <[email protected]> Co-authored-by: Comma Device <[email protected]>
* add custom setproctitle * add test * Update poetry.lock * fix lint * support only Linux * test only Linux * final lint * Update test_setproctitle.py * Update setproctitle.py * convert to threadnames * delete proctitles * Check str len and use PR_GET_NAME * fix poetry.lock * lint fix * Update common/threadname.py --------- Co-authored-by: reddyn12 <[email protected]> Co-authored-by: Adeeb Shihadeh <[email protected]> old-commit-hash: 3365ed5
This reverts commit 1f45e163559baa2a6127d5a5e8deb7067e32f813. old-commit-hash: 5b51f03
* Custom setproctitle (commaai#32667) * add custom setproctitle * add test * Update poetry.lock * fix lint * support only Linux * test only Linux * final lint * Update test_setproctitle.py * Update setproctitle.py * convert to threadnames * delete proctitles * Check str len and use PR_GET_NAME * fix poetry.lock * lint fix * Update common/threadname.py --------- Co-authored-by: reddyn12 <[email protected]> Co-authored-by: Adeeb Shihadeh <[email protected]> * revert that for now * use last 15 * fix * use name * update those * and modeld * rm --------- Co-authored-by: schlimeszn <[email protected]> Co-authored-by: reddyn12 <[email protected]> Co-authored-by: Comma Device <[email protected]> old-commit-hash: 83ac80c
Resolves: #32660
It's a simple refactor with a test to confirm correctness.