summaryrefslogtreecommitdiff
path: root/src/lib/eina (follow)
AgeCommit message (Collapse)Author
3 daysEina_Matrix : Use math header for cosf and sinf of rotate function.JunsuChoi
The local cos and sin functions differ from the math header cos and sin functions by result values The 4th decimal place is different. Computing large numbers can cause errors. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10467
2019-11-04efl_canvas_animation_rotate: adjust APIMarcel Hollerbach
Summary: in task T8288 we concluded that a few APIs need to be adjusted in order to stabelize animation classes at some point. This also adds a new macro to eina in order to create EINA_VECTOR2 values more easily. ref T8288 Reviewers: Jaehyun_Cho, segfaultxavi, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10350
2019-10-31eina: only the type need to be NULL to assume EINA_VALUE_EMPTY.Cedric Bail
This avoid comparison with potentially uninitialized byte. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10479
2019-10-30eina: make use of the new near allocation policy for Eina_List.Cedric BAIL
The idea is to improve memory locality and hopefully get better cache hit in general. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10536
2019-10-30eina: introduce an API for requesting memory near already allocated memory ↵Cedric BAIL
from an Eina_Mempool. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10535
2019-10-29eina: add comparison macros for Eina_Size2D and Eina_Position2DMike Blumenkrantz
Summary: I'm tired of typing all this out. it's exhausting. also add a couple usages internally to verify that this works as expected @feature Reviewers: cedric, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: devilhorns, bu5hm4n, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10557
2019-10-23eina: remove eina_config.h.inDaniel Kolesa
This is never actually used since meson generates eina_config.h from scratch. Apart from the byteswap checks done in the previous commit, all of the other things already seem to be done by meson, so just remove it.
2019-10-23eina: unbreak byteswap checksDaniel Kolesa
For one, eina_config.h.in is never used by anything since meson, so doing any checks in it and expecting them to work is wrong. Byteswaps are one place where this is the case, so move the checks back in their appropriate place.
2019-10-22eina: fix network byte order swap funcs on big endianDaniel Kolesa
2019-10-18eina/convert: init endptr in failure case of eina_convert_strtod_cMike Blumenkrantz
Summary: there is not any way to determine that this function has failed other than to check this pointer, so ensure that it always has a value which is meaningful in failure cases Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10445
2019-09-26eina/list: move dead code inside corresponding #ifdefMike Blumenkrantz
Summary: this is debug code CID 1404753, 1404745 Depends on D10204 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10205
2019-09-23eina_array: do not mix declaration and definitionVincent Torri
fix warning when used in C90 code. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D10077
2019-09-23eina_log: ensure that we do not spam journald with our intree binariesMarcel Hollerbach
EFL_RUN_IN_TREE is set for all binaries that are executed during build time, and test suites. With this commit we are ensuring that we are not sending messages during that time to journald, otherwise we would waste a lot of time + we would create a lot of unneccessary log messages. (eina test suite runtime with journald hook: 11.21s without journald hook: 0.57s) Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10076
2019-09-23eina_log: do not fallback to INFO when we run with systemd supportMarcel Hollerbach
INFO is a way too verbose log domain, this lead to the fact that we spammed journald before the first frame with ~200-300 messages (depending on the setup) which is quite a lot. Additionally, this also lead to the fact that we often TIMEOUT our own tests. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D10075
2019-09-19eina: add code to help debug leaking Eina_Value.Cedric Bail
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9942
2019-09-19eina: add eina_mempool_iterator_new to slowly iterate every allocated ↵Cedric Bail
pointer in a mempool. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9941
2019-09-17eina: prevent leak of Eina_Value internal allocation.Cedric Bail
eina_value_copy assume the given Eina_Value as target is not initialized when it copy the source in it. In eina_value_reference_copy we were initialising before calling eina_value_copy which would then override and leak the internal pointer no fault of the users. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9943
2019-09-16eina: fix spelling in new eina_file_statgen APIStefan Schmidt
Introduced in 9b294d6284f the new eina_file_statgen_* API has a typo in its disable function. Fixing this before it gets out into a release. Thanks goes to the https://abi-laboratory.pro service for offering their great API/ABI reports to the open source communities to help finding such things! Differential Revision: https://phab.enlightenment.org/D9962
2019-08-27eina_vpath: add null checking logic on vpath_resolve apiWonki Kim
Summary: there is a patch that add vpath_resolve() call before eina_file_open() because `path` arg could be NULL, the patch kills some applications. this patch add null checking logic on vpath_resolve api Reviewers: bu5hm4n, cedric, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9748
2019-08-27eina_list: fix to check a null argumentWonki Kim
Summary: data should be checked regardless of EINA_MAGIC define, because it is dereferenced in the following logic. Reviewers: cedric, bu5hm4n, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9750
2019-08-26eina/array: added eina_array_find() api to eina_array.sub.mohanty@samsung.com
Summary: updated test suite for testing the api. Reviewers: zmike, Hermet, cedric, segfaultxavi Reviewed By: zmike, segfaultxavi Subscribers: segfaultxavi, ProhtMeyhet, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9734
2019-08-21eina list - make eina list magic optional and for now turn it offCarsten Haitzler (Rasterman)
this should bring our list nodes back to 32bytes (or 16 on 32bit) which is the rounded up libc allocation size anyway expected. less mem usage but less safety. i haven't seen any magic complainets to do with eina list for a while now... so let's see.
2019-08-19make mman.h privateVincent Torri
Summary: integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform. One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap() Test Plan: compilation on Windows Reviewers: cedric, raster, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9542
2019-08-11eina file - don't double unlock a lockCarsten Haitzler (Rasterman)
thanks to coverity - found this double unlock path in case of error. fix CID 1403899
2019-08-11eina file - make coverity happy and lock+unlock on initCarsten Haitzler (Rasterman)
coverity doesnt like inconsistent behavior of code, so make it consistent even if pointless as this is during init when we wont have threads .... yet. CID 1403903
2019-08-09eina/hash: optimize eina_hash_find() when hash is empty.subhransu mohanty
Summary: Check if hash is empty before computing the hash key and look inside the hash to find data. Note: could have called the eina_hash_population() api but didn't because of extra function call. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9531
2019-08-08getenv - reduce continually calling getenv for the same vars do onceCarsten Haitzler (Rasterman)
do it once and remember the result from the first one. drops overhead for sure by a chunk i actually could see in perf reports like about 1-2% of cpu...
2019-08-07eina log - we exceet 24 domains alrready out of the box, so increaseCarsten Haitzler (Rasterman)
this avoids more reallocs since we already use more than 24 domains... go up to 64.
2019-07-28eina file - stat generation inexactness supportCarsten Haitzler (Rasterman)
this is a performance optimization. it brings in a "stat generation". for now it's disabled by default so we retain previous behavior. this stops eina file from opening and stating a file every time you open ... it only does it if stat generation is off, or, if the generation changed since the last time it opened that file. this makes cache hits not have a 3 syscall cost (open+fstat+close). this optimizes that lower end of things path. but .. it comes at a cost. if the file changes before generation ticks over (which this forces to tick over every time the loop exits idle by default). now here is something to ask. 1. should we have this on by default and accept the "inexactness" since you can eina_file_statgen_next() before any call that would do i/o to force it to look at the real file stat info... 2. should we tick over every idle enter OR every N idle enters or every frame we render instead? ... i want to avoid getting a timestamp or having a timer interrupt often... so what should we do? at least this introduces the idea, some api's and an env var to turn this on. it definitely cuts down syscalls during things like creation of widdgets or objects in large batches etc.
2019-07-28Evil: remove pwd code in Evil and fix compilation failures after the removalVincent Torri
Summary: remove pwd code in Evil Test Plan: compilation Reviewers: zmike, cedric, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28Eina: define EINA_HAVE_DEBUG_THREADS only if backtrace() in execinfo.h is ↵Vincent Torri
available Summary: fix compilation on systems where backtrace() in execinfo.h is not available Test Plan: compilation on Windows Reviewers: zmike, cedric, raster Reviewed By: cedric, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9392
2019-07-26reduce syscalls on opening files - roll CLOEXEC into openCarsten Haitzler (Rasterman)
on linux open supports() O_CLOEXEC. add test case for this in meson build and ifdef. this rolls 3 syscalls into 1 as we were doing open, then fnctl to get and fcntl to set flags. less syscalls is a good thing as syscalls are not cheap on some architectures or systems. I've seen a syscall on 1 system take 2-3x as long as another and another syscall in the same 2 system comparison take 10x as long. depending on the syscall you may only have a budget of something like 5000 syscalls "per frame" (60fps) before you spend all of your frame time just in syscalls not doing any processing, so we should keep these down if possible and that is what this does.
2019-07-24build - cmake files - remove old seemingly unused cmake filesCarsten Haitzler (Rasterman)
2019-07-19meson: fix debug-threads optionMike Blumenkrantz
it doesn't matter if this doesn't work with eina_debug since this isn't meant to be used for that kind of debugging Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9359
2019-07-18Eina vpath: remove support of ~username vpath on WindowsVincent Torri
On Windows, one must be in kernel mode to obtain informations of other users Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9339
2019-07-17eina: set EINA_VALUE_EMPTY during library init.Cedric BAIL
This is a work around compiler/linker limit on some system as reported by Romain Naour. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9348
2019-07-10eina/hash: add direct variants of list append/prepend functionsMike Blumenkrantz
Summary: this simplifies the process of manipulating lists inside hashes with a non-copied key @feature Depends on D9205 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9206
2019-07-03eina: add accessors for c arraysMarcel Hollerbach
This adds a new API which can be used to get access to a carray via the eina_accessor API.
2019-06-03meson: remove unneeded install: flagsMarcel Hollerbach
Summary: when install is not set, meson take the value of install_dir. So when this is removed, things will continue working correctly. Reviewers: zmike, stefan_schmidt, cedric, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9065
2019-05-29eina: add eina_slstr_copy_new_length.Cedric BAIL
Reviewers: SanghyeonLee, bu5hm4n, zmike, segfaultxavi, lauromoura, felipealmeida, raster Reviewed By: bu5hm4n, zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7832 Differential Revision: https://phab.enlightenment.org/D8800
2019-05-29eina/prefix: ignore magic files when running in treeMike Blumenkrantz
Summary: this just can't work. @fix Depends on D8951 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8952
2019-05-29eina/file: use INFO log level when eina_file_open failsMike Blumenkrantz
Summary: this function is commonly used to detect the existence of files using its return value. for this purpose, printing warnings any time the file cannot be opened is spammy and not very helpful in the context of detecting actual errors. Depends on D8950 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8951
2019-05-21eina: move builtin detection to eina_config.hMarcel Hollerbach
Summary: this means we don't need to handle this in the buildtool at all. Reviewers: vtorri, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8553
2019-05-16Eina: replace Evil.h with evil_private.h and remove Evil.h when not necessaryVincent Torri
Test Plan: compilation Reviewers: raster, zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8903
2019-05-12eina vpath: fix warning on Windows, as well as the public pathVincent Torri
Differential Revision: https://phab.enlightenment.org/D8866
2019-05-11eina: update vpath to also support a more classic syntax for variable.Cedric BAIL
This enable vpath to recognize also ${} as a variable. It does mimic what Efl.ViewModel provide with Efl.ViewModel.PropertyText and various other language. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8883
2019-05-11eina: refactor and simplify vpath.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8882
2019-05-09eina: always initialize all the field of Eina_Value used by Eina_Promise.Cedric BAIL
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8794
2019-05-08Evil: remove wrapper around getcwd()Vincent Torri
Summary: getcwd() is declared in direct.h Test Plan: compilation Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8858
2019-05-07eina_file: speed up listing of directories on WindowsVincent Torri
Summary: forbid the creation of short name (legacy of DOS) Without optimisation 1. using only Win32 API, just iterating over directories (in micro seconds) : 10 files : 47 1000 files : 270 100000 files : 73227 2. using eina_file_dir_list() with a callback which does nothing : 10 files : 53 1000 files : 265 100000 files : 69624 usually there is a small overhead for eina API, which is normal With optimisation 1. using only Win32 API, just iterating over directories (in micro seconds) : 10 files : 51 1000 files : 256 100000 files : 33345 2. using eina_file_dir_list() with a callback which does nothing : 10 files : 53 1000 files : 251 100000 files : 33832 speed up with 1000 files and more. Twice faster with 100000 files Test Plan: benchmark program Reviewers: raster, cedric, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8842