summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-08-21 13:51:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:14 +0900
commit4f5c48236f4152964868914ad106c1cb928bc41e (patch)
treea95cf48287b37f6f8b387b31b8664eeba692f95a /src/bin
parent1e4ee656a0c44cbf915e124aa59c50fdde9f0973 (diff)
evas/cserve2: Add proper tags to shm arrays
Use tags such as INDX, FONT, IMAG, FILE. These can help debugging and for robustness, as they will be visible in the memory dump. Update generation_id after repack as well
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/evas/evas_cserve2.h11
-rw-r--r--src/bin/evas/evas_cserve2_cache.c59
-rw-r--r--src/bin/evas/evas_cserve2_fonts.c3
-rw-r--r--src/bin/evas/evas_cserve2_index.c62
-rw-r--r--src/bin/evas/evas_cserve2_main.c4
5 files changed, 103 insertions, 36 deletions
diff --git a/src/bin/evas/evas_cserve2.h b/src/bin/evas/evas_cserve2.h
index badd33c8d6..c0a703ab51 100644
--- a/src/bin/evas/evas_cserve2.h
+++ b/src/bin/evas/evas_cserve2.h
@@ -254,7 +254,7 @@ void cserve2_client_del(Client *client);
254void cserve2_client_deliver(Client *client); 254void cserve2_client_deliver(Client *client);
255void cserve2_client_error_send(Client *client, unsigned int rid, int error_code); 255void cserve2_client_error_send(Client *client, unsigned int rid, int error_code);
256ssize_t cserve2_client_send(Client *client, const void *data, size_t size); 256ssize_t cserve2_client_send(Client *client, const void *data, size_t size);
257void cserve2_index_list_send(const char *strings_index_path, const char *strings_entries_path, const char *files_index_path, const char *images_index_path, const char *fonts_index_path, Client *client); 257void cserve2_index_list_send(int generation_id, const char *strings_index_path, const char *strings_entries_path, const char *files_index_path, const char *images_index_path, const char *fonts_index_path, Client *client);
258 258
259Eina_Bool cserve2_fd_watch_add(int fd, Fd_Flags flags, Fd_Watch_Cb cb, const void *data); 259Eina_Bool cserve2_fd_watch_add(int fd, Fd_Flags flags, Fd_Watch_Cb cb, const void *data);
260Eina_Bool cserve2_fd_watch_del(int fd); 260Eina_Bool cserve2_fd_watch_del(int fd);
@@ -347,7 +347,7 @@ typedef Eina_Bool (* Shared_Array_Repack_Skip_Cb) (Shared_Array *sa,
347 void *user_data); 347 void *user_data);
348 348
349// Shared arrays (arrays of fixed size object) 349// Shared arrays (arrays of fixed size object)
350Shared_Array *cserve2_shared_array_new(int tag, int elemsize, int initcount); 350Shared_Array *cserve2_shared_array_new(int tag, int generation_id, int elemsize, int initcount);
351const char *cserve2_shared_array_name_get(Shared_Array *sa); 351const char *cserve2_shared_array_name_get(Shared_Array *sa);
352void cserve2_shared_array_del(Shared_Array *sa); 352void cserve2_shared_array_del(Shared_Array *sa);
353int cserve2_shared_array_size_get(Shared_Array *sa); 353int cserve2_shared_array_size_get(Shared_Array *sa);
@@ -355,10 +355,11 @@ int cserve2_shared_array_count_get(Shared_Array *sa);
355int cserve2_shared_array_map_size_get(Shared_Array *sa); 355int cserve2_shared_array_map_size_get(Shared_Array *sa);
356int cserve2_shared_array_item_size_get(Shared_Array *sa); 356int cserve2_shared_array_item_size_get(Shared_Array *sa);
357int cserve2_shared_array_generation_id_get(Shared_Array *sa); 357int cserve2_shared_array_generation_id_get(Shared_Array *sa);
358int cserve2_shared_array_generation_id_set(Shared_Array *sa, int generation_id);
358int cserve2_shared_array_size_set(Shared_Array *sa, int newcount); 359int cserve2_shared_array_size_set(Shared_Array *sa, int newcount);
359int cserve2_shared_array_item_new(Shared_Array *sa); 360int cserve2_shared_array_item_new(Shared_Array *sa);
360void *cserve2_shared_array_item_data_get(Shared_Array *sa, int elemid); 361void *cserve2_shared_array_item_data_get(Shared_Array *sa, int elemid);
361Shared_Array *cserve2_shared_array_repack(Shared_Array *sa, 362Shared_Array *cserve2_shared_array_repack(Shared_Array *sa, int generation_id,
362 Shared_Array_Repack_Skip_Cb skip, 363 Shared_Array_Repack_Skip_Cb skip,
363 Eina_Compare_Cb cmp, void *user_data); 364 Eina_Compare_Cb cmp, void *user_data);
364int cserve2_shared_array_item_find(Shared_Array *sa, void *data, 365int cserve2_shared_array_item_find(Shared_Array *sa, void *data,
@@ -368,7 +369,7 @@ void *cserve2_shared_array_item_data_find(Shared_Array *sa, void *data,
368int cserve2_shared_array_foreach(Shared_Array *sa, Eina_Each_Cb cb, void *data); 369int cserve2_shared_array_foreach(Shared_Array *sa, Eina_Each_Cb cb, void *data);
369 370
370// Shared buffers and memory pools 371// Shared buffers and memory pools
371Shared_Mempool *cserve2_shared_mempool_new(int initsize); 372Shared_Mempool *cserve2_shared_mempool_new(int indextag, int generation_id, int initsize);
372void cserve2_shared_mempool_del(Shared_Mempool *sm); 373void cserve2_shared_mempool_del(Shared_Mempool *sm);
373int cserve2_shared_mempool_buffer_new(Shared_Mempool *sm, int size); 374int cserve2_shared_mempool_buffer_new(Shared_Mempool *sm, int size);
374int cserve2_shared_mempool_buffer_ref(Shared_Mempool *sm, int bufferid); 375int cserve2_shared_mempool_buffer_ref(Shared_Mempool *sm, int bufferid);
@@ -377,6 +378,8 @@ void *cserve2_shared_mempool_buffer_get(Shared_Mempool *sm, int bufferid);
377int cserve2_shared_mempool_buffer_offset_get(Shared_Mempool *sm, int bufferid); 378int cserve2_shared_mempool_buffer_offset_get(Shared_Mempool *sm, int bufferid);
378size_t cserve2_shared_mempool_size_get(Shared_Mempool *sm); 379size_t cserve2_shared_mempool_size_get(Shared_Mempool *sm);
379const char *cserve2_shared_mempool_name_get(Shared_Mempool *sm); 380const char *cserve2_shared_mempool_name_get(Shared_Mempool *sm);
381int cserve2_shared_mempool_generation_id_get(Shared_Mempool *sm);
382int cserve2_shared_mempool_generation_id_set(Shared_Mempool *sm, int generation_id);
380 383
381// Shared strings 384// Shared strings
382const char *cserve2_shared_strings_table_name_get(); 385const char *cserve2_shared_strings_table_name_get();
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index 86fb80464c..9a9b82e0aa 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -121,6 +121,7 @@ struct _File_Watch {
121 Eina_List *entries; 121 Eina_List *entries;
122}; 122};
123 123
124static unsigned int _generation_id = 0;
124static unsigned int _entry_id = 0; 125static unsigned int _entry_id = 0;
125static unsigned int _glyph_id = 0; 126static unsigned int _glyph_id = 0;
126static unsigned int _font_data_id = 0; 127static unsigned int _font_data_id = 0;
@@ -341,7 +342,9 @@ _repack()
341 DBG("Repacking file data array: %s", 342 DBG("Repacking file data array: %s",
342 cserve2_shared_array_name_get(_file_data_array)); 343 cserve2_shared_array_name_get(_file_data_array));
343 344
344 sa = cserve2_shared_array_repack(_file_data_array, 345 _generation_id++;
346
347 sa = cserve2_shared_array_repack(_file_data_array, _generation_id,
345 _repack_skip_cb, 348 _repack_skip_cb,
346 _shm_object_id_cmp_cb, NULL); 349 _shm_object_id_cmp_cb, NULL);
347 if (!sa) 350 if (!sa)
@@ -364,7 +367,10 @@ skip_files:
364 DBG("Repacking image data array: %s", 367 DBG("Repacking image data array: %s",
365 cserve2_shared_array_name_get(_image_data_array)); 368 cserve2_shared_array_name_get(_image_data_array));
366 369
367 sa = cserve2_shared_array_repack(_image_data_array, 370 if (!updated)
371 _generation_id++;
372
373 sa = cserve2_shared_array_repack(_image_data_array, _generation_id,
368 _repack_skip_cb, 374 _repack_skip_cb,
369 _shm_object_id_cmp_cb, NULL); 375 _shm_object_id_cmp_cb, NULL);
370 if (!sa) 376 if (!sa)
@@ -387,7 +393,10 @@ skip_images:
387 DBG("Repacking font data array: %s", 393 DBG("Repacking font data array: %s",
388 cserve2_shared_array_name_get(_font_data_array)); 394 cserve2_shared_array_name_get(_font_data_array));
389 395
390 sa = cserve2_shared_array_repack(_font_data_array, 396 if (!updated)
397 _generation_id++;
398
399 sa = cserve2_shared_array_repack(_font_data_array, _generation_id,
391 _repack_skip_cb, 400 _repack_skip_cb,
392 _shm_object_id_cmp_cb, NULL); 401 _shm_object_id_cmp_cb, NULL);
393 if (!sa) 402 if (!sa)
@@ -404,12 +413,19 @@ skip_images:
404skip_fonts: 413skip_fonts:
405 414
406 if (updated) 415 if (updated)
407 cserve2_index_list_send(cserve2_shared_strings_index_name_get(), 416 {
408 cserve2_shared_strings_table_name_get(), 417 // TODO: Update strings table generation_id?
409 cserve2_shared_array_name_get(_file_data_array), 418 cserve2_shared_array_generation_id_set(_font_data_array, _generation_id);
410 cserve2_shared_array_name_get(_image_data_array), 419 cserve2_shared_array_generation_id_set(_image_data_array, _generation_id);
411 cserve2_shared_array_name_get(_font_data_array), 420 cserve2_shared_array_generation_id_set(_file_data_array, _generation_id);
412 NULL); 421 cserve2_index_list_send(_generation_id,
422 cserve2_shared_strings_index_name_get(),
423 cserve2_shared_strings_table_name_get(),
424 cserve2_shared_array_name_get(_file_data_array),
425 cserve2_shared_array_name_get(_image_data_array),
426 cserve2_shared_array_name_get(_font_data_array),
427 NULL);
428 }
413} 429}
414 430
415 431
@@ -1224,9 +1240,16 @@ cserve2_cache_init(void)
1224 EINA_FREE_CB(_font_entry_free), 1240 EINA_FREE_CB(_font_entry_free),
1225 5); 1241 5);
1226 1242
1227 _file_data_array = cserve2_shared_array_new(1, sizeof(File_Data), 0); 1243 _generation_id++;
1228 _image_data_array = cserve2_shared_array_new(1, sizeof(Image_Data), 0); 1244 _file_data_array = cserve2_shared_array_new(FILE_DATA_ARRAY_TAG,
1229 _font_data_array = cserve2_shared_array_new(1, sizeof(Font_Data), 0); 1245 _generation_id,
1246 sizeof(File_Data), 0);
1247 _image_data_array = cserve2_shared_array_new(IMAGE_DATA_ARRAY_TAG,
1248 _generation_id,
1249 sizeof(Image_Data), 0);
1250 _font_data_array = cserve2_shared_array_new(FONT_DATA_ARRAY_TAG,
1251 _generation_id,
1252 sizeof(Font_Data), 0);
1230} 1253}
1231 1254
1232void 1255void
@@ -1411,7 +1434,8 @@ cserve2_cache_client_new(Client *client)
1411 client->images.referencing = eina_hash_int32_new(_entry_free_cb); 1434 client->images.referencing = eina_hash_int32_new(_entry_free_cb);
1412 client->fonts.referencing = NULL; 1435 client->fonts.referencing = NULL;
1413 1436
1414 cserve2_index_list_send(cserve2_shared_strings_index_name_get(), 1437 cserve2_index_list_send(_generation_id,
1438 cserve2_shared_strings_index_name_get(),
1415 cserve2_shared_strings_table_name_get(), 1439 cserve2_shared_strings_table_name_get(),
1416 cserve2_shared_array_name_get(_file_data_array), 1440 cserve2_shared_array_name_get(_file_data_array),
1417 cserve2_shared_array_name_get(_image_data_array), 1441 cserve2_shared_array_name_get(_image_data_array),
@@ -1958,13 +1982,18 @@ _glyphs_load_request_response(Glyphs_Request *req,
1958 1982
1959 if (!mempool) 1983 if (!mempool)
1960 { 1984 {
1961 mempool = cserve2_shared_mempool_new(0); 1985 mempool = cserve2_shared_mempool_new(GLYPH_DATA_ARRAY_TAG,
1986 _generation_id, 0);
1962 font_mem_usage += cserve2_shared_mempool_size_get(mempool); 1987 font_mem_usage += cserve2_shared_mempool_size_get(mempool);
1963 } 1988 }
1989 else
1990 cserve2_shared_mempool_generation_id_set(mempool, _generation_id);
1964 1991
1965 if (!fe->glyph_datas) 1992 if (!fe->glyph_datas)
1966 { 1993 {
1967 fe->glyph_datas = cserve2_shared_array_new(1, sizeof(Glyph_Data), 0); 1994 fe->glyph_datas = cserve2_shared_array_new(GLYPH_INDEX_ARRAY_TAG,
1995 _generation_id,
1996 sizeof(Glyph_Data), 0);
1968 font_mem_usage += cserve2_shared_array_map_size_get(fe->glyph_datas); 1997 font_mem_usage += cserve2_shared_array_map_size_get(fe->glyph_datas);
1969 } 1998 }
1970 1999
diff --git a/src/bin/evas/evas_cserve2_fonts.c b/src/bin/evas/evas_cserve2_fonts.c
index 8690888943..ed0698cbaf 100644
--- a/src/bin/evas/evas_cserve2_fonts.c
+++ b/src/bin/evas/evas_cserve2_fonts.c
@@ -490,7 +490,8 @@ _font_slave_glyphs_load(const void *cmddata, void *data EINA_UNUSED)
490 if (!response->mempool) 490 if (!response->mempool)
491 { 491 {
492 unsigned shmsize = _font_slave_int_shm_calculate(fi, msg->font.hint); 492 unsigned shmsize = _font_slave_int_shm_calculate(fi, msg->font.hint);
493 response->mempool = cserve2_shared_mempool_new(shmsize); 493 response->mempool = cserve2_shared_mempool_new(GLYPH_DATA_ARRAY_TAG,
494 0, shmsize);
494 if (!response->mempool) return NULL; 495 if (!response->mempool) return NULL;
495 } 496 }
496 497
diff --git a/src/bin/evas/evas_cserve2_index.c b/src/bin/evas/evas_cserve2_index.c
index ec63660493..699ef95064 100644
--- a/src/bin/evas/evas_cserve2_index.c
+++ b/src/bin/evas/evas_cserve2_index.c
@@ -149,7 +149,7 @@ _block_rbtree_block_find(const Block *node, const void *key,
149// Data shm 149// Data shm
150 150
151static Data_Shm * 151static Data_Shm *
152_shared_data_shm_new(int size) 152_shared_data_shm_new(const char *infix, int size)
153{ 153{
154 Data_Shm *ds; 154 Data_Shm *ds;
155 size_t mapping_size; 155 size_t mapping_size;
@@ -162,7 +162,7 @@ _shared_data_shm_new(int size)
162 162
163 mapping_size = cserve2_shm_size_normalize((size_t) size); 163 mapping_size = cserve2_shm_size_normalize((size_t) size);
164 164
165 ds->shm = cserve2_shm_request("data", mapping_size); 165 ds->shm = cserve2_shm_request(infix, mapping_size);
166 if (!ds->shm) 166 if (!ds->shm)
167 { 167 {
168 ERR("Could not create shm of size %u", (unsigned) mapping_size); 168 ERR("Could not create shm of size %u", (unsigned) mapping_size);
@@ -228,7 +228,7 @@ _shared_data_shm_resize(Data_Shm *ds, size_t newsize)
228// Arrays 228// Arrays
229 229
230Shared_Array * 230Shared_Array *
231cserve2_shared_array_new(int tag, int elemsize, int initcount) 231cserve2_shared_array_new(int tag, int generation_id, int elemsize, int initcount)
232{ 232{
233 Shared_Array *sa; 233 Shared_Array *sa;
234 Data_Shm *ds; 234 Data_Shm *ds;
@@ -243,7 +243,7 @@ cserve2_shared_array_new(int tag, int elemsize, int initcount)
243 if (!initcount) initcount = 1; 243 if (!initcount) initcount = 1;
244 mapping_size = cserve2_shm_size_normalize(elemsize * initcount 244 mapping_size = cserve2_shm_size_normalize(elemsize * initcount
245 + sizeof(Shared_Array_Header)); 245 + sizeof(Shared_Array_Header));
246 ds = _shared_data_shm_new(mapping_size); 246 ds = _shared_data_shm_new("array", mapping_size);
247 if (!ds) 247 if (!ds)
248 { 248 {
249 free(sa); 249 free(sa);
@@ -254,7 +254,7 @@ cserve2_shared_array_new(int tag, int elemsize, int initcount)
254 sa->header = (Shared_Array_Header *) ds->data; 254 sa->header = (Shared_Array_Header *) ds->data;
255 sa->header->count = (mapping_size - sizeof(Shared_Array_Header)) / elemsize; 255 sa->header->count = (mapping_size - sizeof(Shared_Array_Header)) / elemsize;
256 sa->header->elemsize = elemsize; 256 sa->header->elemsize = elemsize;
257 sa->header->generation_id = 1; 257 sa->header->generation_id = generation_id;
258 sa->header->emptyidx = 0; 258 sa->header->emptyidx = 0;
259 sa->header->sortedidx = 0; 259 sa->header->sortedidx = 0;
260 sa->header->tag = tag; 260 sa->header->tag = tag;
@@ -313,6 +313,16 @@ cserve2_shared_array_generation_id_get(Shared_Array *sa)
313 return sa->header->generation_id; 313 return sa->header->generation_id;
314} 314}
315 315
316int cserve2_shared_array_generation_id_set(Shared_Array *sa, int generation_id)
317{
318 if (!sa) return -1;
319 if (sa->header->generation_id == generation_id)
320 return 0;
321
322 sa->header->generation_id = generation_id;
323 return 1;
324}
325
316int 326int
317cserve2_shared_array_size_set(Shared_Array *sa, int newcount) 327cserve2_shared_array_size_set(Shared_Array *sa, int newcount)
318{ 328{
@@ -388,7 +398,7 @@ cserve2_shared_array_foreach(Shared_Array *sa, Eina_Each_Cb cb, void *data)
388} 398}
389 399
390Shared_Array * 400Shared_Array *
391cserve2_shared_array_repack(Shared_Array *sa, 401cserve2_shared_array_repack(Shared_Array *sa, int generation_id,
392 Shared_Array_Repack_Skip_Cb skip, 402 Shared_Array_Repack_Skip_Cb skip,
393 Eina_Compare_Cb cmp, 403 Eina_Compare_Cb cmp,
394 void *user_data) 404 void *user_data)
@@ -413,13 +423,12 @@ cserve2_shared_array_repack(Shared_Array *sa,
413 } 423 }
414 424
415 // Create new array 425 // Create new array
416 sa2 = cserve2_shared_array_new(0, elemsize, newcount); 426 sa2 = cserve2_shared_array_new(sa->header->tag, generation_id, elemsize, newcount);
417 if (!sa) 427 if (!sa)
418 { 428 {
419 ERR("Can not repack array: failed to create new array"); 429 ERR("Can not repack array: failed to create new array");
420 return NULL; 430 return NULL;
421 } 431 }
422 sa2->header->generation_id = sa->header->generation_id + 1;
423 432
424 // Write data 433 // Write data
425 dstdata = sa2->ds->data + sizeof(Shared_Array_Header); 434 dstdata = sa2->ds->data + sizeof(Shared_Array_Header);
@@ -567,16 +576,15 @@ _shared_index_entry_get_by_id(Shared_Index *si, unsigned int id)
567} 576}
568 577
569static Shared_Index * 578static Shared_Index *
570_shared_index_new() 579_shared_index_new(int tag, int generation_id)
571{ 580{
572 Shared_Index *si; 581 Shared_Index *si;
573 Index_Entry *ie; 582 Index_Entry *ie;
574 int tag = 1234; // FIXME?
575 583
576 si = calloc(1, sizeof(Shared_Index)); 584 si = calloc(1, sizeof(Shared_Index));
577 if (!si) return NULL; 585 if (!si) return NULL;
578 586
579 si->sa = cserve2_shared_array_new(tag, sizeof(Index_Entry), 1); 587 si->sa = cserve2_shared_array_new(tag, generation_id, sizeof(Index_Entry), 0);
580 if (!si->sa) 588 if (!si->sa)
581 { 589 {
582 free(si); 590 free(si);
@@ -607,7 +615,7 @@ _shared_index_del(Shared_Index *si)
607// Shared memory pool 615// Shared memory pool
608 616
609Shared_Mempool * 617Shared_Mempool *
610cserve2_shared_mempool_new(int initsize) 618cserve2_shared_mempool_new(int indextag, int generation_id, int initsize)
611{ 619{
612 Shared_Mempool *sm; 620 Shared_Mempool *sm;
613 size_t mapping_size; 621 size_t mapping_size;
@@ -620,14 +628,14 @@ cserve2_shared_mempool_new(int initsize)
620 if (!initsize) initsize = 1; 628 if (!initsize) initsize = 1;
621 mapping_size = cserve2_shm_size_normalize((size_t) initsize); 629 mapping_size = cserve2_shm_size_normalize((size_t) initsize);
622 630
623 sm->ds = _shared_data_shm_new(mapping_size); 631 sm->ds = _shared_data_shm_new("mempool", mapping_size);
624 if (!sm->ds) 632 if (!sm->ds)
625 { 633 {
626 free(sm); 634 free(sm);
627 return NULL; 635 return NULL;
628 } 636 }
629 637
630 sm->index = _shared_index_new(); 638 sm->index = _shared_index_new(indextag, generation_id);
631 if (!sm->index) 639 if (!sm->index)
632 { 640 {
633 _shared_data_shm_del(sm->ds); 641 _shared_data_shm_del(sm->ds);
@@ -859,6 +867,24 @@ cserve2_shared_mempool_name_get(Shared_Mempool *sm)
859 return cserve2_shm_name_get(sm->ds->shm); 867 return cserve2_shm_name_get(sm->ds->shm);
860} 868}
861 869
870int
871cserve2_shared_mempool_generation_id_get(Shared_Mempool *sm)
872{
873 if (!sm) return -1;
874 return sm->index->sa->header->generation_id;
875}
876
877int
878cserve2_shared_mempool_generation_id_set(Shared_Mempool *sm, int generation_id)
879{
880 if (!sm) return -1;
881 if (sm->index->sa->header->generation_id == generation_id)
882 return 0;
883
884 sm->index->sa->header->generation_id = generation_id;
885 return 1;
886}
887
862 888
863// Shared strings 889// Shared strings
864 890
@@ -959,9 +985,15 @@ cserve2_shared_index_init(void)
959{ 985{
960 if (!_instances) 986 if (!_instances)
961 { 987 {
988 char faketag[5] = {0};
989 int ifaketag = STRING_MEMPOOL_FAKETAG;
990
962 DBG("Initializing shared index"); 991 DBG("Initializing shared index");
963 _string_mempool = cserve2_shared_mempool_new(4096); 992 _string_mempool = cserve2_shared_mempool_new(STRING_INDEX_ARRAY_TAG, 0, 0);
964 _string_entries = eina_hash_string_djb2_new(NULL); 993 _string_entries = eina_hash_string_djb2_new(NULL);
994
995 memcpy(faketag, &ifaketag, sizeof(int));
996 cserve2_shared_string_add(faketag);
965 } 997 }
966 _instances++; 998 _instances++;
967} 999}
diff --git a/src/bin/evas/evas_cserve2_main.c b/src/bin/evas/evas_cserve2_main.c
index 00a0fe4d9f..1509a9cd07 100644
--- a/src/bin/evas/evas_cserve2_main.c
+++ b/src/bin/evas/evas_cserve2_main.c
@@ -36,7 +36,8 @@ cserve2_client_error_send(Client *client, unsigned int rid, int error_code)
36} 36}
37 37
38void 38void
39cserve2_index_list_send(const char *strings_index_path, 39cserve2_index_list_send(int generation_id,
40 const char *strings_index_path,
40 const char *strings_entries_path, 41 const char *strings_entries_path,
41 const char *files_index_path, 42 const char *files_index_path,
42 const char *images_index_path, 43 const char *images_index_path,
@@ -56,6 +57,7 @@ cserve2_index_list_send(const char *strings_index_path,
56 57
57 memset(&msg, 0, size); 58 memset(&msg, 0, size);
58 msg.base.type = CSERVE2_INDEX_LIST; 59 msg.base.type = CSERVE2_INDEX_LIST;
60 msg.generation_id = generation_id;
59 if (strings_index_path) 61 if (strings_index_path)
60 eina_strlcpy(msg.strings_index_path, strings_index_path, 64); 62 eina_strlcpy(msg.strings_index_path, strings_index_path, 64);
61 if (strings_entries_path) 63 if (strings_entries_path)