Commit Graph

119 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 3523f106b8 benchmark: Remove unnecessary import and export macros from benchmark executables
Summary:
Benchmark executables do not need to export and import symbols because
they are not loaded by other executables. Removing is important because
EAPI will be removed in some later commit and would break benchmark
executables.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Reviewers: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12200
2020-12-06 12:25:19 -03:00
Carsten Haitzler 42c123d1d7 singularize srand in eina_init - only once in one place
simplify down to having a single srand() in eina_init and use urandom
if it works and is there - if not, time(NULL) will do. it's the best
we can...
2020-10-03 20:46:50 +01:00
Carsten Haitzler 568dd7e45b eina bench - have default values inside benc dtoa
addess CID 1400856
2020-09-20 00:20:42 +01:00
Marcel Hollerbach 9673ed6269 benchmarks: specify this outside extern "C"
uint128 is defined as a c++ specific type.
2020-09-01 14:12:31 +02:00
Stefan Schmidt cac95313c7 benchmark: eina: remove outdated ecore_hash
Ecore_hash is an ancestor of eina_hash and not used anywhere anymore.
We simply forgot to remove it from our benchmark utility.

Together with ecore_hash we are removing ecore_strings, which uses it,
and the corresponding benchmark files.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12042
2020-07-06 17:14:36 +02:00
Stefan Schmidt 9c773ed5cf benchmarks: eina: make sure we do not divide by zero
Make sure we do not divide by i if it is zero here.

CID: 1400768

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11956
2020-06-17 14:06:17 +02:00
Stefan Schmidt 59127058af benchmarks: use EFL_BUILD=1 in c_args
Original patch by Vincent Torri.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11853
2020-05-26 10:15:17 +02:00
Stefan Schmidt 4b5abd151c benchmark: fix ident in meson.build file
Use two spaces indent as in other files.

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

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
2020-05-25 16:02:08 +02:00
Carsten Haitzler 63b5d81983 Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"
This reverts commit 3ade45cbc8.
2020-05-18 11:13:59 +01:00
Vincent Torri 3ade45cbc8 Fix EAPI definition by defining EFL_BUILD for each built DLL
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported

Test Plan: compilation

Reviewers: zmike, raster, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11834
2020-05-18 09:51:48 +01:00
Vincent Torri d135957ffa Use __func__ C99 identifier instead of __FUNCTION__ compiler extension
Summary: see http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf section 6.4.2.2 page 52

Test Plan: compilation

Reviewers: raster, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11785
2020-05-07 09:27:07 -04:00
Tom Callaway c245b576aa Fix build with gcc 10 (which has -fno-common enabled by default).
EFL failed to build from source in Fedora Rawhide as a result of the update to GCC 10. GCC 10 enables -fno-common by default, and this found three issues in EFL:

  # The eina benchmark code defined int key_size in a header that was included in multiple places.
  # The elementary test code defines the "dt1", "dt2", "dt3" vars in two code files which are compiled together (but these variables do not appear to be used globally)
  # The eio test code defines the "ee" var in two code files which are compiled together (but this variable does not appear to be used globally)

I've fixed these issues and confirmed locally that the code builds again in Fedora.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11259
2020-01-31 14:31:57 +01:00
Stefan Schmidt 2bd801f859 benchmarks: increase timeout value for running elementary benchmarks
Default is 30s and I run into timeouts all the time. Increasing it to
60s for the elementary benchmarks. On my local machine its around 45s
for the slower one.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10847
2019-12-18 09:15:51 +01:00
Mike Blumenkrantz d417868c90 benchmarks/eina: fix possible div by zero in ecore_hash
Summary: CID 1400768

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10397
2019-10-18 13:29:07 -04:00
Mike Blumenkrantz 525790b6b3 benchmark/collection: add Elementary.h
this uses legacy api

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10234
2019-09-30 10:33:33 +02:00
Marcel Hollerbach 594fc08442 efl_ui_win: default the window type to basic
normally when you create a window, you just want to have it beeing a
basic window. If not you still can set the window type.

ref T8229

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10049
2019-09-24 16:00:44 +02:00
Boris Faure 511faf3cbf meson.build: allow to disable tiff evas loader
Summary:
@fix

eina benchmarks: ssize_t is defined in <sys/types.h>

Reviewers: #reviewers, bu5hm4n, zmike, stefan_schmidt

Reviewed By: zmike

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9927
2019-09-13 11:26:19 -04:00
Shinwoo Kim 1d96fc9202 eina benchmarks: remove dereference of null
Summary:
A static analysis tool detects return value of malloc could be NULL and its
following lines could have derefernece of NULL case.

Reviewers: bu5hm4n, zmike, Hermet

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9812
2019-09-03 12:21:27 -04:00
Hermet Park 53854e1f2d elementary: remove an unused variable. 2019-08-22 13:21:40 +09:00
Marcel Hollerbach 8520c648b3 replace item_container benchmark
the new one has the correct name, can test grid and list, has a
changable amount of items. Additionally, it prints the pid on startup, which is usefull for perf related debugging.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9609
2019-08-21 07:50:54 +02:00
Vincent Torri a6ade14c5e Evil: remove pwd code in Evil and fix compilation failures after the removal
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-28 09:27:27 +01:00
Marcel Hollerbach a4f7baa911 rename efl_ui_item_container -> efl_ui_collection
this is the first rename of the main widget, the renames of the test
suites will follow

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9408
2019-07-25 20:27:39 +02:00
Cedric BAIL 9419be9baf elementary: make Efl.Ui.Position_Manager a namespace.
This does the following rename as per T8058:
Efl.Ui.Item_Position_Manager -> Efl.Ui.Position_Manager.Entity
Efl.Ui.Grid_Position_Manager -> Efl.Ui.Position_Manager.Grid
Efl.Ui.List_Position_Manager -> Efl.Ui.Position_Manager.List

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9388
2019-07-24 21:26:43 +02:00
Marcel Hollerbach 577b82dad6 Introduce Efl.Ui.Item_Container
this is a new widget which aims to replace Efl.Ui.Grid / Efl.Ui.List.
The widget is split up in a widget and a interface for item placement.

Efl_Ui_Item_Position_Manager: The interface contains API which is used
by the Item_Container to place the items, there is also a set of common
tests which tests for the casual tripping wires, and ensures that the
events are emitted in the correct moments (the later part still can be
improved)

Efl_Ui_Item_Container: The widget itself, it contains the API for the
enduser to add Items to the widget, it handles the different modes for
selection type and emits the events for selection changes. The pack API
is conform with the spec unit test. An additional set of tests is
defined which should be able to be run on every widget with a specific
position_manager beeing set.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9285
2019-07-24 10:38:22 -07:00
Marcel Hollerbach 639869703f autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW!
All praise to meson!

This time the final version, ci has been adjusted, and now does not try
anymore to build a removed buildsystem. However, the scripts in there
need cleaning up.

Differential Revision: https://phab.enlightenment.org/D9027
2019-06-18 08:56:34 +02:00
Marcel Hollerbach 4f8e15c16c Revert "autotools: REMOVAL!"
This reverts commit e8c69667b0.

git push on a wrong branch, sorry. This will land today, but not now.
2019-06-18 08:12:53 +02:00
Marcel Hollerbach e8c69667b0 autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW!
All praise to meson!

Differential Revision: https://phab.enlightenment.org/D9027
2019-06-18 08:11:55 +02:00
Vitor Sousa a86a0931f1 eo: add events to track the ownership status of an Eo object
Some user code may want to track an object ownership in regard to whether it is
kept by just one owner or shared between many owners.

This is specially true for code provided by bindings to other programming
languages, where different kinds of resource management may take place.

The event `ownership,unique` is triggered whenever the object refcount goes
from two to one, as a signal that it has just one owner from now on.

The event `ownership,shared` is triggered whenever the object refcount goes
from one to two, as a signal that it has multiple owners from now on.
It will not trigger when further increasing the refcount to any value beyond
two.

We also add benchmarks for sharing (i.e. increasing the refcount) and them
unsharing objects, in order to evaluate the performance impact of this patch.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8678
2019-05-29 15:53:23 -07:00
Christopher Michael d15b37eea1 benchmarks: Fix copy-paste error
Coverity reports this as a copy-paste error, and checking the code it
certainly looks that way, so lets call the proper hash function here

Fixes CID1401052

@fix
2019-05-22 08:48:11 -04:00
Mike Blumenkrantz 7c7998b3dc meson: enforce 61s timeout for tests, remove explicit timeouts from build files
unit tests automatically abort with info after 60s, and tests should be run with
an appropriate timeout to avoid conflict with the test runner's default 30s timeout

set explicit timeout in eio test for now because there's still frequent bugs here

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8894
2019-05-15 18:49:51 +02:00
Christopher Michael db195e76cd eina_bench_stringshare: Fix resourcce leak
Summary:
Coverity reports that we leak the return from eina_counter_dump here,
so store the result, print it out, then we can free it.

Fixes CID1400975

@fix
Depends on D8767

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8768
2019-05-02 13:46:33 +02:00
Vincent Torri 79e809d945 eina benchmark: fix warnings on Windows 64 bits
Summary: long is always a 32 bits type on Windows

Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8482
2019-03-27 11:00:28 -04:00
Marcel Hollerbach 46885653bc eo: remove class functions from eo
As in the previous commit explained, we want to get rid of class
functions in eo, and make them just c functions right away.

This commit removes the class parameter from the eo_class_function_set
call, and adjusts the tests to not depend on class functions anymore.
Class functions are now not tested anymore, tests that used them as a
way to test *things* are adjusted to test them now with object
functions, tests that just tested the working of class functions are
dropped.

This fixes T7675.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7902
2019-02-13 16:59:59 +01:00
Marcel Hollerbach 0709bdea6f eo: change API call of efl_class_functions_set
The next commit will bring support for something like reflection. This
commit prepares the whole tree for getting another argument in
efl_class_functions_set.

ref T7681

Differential Revision: https://phab.enlightenment.org/D7882
2019-02-07 14:43:25 +01:00
Lauro Moura 95069a3038 meson: Enable dev flags for cpp
Had to add a pragma around CityHash64 to make it work with
-f-visibility=hidden

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7466
2018-12-17 16:38:40 +01:00
Carsten Haitzler 5634ce9e9f benchmarks - focus tree - fix unused param warn 2018-12-04 08:37:01 +00:00
Marcel Hollerbach 48ca7a2f33 elementary: add a benchmark for focus widget tree interation
The benchmark checks how long it takes to move focus through a few
nested scrollers.

Differential Revision: https://phab.enlightenment.org/D7363
2018-12-03 20:23:05 +01:00
Marcel Hollerbach 883092816d meson: fix running of benchmark
Differential Revision: https://phab.enlightenment.org/D7362
2018-12-03 19:22:28 +01:00
Carsten Haitzler 172f6000d6 evas mempool bench - fix warning about unused param
unused in some ifdefs - so make as unused.
2018-11-09 11:43:59 +00:00
Carsten Haitzler e8b9492600 evas list benchmarks - fix warning about if guarding 2018-11-09 11:43:59 +00:00
Carsten Haitzler 98042f98eb eina bench array - fix warning about if case not guarding
fix warning noise... no change in code function though.
2018-11-09 11:43:59 +00:00
Carsten Haitzler ea6edad4fb eina bech - hash - warn - fix type for hash func to have proper types
wrap cityhash with proepr typed hash gen func. fix warning
2018-11-09 11:43:58 +00:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Stefan Schmidt 53485e5949 benchmarks: eine: include header for using time()
../src/benchmarks/eina/eina_bench_sort.c: In function ‘eina_bench_sort_eina’:
../src/benchmarks/eina/eina_bench_sort.c:52:10: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
    srand(time(NULL));

Found due to the nice quite build output in our meson feature branch.
2018-01-02 14:18:14 +01:00
Cedric BAIL f4f926f2bd eina: remove tests and benchmark for long dead mempool. 2017-08-15 13:46:38 -07:00
Cedric BAIL 5db949196e eina: remove benchmark for Eina_Promise. 2016-11-07 11:12:33 -08:00
Tom Hacohen 7ebf9d879d Eo: Change the way functions are registered to classes
This change lets us remove a field from the structure that leads to
around 20KiB more of saving in private dirty pages in elementary.

This also looks a bit better and feels a bit cleaner.

Breaks API and ABI.
2016-09-09 11:14:35 +01:00
Tom Hacohen bd3801247e Eo: Make function overrides implicit.
Before this commit, function overrides were explicit. That is, you'd
have to explicitly state you were overriding a function instead of
creating a new one. This made the code a tad more complex, and was also
a bit more annoying to use. This commit removes this extra piece of
information.

This means we now store much less information per function, that will
let us further optimise out structures in the future.
2016-09-08 13:59:04 +01:00