summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksii Piskun <o.piskun@samsung.com>2017-12-20 18:22:07 +0200
committerMykyta Biliavskyi <m.biliavskyi@samsung.com>2017-12-20 18:22:07 +0200
commitf0aea8918673565569740dc9c784edaffa2ecf4f (patch)
tree5747a292d6d54410a21eae314704bf83872d8617
parent8693f7f22652bef9e22061f53e534d544397e9a7 (diff)
UI: show events without end as small events.
Summary: Set initial event length as 1ns. Reviewers: NikaWhite, i.furs Differential Revision: https://phab.enlightenment.org/D5688
-rw-r--r--src/lib/interval_fill.c29
-rw-r--r--src/lib/logload.c3
2 files changed, 12 insertions, 20 deletions
diff --git a/src/lib/interval_fill.c b/src/lib/interval_fill.c
index f96fcb5..24b9026 100644
--- a/src/lib/interval_fill.c
+++ b/src/lib/interval_fill.c
@@ -260,7 +260,7 @@ _event_array_active_collect(Eina_Array *array, Events_Filling_Data *data)
260 for (; i < eina_array_count(array); i++) 260 for (; i < eina_array_count(array); i++)
261 { 261 {
262 event = eina_array_data_get(array, i); 262 event = eina_array_data_get(array, i);
263 if (!event->offset_finish) continue; 263 if (event->event_info->common.type == SINGLE_EVENT) continue;
264 if (event->time_start >= interval.start) return; 264 if (event->time_start >= interval.start) return;
265 if (interval_cross(event->time_start, event->time_end, interval) && 265 if (interval_cross(event->time_start, event->time_end, interval) &&
266 !(eina_list_data_find(data->active, event))) 266 !(eina_list_data_find(data->active, event)))
@@ -336,7 +336,6 @@ _active_events_fill(Events_Filling_Data data, double **filled, Ecore_Thread *thr
336 if (event->thread_slot != -1) continue; 336 if (event->thread_slot != -1) continue;
337 } 337 }
338 338
339 if (!event->offset_finish) continue;
340 if (!interval_cross(event->time_start, event->time_end, interval)) 339 if (!interval_cross(event->time_start, event->time_end, interval))
341 continue; 340 continue;
342 341
@@ -392,7 +391,7 @@ _interval_events_collect(Eina_Array *array, Events_Filling_Data *data)
392 event = eina_array_data_get(array, i); 391 event = eina_array_data_get(array, i);
393 if (event->time_start > interval.start + interval.length) return; 392 if (event->time_start > interval.start + interval.length) return;
394 else if (event->time_start < interval.start) continue; 393 else if (event->time_start < interval.start) continue;
395 else if ((!event->offset_finish) || 394 else if ((event->event_info->common.type == SINGLE_EVENT) ||
396 (interval_cross(event->time_start, event->time_end, interval))) 395 (interval_cross(event->time_start, event->time_end, interval)))
397 data->active = eina_list_append(data->active, event); 396 data->active = eina_list_append(data->active, event);
398 } 397 }
@@ -445,11 +444,6 @@ _states_interval_fill_cb(const Eina_Hash *hash EINA_UNUSED,
445 for (; i < (int) eina_array_count(states); i++) 444 for (; i < (int) eina_array_count(states); i++)
446 { 445 {
447 event = eina_array_data_get(states, i); 446 event = eina_array_data_get(states, i);
448 if (!event->offset_finish)
449 {
450 INF("State event without finish.");
451 continue;
452 }
453 447
454 if (event->time_start < interval.start) continue; 448 if (event->time_start < interval.start) continue;
455 if (event->time_start > interval.start + interval.length) break; 449 if (event->time_start > interval.start + interval.length) break;
@@ -775,11 +769,6 @@ _interval_thread_events_fill(void *data, Ecore_Thread *ecore_thread)
775 EINA_LIST_FREE(events_in_interval, event) 769 EINA_LIST_FREE(events_in_interval, event)
776 { 770 {
777 thread = event->thread_slot; 771 thread = event->thread_slot;
778 if (!event->offset_finish)
779 {
780 if (!_single_event_fill(thd, event, ecore_thread)) goto cleanup;
781 continue;
782 }
783 772
784 int event_coord_start = time_to_grid_interval_convert(event->time_start, interval); 773 int event_coord_start = time_to_grid_interval_convert(event->time_start, interval);
785 int event_coord_end; 774 int event_coord_end;
@@ -932,23 +921,23 @@ _event_fill_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
932 else 921 else
933 event_coord_end = time_to_grid_interval_convert(event->time_end, interval); 922 event_coord_end = time_to_grid_interval_convert(event->time_end, interval);
934 923
935 if (event->thread_slot == -1) /* State event */ 924 if (event->event_info->common.type == STATE_EVENT)
936 { 925 {
937 Task_State *task = NULL; 926 Task_State *task = NULL;
938 evas_object_smart_callback_call(thd->win, "task,state,register", &task); 927 evas_object_smart_callback_call(thd->win, "task,state,register", &task);
939 TASK_FILL; 928 TASK_FILL;
940 } 929 }
941 else 930 else if (event->event_info->common.type == SINGLE_EVENT)
931 {
932 _single_event_fill(thd, event, NULL);
933 }
934 else if (event->event_info->common.type == THREAD_EVENT)
942 { 935 {
943 if (!event->offset_finish)
944 {
945 _single_event_fill(thd, event, NULL);
946 return;
947 }
948 Task_Thread *task = NULL; 936 Task_Thread *task = NULL;
949 evas_object_smart_callback_call(thd->win, "task,thread,register", &task); 937 evas_object_smart_callback_call(thd->win, "task,thread,register", &task);
950 TASK_FILL; 938 TASK_FILL;
951 } 939 }
940 else ERR("Wrong type of event.")
952} 941}
953 942
954static Pointer_To_Time * 943static Pointer_To_Time *
diff --git a/src/lib/logload.c b/src/lib/logload.c
index 08539c2..17d34f4 100644
--- a/src/lib/logload.c
+++ b/src/lib/logload.c
@@ -22,6 +22,7 @@
22 22
23#define MAGIC_LOG_CHECK 0x0ffee211 23#define MAGIC_LOG_CHECK 0x0ffee211
24#define ADD_PER_REALLOC 1024 24#define ADD_PER_REALLOC 1024
25#define NANOSECOND 0.000000001
25 26
26Time_Range start_range = DEFAULT_START_RANGE; 27Time_Range start_range = DEFAULT_START_RANGE;
27 28
@@ -520,6 +521,7 @@ event_offsets_collect(In_Thread_Data *thd, Pointer_To_Time *ptt,
520 Event_Offsets *event = calloc(1, sizeof(Event_Offsets)); 521 Event_Offsets *event = calloc(1, sizeof(Event_Offsets));
521 event->offset_start = event_offset; 522 event->offset_start = event_offset;
522 event->time_start = event_time; 523 event->time_start = event_time;
524 event->time_end = event->time_start + NANOSECOND;
523 event->obj = item.obj; 525 event->obj = item.obj;
524 ptt->active_events = eina_list_append(ptt->active_events, event); 526 ptt->active_events = eina_list_append(ptt->active_events, event);
525 527
@@ -553,6 +555,7 @@ event_offsets_collect(In_Thread_Data *thd, Pointer_To_Time *ptt,
553 Event_Info_State *ei; 555 Event_Info_State *ei;
554 event->offset_start = event_offset; 556 event->offset_start = event_offset;
555 event->time_start = event_time; 557 event->time_start = event_time;
558 event->time_end = event->time_start + NANOSECOND;
556 event->thread_slot = -1; 559 event->thread_slot = -1;
557 event->obj = item.obj; 560 event->obj = item.obj;
558 561