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

Set thread names #732

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

andrey-utkin
Copy link
Contributor

With this change, we can see the purpose of each threads in the debugger, like that:

(gdb) info threads
  Id   Target Id                                      Frame
* 1    Thread 0x7f8ad6aef600 (LWP 3697) "MAIN"        0x00007f8ae02a5adf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7ffebcd3d9d0, rem=rem@entry=0x7ffebcd3d9d0)
    at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
  2    Thread 0x7f8acc8da6c0 (LWP 3737) "rcn2"        0x00007f8ae0251d71 in __futex_abstimed_wait_common64 (private=32650, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f8ac0057680)
    at ./nptl/futex-internal.c:57
  3    Thread 0x7f8acdffb6c0 (LWP 3730) "dev2"        0x00007f8ae02d44cd in __GI___poll (fds=fds@entry=0x7f8acdfeeda0, nfds=nfds@entry=1, timeout=timeout@entry=100) at ../sysdeps/unix/sysv/linux/poll.c:29
  4    Thread 0x7f8ace7fc6c0 (LWP 3729) "dev1"        0x00007f8ae02a5adf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f8ace7fad50, rem=rem@entry=0x7f8ace7fad50)
    at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
  5    Thread 0x7f8aceffd6c0 (LWP 3711) "LICENSE"     0x00007f8ae02a5adf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f8aceffbf90, rem=rem@entry=0x7f8aceffbf90)
    at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
  6    Thread 0x7f8acf7fe6c0 (LWP 3710) "RTSP_SERVER" 0x00007f8ae02d44cd in __GI___poll (fds=0x563a41ddfda8, nfds=2, timeout=100) at ../sysdeps/unix/sysv/linux/poll.c:29
  7    Thread 0x7f8ad48246c0 (LWP 3705) "HLS_SERVER"  0x00007f8ae02e3042 in epoll_wait (epfd=13, events=0x7f8ad4825010, maxevents=120000, timeout=100) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
  8    Thread 0x7f8ad51856c0 (LWP 3704) "API"         0x00007f8ae02e3042 in epoll_wait (epfd=7, events=0x7f8ad5186010, maxevents=120000, timeout=100) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
  9    Thread 0x7f8ad5ae66c0 (LWP 3703) "MONITORING"  0x00007f8ae02a5adf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f8ad5ae4fa0, rem=rem@entry=0x7f8ad5ae4fa0)
    at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
  10   Thread 0x7f8ad62e76c0 (LWP 3702) "TRIGGER"     0x00007f8ae02d44cd in __GI___poll (fds=fds@entry=0x7f8ad62e5f48, nfds=nfds@entry=1, timeout=timeout@entry=100) at ../sysdeps/unix/sysv/linux/poll.c:29
  11   Thread 0x7f8ad6ae86c0 (LWP 3701) "STATUS"      0x00007f8ae02d44cd in __GI___poll (fds=fds@entry=0x7f8ad6ae6f48, nfds=nfds@entry=1, timeout=timeout@entry=100) at ../sysdeps/unix/sysv/linux/poll.c:29

@andrey-utkin andrey-utkin marked this pull request as draft February 10, 2025 23:02
@andrey-utkin andrey-utkin marked this pull request as ready for review February 10, 2025 23:15
@andrey-utkin andrey-utkin force-pushed the set-thread-names branch 2 times, most recently from dccdb72 to 925b702 Compare February 11, 2025 18:54
@andrey-utkin andrey-utkin mentioned this pull request Dec 18, 2024
@andrey-utkin andrey-utkin merged commit dc3b28e into bluecherrydvr:master Feb 13, 2025
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants