forked from enlightenment/efl
[eina] cleans up and fixes 'make benchmark'
saddly eina_bench stills segv and as I can't find any install target for it, and I'm not a kung-auto-foo warrior, I can't gdb it. could someone provide a benchmark-install target or point me to the direction I missed? Patch by: Jérémy Zurcher <jeremy@asynk.ch> SVN revision: 79448
This commit is contained in:
parent
c1672ed8cf
commit
fbf199f004
|
@ -416,7 +416,7 @@ struct _ecore_string
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI int ecore_string_init();
|
EAPI int ecore_string_init();
|
||||||
EAPI void ecore_string_shutdown();
|
EAPI int ecore_string_shutdown();
|
||||||
EAPI const char *ecore_string_instance(const char *string);
|
EAPI const char *ecore_string_instance(const char *string);
|
||||||
EAPI void ecore_string_release(const char *string);
|
EAPI void ecore_string_release(const char *string);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ static int ecore_string_init_count = 0;
|
||||||
* @return Zero on failure, non-zero on successful initialization.
|
* @return Zero on failure, non-zero on successful initialization.
|
||||||
*/
|
*/
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_string_init()
|
ecore_string_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* No strings have been loaded at this point, so create the hash
|
* No strings have been loaded at this point, so create the hash
|
||||||
|
@ -138,9 +138,11 @@ ecore_string_hash_dump_stats(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shutdown the ecore string internal structures
|
* Shutdown the ecore string internal structures
|
||||||
|
* @return 0 when the module is completely shut down, 1 or
|
||||||
|
* greater otherwise.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI int
|
||||||
ecore_string_shutdown()
|
ecore_string_shutdown(void)
|
||||||
{
|
{
|
||||||
--ecore_string_init_count;
|
--ecore_string_init_count;
|
||||||
if (!ecore_string_init_count)
|
if (!ecore_string_init_count)
|
||||||
|
@ -148,6 +150,7 @@ ecore_string_shutdown()
|
||||||
ecore_hash_destroy(ecore_strings);
|
ecore_hash_destroy(ecore_strings);
|
||||||
ecore_strings = NULL;
|
ecore_strings = NULL;
|
||||||
}
|
}
|
||||||
|
return ecore_string_init_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -57,10 +57,10 @@ static Eina_Stringshare_Test eina_str = {
|
||||||
|
|
||||||
static Eina_Stringshare_Test evas_str = {
|
static Eina_Stringshare_Test evas_str = {
|
||||||
"evas",
|
"evas",
|
||||||
/* evas_stringshare_init, */
|
NULL,
|
||||||
evas_stringshare_add,
|
evas_stringshare_add,
|
||||||
evas_stringshare_del
|
evas_stringshare_del,
|
||||||
/* evas_stringshare_shutdown */
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static Eina_Stringshare_Test ecore_str = {
|
static Eina_Stringshare_Test ecore_str = {
|
||||||
|
@ -71,7 +71,7 @@ static Eina_Stringshare_Test ecore_str = {
|
||||||
ecore_string_shutdown
|
ecore_string_shutdown
|
||||||
};
|
};
|
||||||
|
|
||||||
static Eina_Stringshare_Test *str[] = {
|
static Eina_Stringshare_Test *tests[] = {
|
||||||
&eina_str,
|
&eina_str,
|
||||||
&evas_str,
|
&evas_str,
|
||||||
&ecore_str,
|
&ecore_str,
|
||||||
|
@ -87,16 +87,17 @@ eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
|
||||||
|
|
||||||
eina_counter_start(cnt);
|
eina_counter_start(cnt);
|
||||||
|
|
||||||
str->init();
|
if (str->init)
|
||||||
|
str->init();
|
||||||
|
|
||||||
#include "strlog"
|
//#include "strlog"
|
||||||
|
|
||||||
str->shutdown();
|
if (str->shutdown)
|
||||||
|
str->shutdown();
|
||||||
|
|
||||||
eina_counter_stop(cnt, 1);
|
eina_counter_stop(cnt, 1);
|
||||||
|
|
||||||
fprintf(stderr, "For `%s`:\n", str->name);
|
fprintf(stderr, "For `%s`:\n%s\n", str->name,eina_counter_dump(cnt));
|
||||||
eina_counter_dump(cnt);
|
|
||||||
|
|
||||||
eina_counter_free(cnt);
|
eina_counter_free(cnt);
|
||||||
}
|
}
|
||||||
|
@ -110,8 +111,8 @@ eina_bench_e17(void)
|
||||||
|
|
||||||
eina_init();
|
eina_init();
|
||||||
|
|
||||||
for (i = 0; str[i]; ++i)
|
for (i = 0; tests[i]; ++i)
|
||||||
eina_bench_e17_stringshare(str[i]);
|
eina_bench_e17_stringshare(tests[i]);
|
||||||
|
|
||||||
eina_shutdown();
|
eina_shutdown();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,7 +56,7 @@ _evas_mp_pool_free(Pool *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
evas_mempool_malloc(Evas_Mempool *pool, int size EINA_UNUSED)
|
evas_mempool_malloc(Evas_Mempool *pool, int size)
|
||||||
{
|
{
|
||||||
#ifdef NOPOOL
|
#ifdef NOPOOL
|
||||||
return malloc(size);
|
return malloc(size);
|
||||||
|
|
Loading…
Reference in New Issue