Commit Graph

31 Commits

Author SHA1 Message Date
Mike Blumenkrantz aa9cc3a068 evas: remove ecore init/shutdown calls from everywhere besides evas_main
Summary:
these separate inits and shutdowns make it impossible to effectively control
ecore's lifetime which makes evas_shutdown unreliable as objects may be
destroyed at any point

ref T7052
Depends on D6475

Reviewers: ManMower, devilhorns

Reviewed By: ManMower, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7052

Differential Revision: https://phab.enlightenment.org/D6476
2018-06-28 15:03:15 -05:00
Mike Blumenkrantz bea602f258 evas/thread_render: improve thread safety
this resolves some invalid read/write operations between threads without locking
and also attempts to improve thread-related behavior after fork() calls

ref T7027

Differential Revision: https://phab.enlightenment.org/D6370
2018-06-25 15:17:14 -04:00
Cedric BAIL fa3e1dc784 evas: rely on ecore to reset evas rendering thread on fork. 2017-11-07 16:08:39 -08:00
Jean-Philippe Andre 3d2551175d evas: Fix shutdown of async cmd cache
The incomplete reset (array to NULL but max not reset) triggers errors
in evas_thread_queue_append() where eina_inarray_grow() returns NULL.

This shows up in:
   CK_FORK=no elm_suite

@fix
2017-09-26 17:58:07 +09:00
Marcel Hollerbach e1738c4f1e Revert "evas_thread: only join the thread if the thread is still alive"
This reverts commit e41d46c635.

This seems to be wrong
2017-09-05 14:36:17 +02:00
Marcel Hollerbach e41d46c635 evas_thread: only join the thread if the thread is still alive
otherwise we might join a invalid thread id, that could lead to a
deadlock. Lets not do that.

ref T5245

@fix
2017-09-05 14:15:40 +02:00
Stefan Schmidt dbf7057bca Revert "efl: terrible kludge so avoid termination crash on osx"
This reverts commit 9368eedd35.

The release is out so we can revert this bandaid again. In the hope to
find the real culprit and solution before the next release.
2017-08-07 11:53:00 +02:00
Jean Guyomarc'h 9368eedd35 efl: terrible kludge so avoid termination crash on osx
Currently, elementary programs crash on termination on macOS (seems
Sierra-specific). This is very nasty, looks like deep memory corruption...
Without valgrind (or like) support on Sierra, it is difficult to
pinpoint the origin of the problem.

Due to the imminient release, and after discussion with @stefan, this
kludge will allow the release to happen.

This commit MUST be reverted just after the release, so we don't
blindfold ourselves!

Ref T5245
2017-08-03 10:31:26 +02:00
Carsten Haitzler b2ca7a96dc thread fence code - move elsewhere in file to avoid conflicts 2017-04-28 18:41:39 +09:00
Derek Foreman 83adbadc89 evas: Add a function to block for render thread completion
This is needed by dmabuf engine fallback when it realizes it locally
allocated a buffer, has been rendering to it, but the compositor can't use
it.

So the engine copies its buffer contents into a new wl_shm buffer and
continues from there - however we need to make sure the async renderer
has finished first, so we don't copy a partial buffer.

This allows us to block for all previously submit actions in the render
queue to complete.
2017-04-26 13:47:46 -05:00
Stefan Schmidt 9a15eeaced Revert "efl: terrible kludge so avoid termination crash on osx"
The only purpose of this commit was to allow efl 1.19 to be
released on macOS wothout crashing on termination. Time to revert
it and see that we can find a real fix for the next release.

This reverts commit cd5e755951.

ref T5245
2017-04-13 16:11:39 +02:00
Jean Guyomarc'h cd5e755951 efl: terrible kludge so avoid termination crash on osx
Currently, elementary programs crash on termination on macOS (seems
Sierra-specific). This is very nasty, looks like deep memory corruption...
Without valgrind (or like) support on Sierra, it is difficult to
pinpoint the origin of the problem.

Due to the imminient release, and after discussion with @stefan, this
kludge will allow the release to happen.

This commit MUST be reverted just after the release, so we don't
blindfold ourselves!

Ref T5245
2017-03-31 14:11:01 +02:00
Haegeun Park 0ac95c40bc [Evas GL Thread 1] evas: Fixed indentation of evas_thread_render.c
Summary:
@fix

Change-Id: I411fe6d75dc7b15c0d7f19f165ea4b0cc3b28c12

Reviewers: sung, jpeg, cedric, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4525
2017-01-04 15:30:21 +09:00
Jean-Philippe Andre 69a684cf04 evas: Fix a few issues after init/shutdown/init
elm_suite would crash when CK_FORK=no is set, because evas was
badly initializing or shutting down. Note that elm_suite still
crashes with CK_FORK=no but valgrind doesn't complain.
2016-11-23 23:48:53 +09:00
Wonki Kim 88e1fc9613 evas: Add shutdown logic on thread creation failure
Summary:
In case of thread creation failure, shutdown logic will be stuck.
To prevent stuck, set exit variables to make thread_shutdown working
even if init fails.

Also modify init logics to return init result to a caller.

Reviewers: jypark, woohyun, cedric, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4411

Note (@jpeg):
I have modified the patch just a little bit.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2016-11-22 14:50:38 +09:00
Derek Foreman e2875cefc4 eina_cpu, evas: Remove _eina_cpu_fast_core_get, don't set render thread affinity
We've decided it would be best to just let the scheduler do its job.
2016-09-20 11:38:57 -05:00
Derek Foreman 541b72dcb2 render_thread: Attempt to set affinity to a random fast core
We've been pinning the render thread for every EFL process to core 0.
This is a bit silly in the first place, but some big.LITTLE arm systems,
such as exynos 5422, have the LITTLE cores first.

On those systems we put all the render threads on a slow core.

This attempts to fix that by using a random core from the pool of fast
cores.

If we can't determine which cores are fast (ie: we're not on a
linux kernel with cpufreq enabled) then we'll continue doing what we've
always done - pin to core 0.
2016-09-19 09:40:43 -05:00
Stefan Schmidt 6bf537d43d Revert "render_thread: Attempt to set affinity to a random fast core"
This reverts commit a17ac66f0a.

This change broke every efl build locally, as well as on Jenkins, for me.

CLD     lib/ethumb_client/libethumb_client.la
/bin/sh: line 2: 10047 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1
../src/bin/edje/edje_cc -id . -fd . -id ./tests/emotion/data tests/emotion/data/theme.edc
tests/emotion/data/theme.edj
Makefile:52584: recipe for target 'tests/emotion/data/theme.edj' failed
make[4]: *** [tests/emotion/data/theme.edj] Error 139
make[4]: *** Waiting for unfinished jobs....
/bin/sh: line 2: 10088 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1
../src/bin/edje/edje_cc -id . -fd . -id ./modules/ethumb/emotion modules/ethumb/emotion/template.edc
modules/ethumb/emotion/template.edj
Makefile:52590: recipe for target 'modules/ethumb/emotion/template.edj' failed
make[4]: *** [modules/ethumb/emotion/template.edj] Error 139
/bin/sh: line 2: 10119 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1
../src/bin/edje/edje_cc -id . -fd . -id ../src/modules/elementary/prefs/
modules/elementary/prefs/elm_prefs_swallow.edc modules/elementary/prefs/elm_prefs_swallow.edj
Makefile:52614: recipe for target 'modules/elementary/prefs/elm_prefs_swallow.edj' failed
make[4]: *** [modules/elementary/prefs/elm_prefs_swallow.edj] Error 139
2016-09-19 10:45:56 +02:00
Derek Foreman a17ac66f0a render_thread: Attempt to set affinity to a random fast core
We've been pinning the render thread for every EFL process to core 0.
This is a bit silly in the first place, but some big.LITTLE arm systems,
such as exynos 5422, have the LITTLE cores first.

On those systems we put all the render threads on a slow core.

This attempts to fix that by using a random core from the pool of fast
cores.

If we can't determine which cores are fast (ie: we're not on a
linux kernel with cpufreq enabled) then we'll continue doing what we've
always done.
2016-09-16 14:10:49 -05:00
Derek Foreman e0c1f4a2a7 evas: Try harder to create the render thread
It's entirely possible that a system doesn't have a cpu 0, so
when we try to pin all our render threads onto processor 0 we
may fail.

This results in some very connfusing build breakage when
edje_cc hangs up because its render thread didn't start.

So, if starting the thread with affinity fails, let's try without
affinity.

(This is trivial to reproduce - just use sysfs to turn off cpu0
after boot.)

@fix
2016-08-24 14:34:36 -05:00
Carsten Haitzler 0bca7af2e8 evas - was missing evlogs for the threaded rendering handling - fix 2015-10-15 19:29:40 +09:00
Carsten Haitzler 5b2baf173e efl - set thread names for internally created threads for debugging
@feature
2015-09-10 15:17:08 +09:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Ulisses Furquim 063f076aed evas/async_render: remove block/unblock of render thread.
This reverts commit 42a46214c4.
2013-09-02 20:01:37 -03:00
Carsten Haitzler 42a46214c4 other async render issue - sync ALL rendering canvases, not just one 2013-08-29 21:18:04 +09:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Ulisses Furquim d53f43abaf evas/common/thread_render: fix queue cache handling
Fixed queue cache handling to let enqueue and process happen at the same
time, even though this is not our use case yet. This also solves a race
with the assignment of cache variables outside the queue lock and
remembers to free the cache when shutting down.



SVN revision: 82296
2013-01-06 02:01:53 +00:00
Cedric BAIL 209347f148 efl: rename eina_inarray_add to eina_inarray_grow.
SVN revision: 81918
2012-12-31 01:27:58 +00:00
Cedric BAIL f8ea554926 efl: limit regression with async rendering.
NOTE: There is still an issue with text rendering, that
is still 4 times slower and impact all text object (text,
textblock and textgrid).


SVN revision: 81912
2012-12-30 23:39:11 +00:00
Leandro Pereira 9b2b121e6f evas: Add thread threaded render queue
SVN revision: 81280
2012-12-18 16:21:03 +00:00