[PATCH 0/1] MR5167: quartz: Set the name of internal threads.
From: Brendan Shanks <bshanks(a)codeweavers.com> --- dlls/quartz/filesource.c | 2 ++ dlls/quartz/filtergraph.c | 2 ++ dlls/quartz/systemclock.c | 1 + 3 files changed, 5 insertions(+) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 7d6292df579..2250d32017a 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -381,6 +381,8 @@ static DWORD CALLBACK io_thread(void *arg) DWORD size; BOOL ret; + SetThreadDescription(GetCurrentThread(), L"wine_quartz_file_async_reader_io"); + for (;;) { ret = GetQueuedCompletionStatus(filter->port, &size, &key, &ovl, INFINITE); diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 4100e71be3a..00b0d2ae633 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -1033,6 +1033,8 @@ static DWORD WINAPI message_thread_run(void *ctx) { MSG msg; + SetThreadDescription(GetCurrentThread(), L"wine_quartz_filter_graph_worker"); + /* Make sure we have a message queue. */ PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE); SetEvent(message_thread_ret); diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 01a8e9fa1ee..bb1d399d04a 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -144,6 +144,7 @@ static DWORD WINAPI SystemClockAdviseThread(void *param) REFERENCE_TIME current_time; TRACE("Starting advise thread for clock %p.\n", clock); + SetThreadDescription(GetCurrentThread(), L"wine_quartz_system_clock_advise"); for (;;) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5167
It's a bit unfortunate how early Linux cuts these off. Could we strip the "wine" prefix maybe? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5167#note_62716
On Tue Feb 27 06:34:13 2024 +0000, Zebediah Figura wrote:
It's a bit unfortunate how early Linux cuts these off. Could we strip the "wine" prefix maybe? It's unfortunate that the names get cut off on Linux, but I think the "wine" prefix is important since it makes it very easy to tell that a thread comes from Wine rather than an app or game. Especially when looking at a crash log which may have `+threadname` turned on but not `+quartz` or anything more specific.
Maybe I could remove an underscore, so that these names will at least be unique when cut off to 15 characters? Then you would see `winequartz_file`, `wine_quartz_filt`, and `winequartz_syst`. (And also, the full thread names are seen in `+threadname` and `winedbg`) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5167#note_62791
On Tue Feb 27 06:34:13 2024 +0000, Brendan Shanks wrote:
It's unfortunate that the names get cut off on Linux, but I think the "wine" prefix is important since it makes it very easy to tell that a thread comes from Wine rather than an app or game. Especially when looking at a crash log which may have `+threadname` turned on but not `+quartz` or anything more specific. Maybe I could remove an underscore, so that these names will at least be unique when cut off to 15 characters? Then you would see `winequartz_file`, `wine_quartz_filt`, and `winequartz_syst`. (And also, the full thread names are seen in `+threadname` and `winedbg`) Hm. We don't use the abbreviation elsewhere, but maybe "wine_qtz" or "wine_qz"?
Simplifying to "wine_qz_async_reader_io" and "wine_qz_graph_worker" would also put more semantically interesting parts within the 15 character limit. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5167#note_62832
participants (3)
-
Brendan Shanks -
Brendan Shanks (@bshanks) -
Zebediah Figura (@zfigura)