Commit Graph

7829 Commits

Author SHA1 Message Date
Vincent Torri 1dd8436cd4 add Mathieu Taillefumier's patch for eina logging,
with small modifications and fixing

ecore_evas_win32 does not build, though. I think that
if we add log support in evas, all the macro must have
different names, because of all the _private.h headers
that are included in all source files (that's the problem
with win32). I'll fix ecore_evas_win32 build later. Or
someone can do it if he wants :-)


SVN revision: 42274
2009-09-05 08:39:34 +00:00
Vincent Torri 911ce19bfc fix build when async events are not enabled
SVN revision: 42273
2009-09-05 07:56:03 +00:00
Gustavo Sverzut Barbieri 5846195caf eina_log: be able to disable function or line.
write down specialized cases for threads or not, function or file,
color or not. Maybe it's not even an optimization since we add yet
another indirection/function call, but each case is simpler.

 * EINA_LOG_FILE_DISABLE=1: disables show of file:line in
   stderr/stdout messages.
 * EINA_LOG_FUNCTION_DISABLE=1: disables show of function() in
   stderr/stdout messages.

one must not use the two options at the same time, if that's the case
code will ignore EINA_LOG_FILE_DISABLE=1 and use just function
disable.



SVN revision: 42272
2009-09-04 23:45:16 +00:00
Gustavo Sverzut Barbieri 86aa8a433b mark log functions as not_instrument_function.
SVN revision: 42270
2009-09-04 21:55:03 +00:00
Gustavo Sverzut Barbieri b5397eea63 eina_log optimization: allow to compile out some debug messages.
Users may opt to set EINA_LOG_LEVEL_MAXIMUM to some integer and macro
will then evaluate to check for that value before actually call
eina_log_print() macro. By using optimizations compilers will
effectivelly compile out the code if it is never reached, thus saving
the check and function call in possible critical paths.



SVN revision: 42269
2009-09-04 21:28:50 +00:00
Gustavo Sverzut Barbieri e229b25826 loggify ethumb.
remove debug_level options as it is better handled by EINA_LOG_LEVELS
and EINA_LOG_LEVEL variables, for example:

  EINA_LOG_LEVEL=3 EINA_LOG_LEVELS=ethumb:4,ethumb_client=1

will show debug for ethumb (lib), just errors (no warnings) for
ethumb_client library and everything else shows "info".



SVN revision: 42261
2009-09-04 19:27:12 +00:00
xcomputerman 1f24df9c39 Update EINA_ERROR_LEVEL* to EINA_LOG_LEVEL* to allow building again
SVN revision: 42255
2009-09-04 18:04:00 +00:00
Vincent Torri 1d7608daaa fix coverage support configuration
SVN revision: 42250
2009-09-04 16:55:51 +00:00
Vincent Torri 5e05323794 include eina_log.h in eina_error.h as some log macro are used in it
SVN revision: 42249
2009-09-04 16:54:38 +00:00
Vincent Torri d56568b7f9 eina_log uses pthreads now (if enabled), so link libeina against pthread
SVN revision: 42248
2009-09-04 16:25:18 +00:00
Gustavo Sverzut Barbieri eef2d35ea6 eina_matrixsparse: loggify, install header, remove warnings and coding style.
* use eina_log
 * install eina_matrixsparse.h
 * remove unused variable
 * fix coding style issue reported by Vincent



SVN revision: 42246
2009-09-04 14:18:05 +00:00
Gustavo Sverzut Barbieri 643958705b eina_matrixsparse: welcome sparse matrix implementation and tests.
Sparse Matrix was implemented and tested by Rafael Antognolli and
myself in order to implement optimized large sparse matrix walk in
some products, one of them WebKit-EFL optimizations.

We have done extensive tests, with good code coverage. Similar to
lists/inlists, we keep pointer to last known element and similar to
iterators we keep reference to last accessed row and cell inside
rows. This allows fast sequential access (for i... for j... m[i,j]),
that is our most common usage case.

Rows are kept in a list, with cells inside that row as another
list. It's not similar to most book implementations where cells keep
reference to their sibling cells in other rows as well, we opted to
not do that to save some pointers and make algorithms simpler, still
do great for our use case.

This code was developed on behalf of our client, that wants to remain
unnamed so far. Thanks client ;-)



SVN revision: 42243
2009-09-04 13:43:44 +00:00
Vincent Torri d8acbfc6f6 rename ecore_thread_init and ecore_thread_shutdown to fit usual private function names
SVN revision: 42240
2009-09-04 05:49:54 +00:00
Vincent Torri eaf9934e80 evas_init() fails if eina_init() or evas_async_events_init() fail
SVN revision: 42239
2009-09-04 05:41:20 +00:00
Vincent Torri ac3dae2a80 remove trailing spaces
SVN revision: 42238
2009-09-04 05:13:19 +00:00
Vincent Torri be3e63eb6d et_init should fail if eina_init fails
SVN revision: 42237
2009-09-04 05:03:47 +00:00
Vincent Torri 4576249649 fix maintainer-clean rule
SVN revision: 42236
2009-09-04 04:45:47 +00:00
Vincent Torri d109fae2f9 remove from MAINTAINERCLEANFILES files that are removed by distclean rule
SVN revision: 42235
2009-09-04 04:36:03 +00:00
Vincent Torri cb3150f9ea remove uneeded files
SVN revision: 42234
2009-09-04 04:29:23 +00:00
Carsten Haitzler 1352efe452 1. make smart callback calling faster with == instead of strcmp
2. add linesize/line relsize for setting line sizes in textblock



SVN revision: 42231
2009-09-04 03:53:18 +00:00
Gustavo Sverzut Barbieri e88b62b295 oops! thanks Vincent.
SVN revision: 42230
2009-09-04 03:52:05 +00:00
Gustavo Sverzut Barbieri e455e6f5b9 fix eina to not use deprecated eina_error logging.
SVN revision: 42229
2009-09-04 02:42:51 +00:00
Gustavo Sverzut Barbieri 4d5fbb7742 loggify array.
this is the last eina module to be converted to eina_log! :-)


SVN revision: 42228
2009-09-04 02:35:24 +00:00
Gustavo Sverzut Barbieri 5ea9ceeafc eina_module must initialize eina_array as it is used.
SVN revision: 42227
2009-09-04 02:34:48 +00:00
Gustavo Sverzut Barbieri dfee09d6b0 make it easier to spot wrong users of eina_log_print()
SVN revision: 42226
2009-09-04 02:34:10 +00:00
Gustavo Sverzut Barbieri 9f8dfea129 loggify rectangle.
SVN revision: 42225
2009-09-04 02:11:44 +00:00
Gustavo Sverzut Barbieri 04489ec727 loggify stringshare, with extensive debug.
note that one can turn per module debug, for example:

   EINA_LOG_LEVEL=4 EINA_LOG_LEVELS=eina_stringshare:0 ./bla

will enable level 4 (debug) for all modules except eina_stringshare
that is forced to 0 (just critical messages).



SVN revision: 42224
2009-09-04 02:03:46 +00:00
Gustavo Sverzut Barbieri 21545b087a loggify stringshare.
SVN revision: 42223
2009-09-04 01:54:37 +00:00
Gustavo Sverzut Barbieri ecbff0cb75 loggify main.
SVN revision: 42222
2009-09-04 01:48:36 +00:00
Gustavo Sverzut Barbieri 8a2c84631c loggify list.
SVN revision: 42221
2009-09-04 01:43:50 +00:00
Gustavo Sverzut Barbieri 8ca1675c51 eina_error: deprecated old logging, move to eina_log.
SVN revision: 42220
2009-09-04 01:37:11 +00:00
Gustavo Sverzut Barbieri 2406791660 loggify benchmark.
SVN revision: 42219
2009-09-04 01:19:19 +00:00
Gustavo Sverzut Barbieri dac152772f loggify mempool.
SVN revision: 42218
2009-09-04 01:13:49 +00:00
Gustavo Sverzut Barbieri 253a9623e9 loggify eina_convert.
SVN revision: 42217
2009-09-04 01:03:27 +00:00
Gustavo Sverzut Barbieri eeb2d38d38 eina_log_vprint() for those that want to wrap it in other functions.
SVN revision: 42216
2009-09-04 00:57:09 +00:00
Gustavo Sverzut Barbieri 0dd3836c56 missing file, sorry.
SVN revision: 42215
2009-09-04 00:56:16 +00:00
Gustavo Sverzut Barbieri 07d2bde900 eina_safety_checks_init()
All these individual init functions are getting messy, some modules
lack them and it's easy to get inconsistent. Safety check needs error
and log, but these need safety checks as well, some modules (lalloc,
rbtree and others) use safety checks but provide no _init().

I want to know if we really gain something to init individual
modules. It should not be that expensive as init should not allocate
heavy resources and the recommendation is to call eina_init() so most
users will do that anyway.

If people agree I'll unmark all *_init() as EAPI and make them private
to eina lib.



SVN revision: 42214
2009-09-04 00:53:19 +00:00
Gustavo Sverzut Barbieri 4d37971d60 eina_safety_checks now uses eina_log.
SVN revision: 42213
2009-09-03 23:36:27 +00:00
Massimo Maiurana 63ebbb00a0 adding french and italian translations
SVN revision: 42211
2009-09-03 17:22:10 +00:00
Gustavo Sverzut Barbieri cee03dcb3c eina_log: CONVENTION BREAK!!!! automatically adds \n
Automatically add \n to messages. Since we use that prefix, there is
no use to allow messages without \n, it would look a mess.

Some logging systems may not require the trailing newline, for example
logging to xml or syslog, for those you don't need to ignore this char
if present.

Yes, this breaks convention, but better now than latter. And the
results are not so bad.



SVN revision: 42200
2009-09-03 01:39:45 +00:00
Gustavo Sverzut Barbieri 8024360138 eina_log: thread safe logging!
eina_log_threads_enable() and then get thread safe logging with
non-main threads being printed with special notation to easily spot
those.



SVN revision: 42199
2009-09-03 01:31:26 +00:00
Gustavo Sverzut Barbieri d8ee1b3a24 eina_log: fix error handling and handle deleted domains.
EINA_SAFETY_CHECKS will call eina_log, so calling these from inside
eina_log_print() may lead to recursion, that is really bad (although
it seems it would never lead to infinite recursion).

handle d->deleted, also showing error.



SVN revision: 42198
2009-09-03 00:17:27 +00:00
Gustavo Sverzut Barbieri 9fb9b1259d eina_log: fix stderr, improve log output.
* stderr logger was doing prefix properly but user message to stdout, fixed.
 * log is improved:
   * grep-able, it shows the 3 letter level name as prefix, unknown levels
     will have their number printed.
   * colors just on prefix, less polluted output still easy to spot.
   * function names are highlighted.



SVN revision: 42197
2009-09-03 00:07:25 +00:00
Gustavo Sverzut Barbieri 418c99a8e3 eina_log improvements: docs, micro optimizations and stderr logging by default.
* more docs.
 * do not getenv("EINA_LOG_ABORT") everytime, just at init.
 * EINA_UNLIKELY() in some critical paths (not that big impact anyway)
 * eina_log_print_cb_stderr() and use it by default.




SVN revision: 42196
2009-09-02 23:28:00 +00:00
Gustavo Sverzut Barbieri bb717a3be5 less malloc and memory fragmentation.
not that important, but an easy improvement does not hurt.



SVN revision: 42195
2009-09-02 23:11:22 +00:00
Gustavo Sverzut Barbieri 2f8ded1037 loggify eina_module, adding couple of debug info.
SVN revision: 42194
2009-09-02 23:06:55 +00:00
Gustavo Sverzut Barbieri c1e2a300e4 coding style/indent.
SVN revision: 42193
2009-09-02 22:39:41 +00:00
Christopher Michael d00a91f70d Formatting.
SVN revision: 42185
2009-09-02 15:48:34 +00:00
Carsten Haitzler 8a202ffe04 remove excessive backspace
SVN revision: 42183
2009-09-02 12:49:09 +00:00
Carsten Haitzler d6cdd8131b 1. ecore-evas doesnt disable draws to fully obscured windows if compositoir
is there
2. static atom for compositor check
3. stop filterng out mouse moves for better scroll momentum checks



SVN revision: 42182
2009-09-02 12:48:56 +00:00