raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5b2baf173e7adf0ca4e68c6c168cecf9b9e9030f
commit 5b2baf173e7adf0ca4e68c6c168cecf9b9e9030f Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Thu Sep 10 15:17:08 2015 +0900 efl - set thread names for internally created threads for debugging @feature --- src/lib/ecore/ecore_anim.c | 1 + src/lib/ecore/ecore_thread.c | 2 ++ src/lib/ecore_x/xlib/ecore_x_vsync.c | 1 + src/lib/evas/cache/evas_preload.c | 1 + src/lib/evas/canvas/render2/evas_render2_th_main.c | 1 + src/lib/evas/common/evas_pipe.c | 3 ++- src/lib/evas/common/evas_scale_sample.c | 1 + src/lib/evas/common/evas_thread_render.c | 3 ++- 8 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index 908da64..2330090 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c @@ -115,6 +115,7 @@ _timer_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread) double t0, d; int ret; + eina_thread_name_set(eina_thread_self(), "Eanimator-timer"); while (!ecore_thread_check(thread)) { DBG("------- timer_event_is_busy=%i", timer_event_is_busy); diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index 7266c09..f1aa613 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -417,6 +417,7 @@ _ecore_feedback_job(PH(thread)) static void * _ecore_direct_worker(Ecore_Pthread_Worker *work) { + eina_thread_name_set(eina_thread_self(), "Ethread-feedback"); work->self = PHS(); if (work->message_run) work->u.message_run.func_main((void *) work->data, (Ecore_Thread *) work); @@ -439,6 +440,7 @@ restart: _ecore_feedback_job(PHS()); /* FIXME: Check if there is feedback running task todo, and switch to feedback run handler. */ + eina_thread_name_set(eina_thread_self(), "Ethread-worker"); SLKL(_ecore_pending_job_threads_mutex); if (_ecore_pending_job_threads || _ecore_pending_job_threads_feedback) diff --git a/src/lib/ecore_x/xlib/ecore_x_vsync.c b/src/lib/ecore_x/xlib/ecore_x_vsync.c index 1cc807b..ea51bf5 100644 --- a/src/lib/ecore_x/xlib/ecore_x_vsync.c +++ b/src/lib/ecore_x/xlib/ecore_x_vsync.c @@ -244,6 +244,7 @@ _drm_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread) void *ref; int tick = 0; + eina_thread_name_set(eina_thread_self(), "Eanimator-vsync"); while (!ecore_thread_check(thread)) { DBG("------- drm_event_is_busy=%i", drm_event_is_busy); diff --git a/src/lib/evas/cache/evas_preload.c b/src/lib/evas/cache/evas_preload.c index 775871e..ecd3464 100644 --- a/src/lib/evas/cache/evas_preload.c +++ b/src/lib/evas/cache/evas_preload.c @@ -70,6 +70,7 @@ _evas_preload_thread_worker(void *data, Eina_Thread thread EINA_UNUSED) Evas_Preload_Pthread_Data *pth = data; Evas_Preload_Pthread_Worker *work; + eina_thread_name_set(eina_thread_self(), "Eevas-preload"); on_error: for (;;) { diff --git a/src/lib/evas/canvas/render2/evas_render2_th_main.c b/src/lib/evas/canvas/render2/evas_render2_th_main.c index 1379b88..e0bcc02 100644 --- a/src/lib/evas/canvas/render2/evas_render2_th_main.c +++ b/src/lib/evas/canvas/render2/evas_render2_th_main.c @@ -287,6 +287,7 @@ _evas_render2_th_main(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED) void *ref = NULL; Msg_Main_Render *msg; + eina_thread_name_set(eina_thread_self(), "Eevas-render2"); for (;;) { msg = eina_thread_queue_wait(_th_main_queue, &ref); diff --git a/src/lib/evas/common/evas_pipe.c b/src/lib/evas/common/evas_pipe.c index 92d5bed..d04910d 100644 --- a/src/lib/evas/common/evas_pipe.c +++ b/src/lib/evas/common/evas_pipe.c @@ -75,7 +75,8 @@ evas_common_pipe_thread(void *data, Eina_Thread t EINA_UNUSED) { Thinfo *thinfo; -// INF("TH [..........."); + eina_thread_name_set(eina_thread_self(), "Eecore-pipe"); + // INF("TH [..........."); thinfo = data; for (;;) { diff --git a/src/lib/evas/common/evas_scale_sample.c b/src/lib/evas/common/evas_scale_sample.c index 0933e7f..61f071f 100644 --- a/src/lib/evas/common/evas_scale_sample.c +++ b/src/lib/evas/common/evas_scale_sample.c @@ -819,6 +819,7 @@ _evas_common_scale_sample_thread(void *data EINA_UNUSED, Evas_Scale_Msg *msg; Evas_Scale_Thread *todo = NULL; + eina_thread_name_set(eina_thread_self(), "Eevas-scale-sam"); do { void *ref; diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c index b9cf91a..420423a 100644 --- a/src/lib/evas/common/evas_thread_render.c +++ b/src/lib/evas/common/evas_thread_render.c @@ -58,7 +58,8 @@ evas_thread_queue_flush(Evas_Thread_Command_Cb cb, void *data) static void* evas_thread_worker_func(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED) { - while (1) + eina_thread_name_set(eina_thread_self(), "Eevas-thread-wk"); + while (1) { Evas_Thread_Command *cmd; unsigned int len, max; --
