[vlc-devel] [PATCH 3/4] modules: set names to threads created in modules

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 9 15:28:23 CET 2020


---
 modules/access/alsa.c                         |  2 ++
 modules/access/dv.c                           |  3 ++
 modules/access/http/h2conn.c                  |  2 ++
 modules/access/http/h2output.c                | 13 +++++--
 modules/access/mms/mmstu.c                    |  2 ++
 modules/access/rdp.c                          |  3 ++
 modules/access/rist.c                         |  2 ++
 modules/access/rtp/input.c                    |  2 ++
 modules/access/satip.c                        |  3 ++
 modules/access/screen/wayland.c               |  3 ++
 modules/access/v4l2/demux.c                   |  6 ++++
 modules/access/vnc.c                          |  2 ++
 modules/access_output/rist.c                  | 34 +++++++++++--------
 modules/access_output/udp.c                   |  3 ++
 modules/audio_output/audiotrack.c             |  3 ++
 modules/audio_output/directsound.c            |  2 ++
 modules/audio_output/mmdevice.c               |  2 ++
 modules/codec/dmo/dmo.c                       |  2 ++
 modules/codec/omxil/mediacodec.c              |  2 ++
 modules/control/cli/cli.c                     |  2 ++
 modules/control/dbus/dbus.c                   |  2 ++
 modules/control/globalhotkeys/win32.c         |  2 ++
 modules/control/globalhotkeys/xcb.c           |  2 ++
 modules/control/lirc.c                        |  2 ++
 modules/control/netsync.c                     |  5 +++
 modules/control/ntservice.c                   |  2 ++
 modules/control/win_msg.c                     |  2 ++
 modules/demux/adaptive/PlaylistManager.cpp    |  2 ++
 modules/demux/adaptive/http/Downloader.cpp    |  2 ++
 modules/demux/mkv/events.cpp                  |  2 ++
 modules/gui/ncurses.c                         |  2 ++
 modules/gui/qt/qt.cpp                         |  2 ++
 modules/gui/skins2/src/skin_main.cpp          |  2 ++
 modules/lua/extension_thread.c                |  2 ++
 modules/lua/intf.c                            |  2 ++
 modules/lua/services_discovery.c              |  2 ++
 modules/misc/audioscrobbler.c                 |  2 ++
 modules/misc/fingerprinter.c                  |  2 ++
 modules/services_discovery/microdns.c         |  4 +++
 modules/services_discovery/mtp.c              |  2 ++
 modules/services_discovery/podcast.c          |  2 ++
 modules/services_discovery/sap.c              |  3 ++
 modules/services_discovery/udev.c             |  2 ++
 modules/services_discovery/upnp.cpp           |  4 +++
 modules/services_discovery/xcb_apps.c         |  4 ++-
 modules/stream_filter/decomp.c                |  2 ++
 modules/stream_filter/hds/hds.c               |  4 +++
 modules/stream_filter/prefetch.c              |  2 ++
 .../stream_out/chromecast/chromecast_ctrl.cpp |  2 ++
 modules/stream_out/rtp.c                      |  4 +++
 modules/stream_out/sdi/DBMSDIOutput.cpp       |  2 ++
 modules/stream_out/sdi/SDIStream.cpp          |  2 ++
 modules/stream_out/transcode/encoder/video.c  |  3 ++
 modules/video_output/caca.c                   |  2 ++
 modules/video_output/wayland/xdg-shell.c      |  2 ++
 modules/video_output/win32/events.c           |  3 ++
 modules/video_output/win32/inhibit.c          |  2 ++
 modules/video_output/win32/window.c           |  2 ++
 modules/video_output/xcb/window.c             |  2 ++
 modules/visualization/glspectrum.c            |  2 ++
 modules/visualization/goom.c                  |  2 ++
 modules/visualization/projectm.cpp            |  2 ++
 modules/visualization/visual/visual.c         |  2 ++
 modules/visualization/vsxu.cpp                |  2 ++
 64 files changed, 179 insertions(+), 18 deletions(-)

diff --git a/modules/access/alsa.c b/modules/access/alsa.c
index a92cf3e2c0b..4b2b7162087 100644
--- a/modules/access/alsa.c
+++ b/modules/access/alsa.c
@@ -159,6 +159,8 @@ static void *Thread (void *data)
     size_t bytes;
     int canc, val;
 
+    vlc_thread_set_name("vlc-access-alsa");
+
     canc = vlc_savecancel ();
     bytes = snd_pcm_frames_to_bytes (pcm, sys->period_size);
     val = snd_pcm_start (pcm);
diff --git a/modules/access/dv.c b/modules/access/dv.c
index 8a8baa104d7..fb8bf5f5a66 100644
--- a/modules/access/dv.c
+++ b/modules/access/dv.c
@@ -322,6 +322,9 @@ static void* Raw1394EventThread( void *obj )
     event_thread_t *p_ev = (event_thread_t *)obj;
     stream_t *p_access = (stream_t *) p_ev->p_access;
     access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
+
+    vlc_thread_set_name("vlc-access-dv");
+
     int result = 0;
     int canc = vlc_savecancel();
 
diff --git a/modules/access/http/h2conn.c b/modules/access/http/h2conn.c
index cab9610e67a..21d5901face 100644
--- a/modules/access/http/h2conn.c
+++ b/modules/access/http/h2conn.c
@@ -800,6 +800,8 @@ static void *vlc_h2_recv_thread(void *data)
     struct vlc_h2_parser *parser;
     int canc, val;
 
+    vlc_thread_set_name("vlc-access-http-h2recv");
+
     canc = vlc_savecancel();
     parser = vlc_h2_parse_init(conn, &vlc_h2_parser_callbacks);
     if (unlikely(parser == NULL))
diff --git a/modules/access/http/h2output.c b/modules/access/http/h2output.c
index 74188ef29c4..7e335e000af 100644
--- a/modules/access/http/h2output.c
+++ b/modules/access/http/h2output.c
@@ -255,7 +255,7 @@ static int vlc_h2_frame_send(struct vlc_tls *tls, struct vlc_h2_frame *f)
 }
 
 /** Output thread */
-static void *vlc_h2_output_thread(void *data)
+static void *output_thread(void *data)
 {
     struct vlc_h2_output *out = data;
     struct vlc_h2_frame *frame;
@@ -283,11 +283,20 @@ static void *vlc_h2_output_thread(void *data)
     return NULL;
 }
 
+static void *vlc_h2_output_thread(void *data, bool client)
+{
+    vlc_thread_set_name("vlc-access-http2-out");
+
+    return output_thread(data);
+}
+
 static void *vlc_h2_client_output_thread(void *data)
 {
     static const char http2_hello[] = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
     struct vlc_h2_output *out = data;
 
+    vlc_thread_set_name("vlc-access-http2-client-out");
+
     if (vlc_https_send(out->tls, http2_hello, 24) < 24)
     {
         vlc_mutex_lock(&out->lock);
@@ -296,7 +305,7 @@ static void *vlc_h2_client_output_thread(void *data)
         return NULL;
     }
 
-    return vlc_h2_output_thread(data);
+    return output_thread(data);
 }
 
 struct vlc_h2_output *vlc_h2_output_create(struct vlc_tls *tls, bool client)
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index c524b22816b..8992af97fc5 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -1587,6 +1587,8 @@ static void *KeepAliveThread( void *p_data )
     stream_t *p_access = p_data;
     access_sys_t *p_sys = p_access->p_sys;
 
+    vlc_thread_set_name("vlc-access-mms-keepalive");
+
     do  /* Send keep-alive every ten seconds */
         mms_CommandSend( p_access, 0x1b, 0, 0, NULL, 0 );
     while (vlc_sem_timedwait( &p_sys->keep_alive.sem,
diff --git a/modules/access/rdp.c b/modules/access/rdp.c
index b1a0fe0bdf7..9004eb4da4c 100644
--- a/modules/access/rdp.c
+++ b/modules/access/rdp.c
@@ -333,6 +333,9 @@ static void *DemuxThread( void *p_data )
 {
     demux_t *p_demux = (demux_t *) p_data;
     demux_sys_t *p_sys = p_demux->p_sys;
+
+    vlc_thread_set_name("vlc-access-rdp");
+
     p_sys->i_starttime = vlc_tick_now();
     vlc_tick_t i_next_frame_date = vlc_tick_now() + p_sys->i_frame_interval;
     int i_ret;
diff --git a/modules/access/rist.c b/modules/access/rist.c
index 009c17790da..078b4e395d5 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -778,6 +778,8 @@ static void *rist_thread(void *data)
     stream_sys_t *p_sys = p_access->p_sys;
     block_t *pkt_nacks;
 
+    vlc_thread_set_name("vlc-access-rist");
+
     /* Process nacks every 5ms */
     /* We only ask for the relevant ones */
     while ((pkt_nacks = vlc_queue_DequeueKillable(&p_sys->queue,
diff --git a/modules/access/rtp/input.c b/modules/access/rtp/input.c
index d819fe5fff2..cb8a21c1723 100644
--- a/modules/access/rtp/input.c
+++ b/modules/access/rtp/input.c
@@ -112,6 +112,8 @@ void *rtp_dgram_thread (void *opaque)
     vlc_tick_t deadline = VLC_TICK_INVALID;
     struct vlc_dtls *rtp_sock = sys->rtp_sock;
 
+    vlc_thread_set_name("vlc-access-rtp-dgram");
+
     for (;;)
     {
         struct pollfd ufd[1];
diff --git a/modules/access/satip.c b/modules/access/satip.c
index 4bb4a563aa1..4c079226224 100644
--- a/modules/access/satip.c
+++ b/modules/access/satip.c
@@ -438,6 +438,9 @@ static void satip_teardown(void *data) {
 static void *satip_thread(void *data) {
     stream_t *access = data;
     access_sys_t *sys = access->p_sys;
+
+    vlc_thread_set_name("vlc-access-satip");
+
     int sock = sys->udp_sock;
     vlc_tick_t last_recv = vlc_tick_now();
     ssize_t len;
diff --git a/modules/access/screen/wayland.c b/modules/access/screen/wayland.c
index 07dc2c264d7..88e38215a8c 100644
--- a/modules/access/screen/wayland.c
+++ b/modules/access/screen/wayland.c
@@ -236,6 +236,9 @@ static void *Thread(void *data)
     demux_sys_t *sys = demux->p_sys;
     struct wl_display *display = sys->display;
     struct pollfd ufd[1];
+
+    vlc_thread_set_name("vlc-access-wayland");
+
     unsigned interval = lroundf(CLOCK_FREQ / (sys->rate * 1000.f));
 
     int canc = vlc_savecancel();
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index 00f02ee76ec..bba77a58861 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -679,6 +679,8 @@ static void *UserPtrThread (void *data)
     struct pollfd ufd[2];
     nfds_t numfds = 1;
 
+    vlc_thread_set_name("vlc-access-v4l2-user");
+
     ufd[0].fd = fd;
     ufd[0].events = POLLIN;
 
@@ -729,6 +731,8 @@ static void *MmapThread (void *data)
     struct pollfd ufd[2];
     nfds_t numfds = 1;
 
+    vlc_thread_set_name("vlc-access-v4l2-mmap");
+
     ufd[0].fd = fd;
     ufd[0].events = POLLIN;
 
@@ -780,6 +784,8 @@ static void *ReadThread (void *data)
     struct pollfd ufd[2];
     nfds_t numfds = 1;
 
+    vlc_thread_set_name("vlc-access-v4l2-read");
+
     ufd[0].fd = fd;
     ufd[0].events = POLLIN;
 
diff --git a/modules/access/vnc.c b/modules/access/vnc.c
index cd003eb5755..9aadc729413 100644
--- a/modules/access/vnc.c
+++ b/modules/access/vnc.c
@@ -342,6 +342,8 @@ static void *DemuxThread( void *p_data )
     vlc_tick_t i_next_frame_date = vlc_tick_now() + p_sys->i_frame_interval;
     int i_status;
 
+    vlc_thread_set_name("vlc-access-vnc");
+
     for(;;)
     {
         i_status = WaitForMessage( p_sys->p_client, p_sys->i_frame_interval );
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 61066bdc2b1..9c4150eb983 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -121,7 +121,7 @@ static struct rist_flow *rist_init_tx()
     return flow;
 }
 
-static struct rist_flow *rist_udp_transmitter(sout_access_out_t *p_access, char *psz_dst_server, 
+static struct rist_flow *rist_udp_transmitter(sout_access_out_t *p_access, char *psz_dst_server,
     int i_dst_port, bool b_ismulticast)
 {
     struct rist_flow *flow;
@@ -208,11 +208,11 @@ static void rist_retransmit(sout_access_out_t *p_access, struct rist_flow *flow,
     }
     else
     {
-        msg_Dbg(p_access, "   Sending Nack #%d (age %"PRId64" ms), current seq is: [%d]", 
+        msg_Dbg(p_access, "   Sending Nack #%d (age %"PRId64" ms), current seq is: [%d]",
             seq, age, flow->wi);
         p_sys->i_retransmit_packets++;
         vlc_mutex_lock( &p_sys->fd_lock );
-        if (rist_Write(flow->fd_out, pkt->buffer->p_buffer, pkt->buffer->i_buffer) 
+        if (rist_Write(flow->fd_out, pkt->buffer->p_buffer, pkt->buffer->i_buffer)
                 != (ssize_t)pkt->buffer->i_buffer) {
             msg_Err(p_access, "Error sending retransmitted packet after 2 tries ...");
         }
@@ -221,13 +221,13 @@ static void rist_retransmit(sout_access_out_t *p_access, struct rist_flow *flow,
     }
 }
 
-static void process_nack(sout_access_out_t *p_access, uint8_t  ptype, uint16_t nrecords, 
+static void process_nack(sout_access_out_t *p_access, uint8_t  ptype, uint16_t nrecords,
     struct rist_flow *flow, uint8_t *pkt)
 {
     sout_access_out_sys_t *p_sys = p_access->p_sys;
     int i,j;
 
-    /*msg_Info(p_access, "   Nack (BbRR), %d record(s), Window: [%d:%d-->%d]", nrecords, 
+    /*msg_Info(p_access, "   Nack (BbRR), %d record(s), Window: [%d:%d-->%d]", nrecords,
         flow->ri, flow->wi, flow->wi-flow->ri);*/
 
     if (ptype == RTCP_PT_RTPFR)
@@ -276,12 +276,12 @@ static void process_nack(sout_access_out_t *p_access, uint8_t  ptype, uint16_t n
     }
     else
     {
-        msg_Err(p_access, "   !!! Wrong feedback. Ptype is %02x!=%02x, FMT: %02x", ptype, 
+        msg_Err(p_access, "   !!! Wrong feedback. Ptype is %02x!=%02x, FMT: %02x", ptype,
             RTCP_PT_RTPFR, rtcp_fb_get_fmt(pkt));
     }
 }
 
-static void rist_rtcp_recv(sout_access_out_t *p_access, struct rist_flow *flow, uint8_t *pkt_raw, 
+static void rist_rtcp_recv(sout_access_out_t *p_access, struct rist_flow *flow, uint8_t *pkt_raw,
     size_t len)
 {
     sout_access_out_sys_t *p_sys = p_access->p_sys;
@@ -297,9 +297,9 @@ static void rist_rtcp_recv(sout_access_out_t *p_access, struct rist_flow *flow,
         if ( bytes_left < 4 )
         {
             /* we must have at least 4 bytes */
-            msg_Err(p_access, "Rist rtcp packet must have at least 4 bytes, we have %d", 
+            msg_Err(p_access, "Rist rtcp packet must have at least 4 bytes, we have %d",
                 bytes_left);
-            return; 
+            return;
         }
         else if (!rtp_check_hdr(pkt))
         {
@@ -315,7 +315,7 @@ static void rist_rtcp_recv(sout_access_out_t *p_access, struct rist_flow *flow,
         {
             /* check for a sane number of bytes */
             msg_Err(p_access, "Malformed feedback packet, wrong len %d, expecting %u bytes in the" \
-                " packet, got a buffer of %u bytes. ptype = %d", rtcp_get_length(pkt), bytes, 
+                " packet, got a buffer of %u bytes. ptype = %d", rtcp_get_length(pkt), bytes,
                 bytes_left, ptype);
             return;
         }
@@ -421,6 +421,8 @@ static void *rist_thread(void *data)
     int ret;
     ssize_t r;
 
+    vlc_thread_set_name("vlc-access-rist-read");
+
     int poll_sockets = 1;
     pfd[0].fd = p_sys->flow->fd_rtcp;
     pfd[0].events = POLLIN;
@@ -444,7 +446,7 @@ static void *rist_thread(void *data)
                         "cut, please keep it under %d bytes", r, RTP_PKT_SIZE);
                 }
                 if (unlikely(r == -1)) {
-                    msg_Err(p_access, "socket %d error: %s\n", p_sys->flow->fd_rtcp, 
+                    msg_Err(p_access, "socket %d error: %s\n", p_sys->flow->fd_rtcp,
                         gai_strerror(errno));
                 }
                 else {
@@ -492,6 +494,8 @@ static void* ThreadSend( void *data )
     struct rist_flow *flow = p_sys->flow;
     block_t *out;
 
+    vlc_thread_set_name("vlc-access-rist-write");
+
     while ((out = vlc_queue_DequeueKillable(&p_sys->queue,
                                             &p_sys->dead)) != NULL)
     {
@@ -563,7 +567,7 @@ static void* ThreadSend( void *data )
                 if (p_sys->i_total_packets > 0)
                     quality = (float)100 - (float)100*(float)(p_sys->i_retransmit_packets)
                         /(float)p_sys->i_total_packets;
-                msg_Info(p_access, "STATS: Total %u, Retransmitted %u, Link Quality %.2f%%", 
+                msg_Info(p_access, "STATS: Total %u, Retransmitted %u, Link Quality %.2f%%",
                     p_sys->i_total_packets, p_sys->i_retransmit_packets, quality);
             }
             p_sys->i_last_stat = now;
@@ -605,7 +609,7 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
         if( !p_sys->b_mtu_warning && p_buffer->i_buffer > p_sys->i_packet_size )
         {
             msg_Warn( p_access, "Buffer data size (%zu) > configured packet size (%zu), you " \
-                "should probably increase the configured packet size", p_buffer->i_buffer, 
+                "should probably increase the configured packet size", p_buffer->i_buffer,
                 p_sys->i_packet_size );
             p_sys->b_mtu_warning = true;
         }
@@ -765,7 +769,7 @@ static int Open( vlc_object_t *p_this )
     vlc_mutex_init( &p_sys->lock );
     vlc_mutex_init( &p_sys->fd_lock );
 
-    msg_Info(p_access, "Connecting RIST output to %s:%d and %s:%d", psz_dst_addr, i_dst_port, 
+    msg_Info(p_access, "Connecting RIST output to %s:%d and %s:%d", psz_dst_addr, i_dst_port,
         psz_dst_addr, i_dst_port+1);
     p_sys->b_ismulticast = is_multicast_address(psz_dst_addr);
     struct rist_flow *flow = rist_udp_transmitter(p_access, psz_dst_addr, i_dst_port,
@@ -785,7 +789,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->ssrc &= ~(1 << 0);
 
     msg_Info(p_access, "SSRC: 0x%08X", p_sys->ssrc);
-    p_sys->i_ticks_caching = VLC_TICK_FROM_MS(var_InheritInteger( p_access, 
+    p_sys->i_ticks_caching = VLC_TICK_FROM_MS(var_InheritInteger( p_access,
         SOUT_CFG_PREFIX "caching"));
     p_sys->i_packet_size = var_InheritInteger(p_access, SOUT_CFG_PREFIX "packet-size" );
     p_sys->dead = false;
diff --git a/modules/access_output/udp.c b/modules/access_output/udp.c
index e4ffa20f778..994e0f67751 100644
--- a/modules/access_output/udp.c
+++ b/modules/access_output/udp.c
@@ -354,6 +354,9 @@ static void* ThreadWrite( void *data )
     sout_access_out_t *p_access = data;
     sout_access_out_sys_t *p_sys = p_access->p_sys;
     vlc_tick_t i_date_last = -1;
+
+    vlc_thread_set_name("vlc-access-udp-write");
+
     const unsigned i_group = var_GetInteger( p_access,
                                              SOUT_CFG_PREFIX "group" );
     int i_to_send = i_group;
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 7e49388e35a..8372de2e1aa 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -1782,6 +1782,9 @@ AudioTrack_Thread( void *p_data )
 {
     audio_output_t *p_aout = p_data;
     aout_sys_t *p_sys = p_aout->sys;
+
+    vlc_thread_set_name("vlc-aout-audiotrack");
+
     JNIEnv *env = GET_ENV();
     vlc_tick_t i_play_deadline = 0;
     vlc_tick_t i_last_time_blocked = 0;
diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index 582771d1781..c0d3b79636f 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -1111,6 +1111,8 @@ static void * PlayedDataEraser( void * data )
     vlc_tick_t ticksleep;
     HRESULT dsresult;
 
+    vlc_thread_set_name("vlc-aout-directsound");
+
     for(;;)
     {
         int canc = vlc_savecancel();
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 55d0fbb57d6..c5b1155e17f 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1055,6 +1055,8 @@ static void *MMThread(void *data)
     aout_sys_t *sys = aout->sys;
     IMMDeviceEnumerator *it = sys->it;
 
+    vlc_thread_set_name("vlc-aout-mmdevice");
+
     EnterMTA();
     IMMDeviceEnumerator_RegisterEndpointNotificationCallback(it,
                                                           &sys->device_events);
diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index 3656b6cf615..616e730bc16 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -984,6 +984,8 @@ static void *DecoderThread( void *data )
     decoder_t *p_dec = data;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
+    vlc_thread_set_name("vlc-decoder-dmo");
+
     if( DecOpen( p_dec ) )
         return NULL; /* failed */
 
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 041faa9a46e..8d5c28a02e2 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -1369,6 +1369,8 @@ static void *OutThread(void *data)
     decoder_t *p_dec = data;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
+    vlc_thread_set_name("vlc-decoder-omxil");
+
     vlc_mutex_lock(&p_sys->lock);
     while (!p_sys->b_aborted)
     {
diff --git a/modules/control/cli/cli.c b/modules/control/cli/cli.c
index c741e7fcad6..11076b8fd23 100644
--- a/modules/control/cli/cli.c
+++ b/modules/control/cli/cli.c
@@ -352,6 +352,8 @@ error:      wordfree(&we);
 #ifndef _WIN32
 static void *Run(void *data)
 {
+    vlc_thread_set_name("vlc-control-cli");
+
     intf_thread_t *intf = data;
     intf_sys_t *sys = intf->p_sys;
 
diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 0837f640770..c5ba37f6eae 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -833,6 +833,8 @@ MPRISEntryPoint ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this )
 
 static void *Run( void *data )
 {
+    vlc_thread_set_name("vlc-control-dbus");
+
     intf_thread_t *p_intf = data;
     intf_sys_t    *p_sys = p_intf->p_sys;
 
diff --git a/modules/control/globalhotkeys/win32.c b/modules/control/globalhotkeys/win32.c
index 18239f5b612..0864a08c976 100644
--- a/modules/control/globalhotkeys/win32.c
+++ b/modules/control/globalhotkeys/win32.c
@@ -130,6 +130,8 @@ static void *Thread( void *p_data )
     intf_thread_t *p_intf = p_data;
     intf_sys_t *p_sys = p_intf->p_sys;
 
+    vlc_thread_set_name("vlc-control-hotkeys-win");
+
     /* Window which receives Hotkeys */
     vlc_mutex_lock( &p_sys->lock );
     p_sys->hotkeyWindow =
diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index 32b2d312c67..8b897bca816 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -362,6 +362,8 @@ static void *Thread( void *p_data )
     intf_sys_t *p_sys = p_intf->p_sys;
     xcb_connection_t *p_connection = p_sys->p_connection;
 
+    vlc_thread_set_name("vlc-control-hotkeys-xcb");
+
     int canc = vlc_savecancel();
 
     /* */
diff --git a/modules/control/lirc.c b/modules/control/lirc.c
index 818c4c9a3f5..5c66b5e9b6b 100644
--- a/modules/control/lirc.c
+++ b/modules/control/lirc.c
@@ -156,6 +156,8 @@ static void *Run( void *data )
     intf_thread_t *p_intf = data;
     intf_sys_t *p_sys = p_intf->p_sys;
 
+    vlc_thread_set_name("vlc-control-lirc");
+
     struct pollfd ufd;
     ufd.fd = p_sys->i_fd;
     ufd.events = POLLIN;
diff --git a/modules/control/netsync.c b/modules/control/netsync.c
index 4a75bc5bbd9..8b19e570b5a 100644
--- a/modules/control/netsync.c
+++ b/modules/control/netsync.c
@@ -177,6 +177,9 @@ static void *Master(void *handle)
 {
     intf_thread_t *intf = handle;
     intf_sys_t *sys = intf->p_sys;
+
+    vlc_thread_set_name("vlc-control-netsync-master");
+
     for (;;) {
         struct pollfd ufd = { .fd = sys->fd, .events = POLLIN, };
         uint64_t data[2];
@@ -220,6 +223,8 @@ static void *Slave(void *handle)
     intf_thread_t *intf = handle;
     intf_sys_t *sys = intf->p_sys;
 
+    vlc_thread_set_name("vlc-control-netsync-client");
+
     for (;;) {
         struct pollfd ufd = { .fd = sys->fd, .events = POLLIN, };
         uint64_t data[2];
diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c
index 386b853a142..bfae776d50a 100644
--- a/modules/control/ntservice.c
+++ b/modules/control/ntservice.c
@@ -138,6 +138,8 @@ void Close( vlc_object_t *p_this )
  *****************************************************************************/
 static void *Run( void *data )
 {
+    vlc_thread_set_name("vlc-control-ntservice");
+
     intf_thread_t *p_intf = data;
     SERVICE_TABLE_ENTRY dispatchTable[] =
     {
diff --git a/modules/control/win_msg.c b/modules/control/win_msg.c
index 0e7ae1ba700..c2a0bfb2a70 100644
--- a/modules/control/win_msg.c
+++ b/modules/control/win_msg.c
@@ -133,6 +133,8 @@ static LRESULT CALLBACK WMCOPYWNDPROC(HWND hwnd, UINT uMsg,
 
 static void *HelperThread(void *data)
 {
+    vlc_thread_set_name("vlc-control-winmsg");
+
     intf_thread_t *intf = data;
     intf_sys_t *sys = intf->p_sys;
 
diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index 0e7b62a1413..f4b0fa68509 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -634,6 +634,8 @@ void PlaylistManager::setBufferingRunState(bool b)
 
 void PlaylistManager::Run()
 {
+    vlc_thread_set_name("vlc-adaptive-playlist");
+
     vlc_mutex_lock(&lock);
     const vlc_tick_t i_min_buffering = bufferingLogic->getMinBuffering(playlist);
     const vlc_tick_t i_extra_buffering = bufferingLogic->getMaxBuffering(playlist) - i_min_buffering;
diff --git a/modules/demux/adaptive/http/Downloader.cpp b/modules/demux/adaptive/http/Downloader.cpp
index 666c86abdbe..97b27d7cd97 100644
--- a/modules/demux/adaptive/http/Downloader.cpp
+++ b/modules/demux/adaptive/http/Downloader.cpp
@@ -92,6 +92,8 @@ void Downloader::DownloadSource(HTTPChunkBufferedSource *source)
 
 void Downloader::Run()
 {
+    vlc_thread_set_name("vlc-adaptive-http");
+
     vlc::threads::mutex_locker locker {lock};
     while(1)
     {
diff --git a/modules/demux/mkv/events.cpp b/modules/demux/mkv/events.cpp
index cd7b57f1e94..20203a45586 100644
--- a/modules/demux/mkv/events.cpp
+++ b/modules/demux/mkv/events.cpp
@@ -125,6 +125,8 @@ int event_thread_t::EventKey( vlc_object_t *p_this, char const *,
 
 void event_thread_t::EventThread()
 {
+    vlc_thread_set_name("vlc-mkv-input-events");
+
     vlc_object_t *vlc = VLC_OBJECT(vlc_object_instance(p_demux));
     int canc = vlc_savecancel ();
 
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 83feac5e131..01f50fc48e9 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1653,6 +1653,8 @@ static void *Run(void *data)
     intf_thread_t *intf = data;
     intf_sys_t *sys = intf->p_sys;
 
+    vlc_thread_set_name("vlc-ncurses");
+
     while (atomic_load_explicit(&sys->alive, memory_order_relaxed)) {
         Redraw(intf);
         HandleKey(intf);
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index d61add4f0e3..06a74caee69 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -569,6 +569,8 @@ static void *Thread( void *obj )
     char *argv[3] = { nullptr };
     int argc = 0;
 
+    vlc_thread_set_name("vlc-qt-main");
+
     auto argvReleaser = vlc::wrap_carray<char*>(argv, [](char* ptr[]) {
         for ( int i = 0; ptr[i] != nullptr; ++i )
             free(ptr[i]);
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index ebb349ddf58..44c3a79c3d8 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -157,6 +157,8 @@ static void Close( vlc_object_t *p_this )
 //---------------------------------------------------------------------------
 static void *Run( void * p_obj )
 {
+    vlc_thread_set_name("vlc-skins2-loop");
+
     int canc = vlc_savecancel();
 
     intf_thread_t *p_intf = (intf_thread_t *)p_obj;
diff --git a/modules/lua/extension_thread.c b/modules/lua/extension_thread.c
index 628d0c8375b..f15ad38bf66 100644
--- a/modules/lua/extension_thread.c
+++ b/modules/lua/extension_thread.c
@@ -263,6 +263,8 @@ int PushCommand__( extension_t *p_ext,  bool b_unique, command_type_e i_command,
 /* Thread loop */
 static void* Run( void *data )
 {
+    vlc_thread_set_name("vlc-lua-extension");
+
     extension_t *p_ext = data;
     extensions_manager_t *p_mgr = p_ext->p_sys->p_mgr;
 
diff --git a/modules/lua/intf.c b/modules/lua/intf.c
index 409432e8ecc..732dfbed219 100644
--- a/modules/lua/intf.c
+++ b/modules/lua/intf.c
@@ -401,6 +401,8 @@ void Close_LuaIntf( vlc_object_t *p_this )
 
 static void *Run( void *data )
 {
+    vlc_thread_set_name("vlc-lua-interface");
+
     intf_thread_t *p_intf = data;
     intf_sys_t *p_sys = p_intf->p_sys;
     lua_State *L = p_sys->L;
diff --git a/modules/lua/services_discovery.c b/modules/lua/services_discovery.c
index 2dc3621c3b1..3646a7a4f5c 100644
--- a/modules/lua/services_discovery.c
+++ b/modules/lua/services_discovery.c
@@ -273,6 +273,8 @@ void Close_LuaSD( vlc_object_t *p_this )
  ****************************************************************************/
 static void* Run( void *data )
 {
+    vlc_thread_set_name("vlc-lua-service-discovery");
+
     services_discovery_t *p_sd = ( services_discovery_t * )data;
     services_discovery_sys_t *p_sys = p_sd->p_sys;
     lua_State *L = p_sys->L;
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index c7da3f27756..569e3bd25e5 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -670,6 +670,8 @@ static void HandleInterval(vlc_tick_t *next, unsigned int *i_interval)
  *****************************************************************************/
 static void *Run(void *data)
 {
+    vlc_thread_set_name("vlc-audioscrobbler-loop");
+
     intf_thread_t          *p_intf = data;
     uint8_t                 p_buffer[1024];
     bool                    b_handshaked = false;
diff --git a/modules/misc/fingerprinter.c b/modules/misc/fingerprinter.c
index 3b51e5b23b2..4675c1a961e 100644
--- a/modules/misc/fingerprinter.c
+++ b/modules/misc/fingerprinter.c
@@ -346,6 +346,8 @@ static void fill_metas_with_results( fingerprint_request_t *p_r, acoustid_finger
  *****************************************************************************/
 static void *Run( void *opaque )
 {
+    vlc_thread_set_name("vlc-fingerprinter");
+
     fingerprinter_thread_t *p_fingerprinter = opaque;
     fingerprinter_sys_t *p_sys = p_fingerprinter->p_sys;
 
diff --git a/modules/services_discovery/microdns.c b/modules/services_discovery/microdns.c
index 16f23d914c3..1a46f35b60f 100644
--- a/modules/services_discovery/microdns.c
+++ b/modules/services_discovery/microdns.c
@@ -462,6 +462,8 @@ stop_sd_cb( void *p_this )
 static void *
 RunSD( void *p_this )
 {
+    vlc_thread_set_name("vlc-discovery-microdns-service");
+
     services_discovery_t *p_sd = ( services_discovery_t* )p_this;
     struct discovery_sys *p_sys = p_sd->p_sys;
 
@@ -562,6 +564,8 @@ stop_rd_cb( void *p_this )
 static void *
 RunRD( void *p_this )
 {
+    vlc_thread_set_name("vlc-discovery-microdns-renderer");
+
     vlc_renderer_discovery_t *p_rd = p_this;
     struct discovery_sys *p_sys = p_rd->p_sys;
 
diff --git a/modules/services_discovery/mtp.c b/modules/services_discovery/mtp.c
index 6692effd298..bdd8ae24b65 100644
--- a/modules/services_discovery/mtp.c
+++ b/modules/services_discovery/mtp.c
@@ -130,6 +130,8 @@ static void *Run( void *data )
     int i_status = 0;
     services_discovery_t *p_sd = data;
 
+    vlc_thread_set_name("vlc-discovery-mtp");
+
     for(;;)
     {
         int canc = vlc_savecancel();
diff --git a/modules/services_discovery/podcast.c b/modules/services_discovery/podcast.c
index 2e54af22b9c..9cbffc0f580 100644
--- a/modules/services_discovery/podcast.c
+++ b/modules/services_discovery/podcast.c
@@ -174,6 +174,8 @@ static void Close( vlc_object_t *p_this )
  *****************************************************************************/
 static void *Run( void *data )
 {
+    vlc_thread_set_name("vlc-discovery-podcast");
+
     services_discovery_t *p_sd = data;
     services_discovery_sys_t *p_sys  = p_sd->p_sys;
 
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 0bc85d85bc8..36cf439b30a 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -413,6 +413,9 @@ static void *Run( void *data )
     services_discovery_sys_t *p_sys = p_sd->p_sys;
     char *psz_addr;
     int timeout = -1;
+
+    vlc_thread_set_name("vlc-discovery-sap");
+
     int canc = vlc_savecancel ();
 
     /* Braindead Winsock DNS resolver will get stuck over 2 seconds per failed
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index cda59f37741..06899e94bf9 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -318,6 +318,8 @@ static void Close (vlc_object_t *obj)
 
 static void *Run (void *data)
 {
+    vlc_thread_set_name("vlc-discovery-udev");
+
     services_discovery_t *sd = data;
     services_discovery_sys_t *p_sys = sd->p_sys;
     struct udev_monitor *mon = p_sys->monitor;
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 054a5d19103..3324267fc86 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -267,6 +267,8 @@ namespace SD
 static void *
 SearchThread( void *p_data )
 {
+    vlc_thread_set_name("vlc-discovery-upnp-service");
+
     services_discovery_t *p_sd = ( services_discovery_t* )p_data;
     services_discovery_sys_t *p_sys = reinterpret_cast<services_discovery_sys_t *>( p_sd->p_sys );
 
@@ -1603,6 +1605,8 @@ int MediaRendererList::onEvent( Upnp_EventType event_type,
 
 void *SearchThread(void *data)
 {
+    vlc_thread_set_name("vlc-discovery-upnp-renderer");
+
     vlc_renderer_discovery_t *p_rd = (vlc_renderer_discovery_t*)data;
     renderer_discovery_sys_t *p_sys = (renderer_discovery_sys_t*)p_rd->p_sys;
     int i_res;
diff --git a/modules/services_discovery/xcb_apps.c b/modules/services_discovery/xcb_apps.c
index d22ea63933b..8b5ea618fc3 100644
--- a/modules/services_discovery/xcb_apps.c
+++ b/modules/services_discovery/xcb_apps.c
@@ -210,6 +210,8 @@ static void Close (vlc_object_t *obj)
 
 static void *Run (void *data)
 {
+    vlc_thread_set_name("vlc-discovery-xcb");
+
     services_discovery_t *sd = data;
     services_discovery_sys_t *p_sys = sd->p_sys;
     xcb_connection_t *conn = p_sys->conn;
@@ -311,7 +313,7 @@ static int cmpapp (const void *a, const void *b)
     if (wa < wb)
         return -1;
     return 0;
-} 
+}
 
 static void UpdateApps (services_discovery_t *sd)
 {
diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c
index ebd39295453..716d3a8b77d 100644
--- a/modules/stream_filter/decomp.c
+++ b/modules/stream_filter/decomp.c
@@ -97,6 +97,8 @@ static void cleanup_mmap (void *addr)
 
 static void *Thread (void *data)
 {
+    vlc_thread_set_name("vlc-decompression");
+
     stream_t *stream = data;
     stream_sys_t *p_sys = stream->p_sys;
 #ifdef HAVE_VMSPLICE
diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index acdc7f9791c..e31d766a593 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -851,6 +851,8 @@ static uint8_t* download_chunk( stream_t *s,
 
 static void* download_thread( void* p )
 {
+    vlc_thread_set_name("vlc-hds-download");
+
     vlc_object_t* p_this = (vlc_object_t*)p;
     stream_t* s = (stream_t*) p_this;
     stream_sys_t* sys = s->p_sys;
@@ -1098,6 +1100,8 @@ static void maintain_live_chunks(
 
 static void* live_thread( void* p )
 {
+    vlc_thread_set_name("vlc-hds-live");
+
     vlc_object_t* p_this = (vlc_object_t*)p;
     stream_t* s = (stream_t*) p_this;
     stream_sys_t* sys = s->p_sys;
diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c
index 1ce217f02a9..787afd3416e 100644
--- a/modules/stream_filter/prefetch.c
+++ b/modules/stream_filter/prefetch.c
@@ -125,6 +125,8 @@ static int ThreadControl(stream_t *stream, int query, ...)
 
 static void *Thread(void *data)
 {
+    vlc_thread_set_name("vlc-prefetch");
+
     stream_t *stream = data;
     stream_sys_t *sys = stream->p_sys;
     bool paused = false;
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 34cdb6ae33c..a113d1742d2 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -616,6 +616,8 @@ void* intf_sys_t::ChromecastThread(void* p_data)
 
 void intf_sys_t::mainLoop()
 {
+    vlc_thread_set_name("vlc-sout-chromecast");
+
     vlc_savecancel();
     vlc_interrupt_set( m_ctl_thread_interrupt );
 
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 68ff34b9535..fd593404163 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1324,6 +1324,8 @@ static int  HttpCallback( httpd_file_sys_t *p_args,
  ****************************************************************************/
 static void* ThreadSend( void *data )
 {
+    vlc_thread_set_name("vlc-sout-rtp");
+
 #ifdef _WIN32
 # define ENOBUFS      WSAENOBUFS
 # define EAGAIN       WSAEWOULDBLOCK
@@ -1400,6 +1402,8 @@ static void* ThreadSend( void *data )
 /* This thread dequeues incoming connections (DCCP streaming) */
 static void *rtp_listen_thread( void *data )
 {
+    vlc_thread_set_name("vlc-sout-rtp-listen");
+
     sout_stream_id_sys_t *id = data;
 
     assert( id->listen.fd != NULL );
diff --git a/modules/stream_out/sdi/DBMSDIOutput.cpp b/modules/stream_out/sdi/DBMSDIOutput.cpp
index abd2559c5cb..dd9396fdf85 100644
--- a/modules/stream_out/sdi/DBMSDIOutput.cpp
+++ b/modules/stream_out/sdi/DBMSDIOutput.cpp
@@ -554,6 +554,8 @@ void * DBMSDIOutput::feederThreadCallback(void *me)
 
 void DBMSDIOutput::feederThread()
 {
+    vlc_thread_set_name("vlc-sout-sdi-dbm");
+
     vlc_tick_t maxdelay = CLOCK_FREQ/60;
     for(;;)
     {
diff --git a/modules/stream_out/sdi/SDIStream.cpp b/modules/stream_out/sdi/SDIStream.cpp
index ce4588d28ce..52fd5117b0d 100644
--- a/modules/stream_out/sdi/SDIStream.cpp
+++ b/modules/stream_out/sdi/SDIStream.cpp
@@ -307,6 +307,8 @@ void * AbstractDecodedStream::decoderThreadCallback(void *me)
 
 void AbstractDecodedStream::decoderThread()
 {
+    vlc_thread_set_name("vlc-sout-sdi-decoder");
+
     struct decoder_owner *p_owner =
             container_of(p_decoder, struct decoder_owner, dec);
 
diff --git a/modules/stream_out/transcode/encoder/video.c b/modules/stream_out/transcode/encoder/video.c
index 4de9f3965a0..6154daf39a3 100644
--- a/modules/stream_out/transcode/encoder/video.c
+++ b/modules/stream_out/transcode/encoder/video.c
@@ -354,6 +354,9 @@ static void* EncoderThread( void *obj )
 {
     transcode_encoder_t *p_enc = obj;
     picture_t *p_pic = NULL;
+
+    vlc_thread_set_name("vlc-sout-transcode-video");
+
     int canc = vlc_savecancel ();
     block_t *p_block = NULL;
 
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index d4a66c5e37e..160a48025dc 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -69,6 +69,8 @@ typedef struct vlc_caca_event {
 
 static void *VoutDisplayEventKeyDispatch(void *data)
 {
+    vlc_thread_set_name("vlc-display-caca");
+
     vout_display_t *vd = data;
     vout_display_sys_t *sys = vd->sys;
     vlc_caca_event_t *event;
diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index 0b0eba0be0d..955b04a4d64 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -120,6 +120,8 @@ static void cleanup_wl_display_read(void *data)
 /** Background thread for Wayland shell events handling */
 static void *Thread(void *data)
 {
+    vlc_thread_set_name("vlc-window-xdg-shell");
+
     vout_window_t *wnd = data;
     vout_window_sys_t *sys = wnd->sys;
     struct wl_display *display = wnd->display.wl;
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index ad6effbcf3c..97da33929a1 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -91,6 +91,9 @@ static void *EventThread( void *p_this )
 {
     event_thread_t *p_event = (event_thread_t *)p_this;
     MSG msg;
+
+    vlc_thread_set_name("vlc-hwnd-display-loop");
+
     int canc = vlc_savecancel ();
 
 
diff --git a/modules/video_output/win32/inhibit.c b/modules/video_output/win32/inhibit.c
index 3dac8113dd1..cb6233d4664 100644
--- a/modules/video_output/win32/inhibit.c
+++ b/modules/video_output/win32/inhibit.c
@@ -52,6 +52,8 @@ static void* Run(void* obj)
     vlc_inhibit_t *ih = (vlc_inhibit_t*)obj;
     vlc_inhibit_sys_t *sys = ih->p_sys;
 
+    vlc_thread_set_name("vlc-window-inhibit");
+
     vlc_mutex_lock(&sys->mutex);
     while (!sys->exit)
     {
diff --git a/modules/video_output/win32/window.c b/modules/video_output/win32/window.c
index 51ec5ff11af..aaab4c927c2 100644
--- a/modules/video_output/win32/window.c
+++ b/modules/video_output/win32/window.c
@@ -579,6 +579,8 @@ static void *EventThread( void *p_this )
     vout_window_t *wnd = (vout_window_t *)p_this;
     vout_window_sys_t *sys = wnd->sys;
 
+    vlc_thread_set_name("vlc-hwnd-window-loop");
+
     int canc = vlc_savecancel ();
 
     HINSTANCE hInstance = GetModuleHandle(NULL);
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 5e58d10ebfd..949c845c96b 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -312,6 +312,8 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
 /** Background thread for X11 events handling */
 static void *Thread (void *data)
 {
+    vlc_thread_set_name("vlc-window-xcb");
+
     vout_window_t *wnd = data;
     vout_window_sys_t *p_sys = wnd->sys;
     xcb_connection_t *conn = p_sys->conn;
diff --git a/modules/visualization/glspectrum.c b/modules/visualization/glspectrum.c
index f97c711a264..c87f83a02d8 100644
--- a/modules/visualization/glspectrum.c
+++ b/modules/visualization/glspectrum.c
@@ -343,6 +343,8 @@ static void drawBars(float heights[])
  */
 static void *Thread( void *p_data )
 {
+    vlc_thread_set_name("vlc-visualization-glspectrum");
+
     filter_t  *p_filter = (filter_t*)p_data;
     filter_sys_t *p_sys = p_filter->p_sys;
     vlc_gl_t *gl = p_sys->gl;
diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c
index 69450e73f7f..5a2cb8442cd 100644
--- a/modules/visualization/goom.c
+++ b/modules/visualization/goom.c
@@ -280,6 +280,8 @@ static int FillBuffer( int16_t *p_data, int *pi_data,
  *****************************************************************************/
 static void *Thread( void *p_thread_data )
 {
+    vlc_thread_set_name("vlc-visualization-goom");
+
     goom_thread_t *p_thread = (goom_thread_t*)p_thread_data;
     date_t i_pts;
     int16_t p_data[2][512];
diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index a12ac328b8e..706652e3d24 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -279,6 +279,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
  */
 static void *Thread( void *p_data )
 {
+    vlc_thread_set_name("vlc-visualization-projectm");
+
     filter_t  *p_filter = (filter_t*)p_data;
     filter_sys_t *p_sys = reinterpret_cast<filter_sys_t *>( p_filter->p_sys );
     vlc_gl_t *gl = p_sys->gl;
diff --git a/modules/visualization/visual/visual.c b/modules/visualization/visual/visual.c
index c3591944ad7..0d896aac648 100644
--- a/modules/visualization/visual/visual.c
+++ b/modules/visualization/visual/visual.c
@@ -377,6 +377,8 @@ static block_t *DoRealWork( filter_t *p_filter, block_t *p_in_buf )
 
 static void *Thread( void *data )
 {
+    vlc_thread_set_name("vlc-visualization-visu");
+
     filter_t *p_filter = data;
     filter_sys_t *sys = p_filter->p_sys;
     block_t *block;
diff --git a/modules/visualization/vsxu.cpp b/modules/visualization/vsxu.cpp
index 42a09552df0..e292293376f 100644
--- a/modules/visualization/vsxu.cpp
+++ b/modules/visualization/vsxu.cpp
@@ -237,6 +237,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
  */
 static void *Thread( void *p_data )
 {
+    vlc_thread_set_name("vlc-visualization-vsxu");
+
     filter_t  *p_filter = (filter_t*)p_data;
     filter_sys_t *p_sys = p_filter->p_sys;
     vlc_gl_t *gl = p_sys->gl;
-- 
2.26.2





More information about the vlc-devel mailing list