Remove unnecessary ttrace and add ttrace logs to another point
authorJengHyun Kang <jhyuni.kang@samsung.com>
Wed, 24 Feb 2016 05:03:27 +0000 (14:03 +0900)
committerJengHyun Kang <jhyuni.kang@samsung.com>
Tue, 24 Oct 2017 07:04:33 +0000 (16:04 +0900)
Change-Id: I21c3d60d357c46df968437e22f45dcf12455ff6c

src/evdev.c

index c9071bb09fc082187146293252ccc9c5152b32c3..e9913fd02876da7eacbd948be35e5fb345e19d48 100644 (file)
@@ -559,6 +559,7 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch,
        struct normalized_coords accel, unaccel;
        struct device_float_coords raw;
 
+<<<<<<< HEAD
        TRACE_BEGIN(fallback_flush_relative_motion);
 
        if (!(device->seat_caps & EVDEV_DEVICE_POINTER)) {
@@ -577,6 +578,13 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch,
        /* Use unaccelerated deltas for pointing stick scroll */
        if (evdev_post_trackpoint_scroll(device, unaccel, time)) {
                TRACE_END();
+=======
+       slot = device->mt.slot;
+       slot_data = &device->mt.slots[slot];
+
+       switch (device->pending_event) {
+       case EVDEV_NONE:
+>>>>>>> Remove unnecessary ttrace and add ttrace logs to another point
                return;
        }
 
@@ -712,9 +720,13 @@ fallback_flush_mt_up(struct fallback_dispatch *dispatch,
 
        seat->slot_map &= ~(1 << seat_slot);
 
+<<<<<<< HEAD
        touch_notify_touch_up(base, time, slot_idx, seat_slot);
 
        return true;
+=======
+       device->pending_event = EVDEV_NONE;
+>>>>>>> Remove unnecessary ttrace and add ttrace logs to another point
 }
 
 static bool
@@ -937,21 +949,21 @@ fallback_process_key(struct fallback_dispatch *dispatch,
 {
        enum evdev_key_type type;
 
-       TRACE_BEGIN(evdev_process_key);
-
        /* ignore kernel key repeat */
-       if (e->value == 2) {
-               TRACE_END();
+       if (e->value == 2)
                return;
-       }
 
        if (e->code == BTN_TOUCH) {
                if (!device->is_mt)
+<<<<<<< HEAD
                        fallback_process_touch_button(dispatch,
                                                      device,
                                                      time,
                                                      e->value);
                TRACE_END();
+=======
+                       evdev_process_touch_button(device, time, e->value);
+>>>>>>> Remove unnecessary ttrace and add ttrace logs to another point
                return;
        }
 
@@ -967,8 +979,12 @@ fallback_process_key(struct fallback_dispatch *dispatch,
                        break;
                case EVDEV_KEY_TYPE_KEY:
                case EVDEV_KEY_TYPE_BUTTON:
+<<<<<<< HEAD
                        if (!hw_is_key_down(dispatch, e->code)) {
                                TRACE_END();
+=======
+                       if (!hw_is_key_down(device, e->code)) {
+>>>>>>> Remove unnecessary ttrace and add ttrace logs to another point
                                return;
                        }
                }
@@ -997,7 +1013,6 @@ fallback_process_key(struct fallback_dispatch *dispatch,
                                   LIBINPUT_BUTTON_STATE_RELEASED);
                break;
        }
-       TRACE_END();
 }
 
 static void
@@ -1126,6 +1141,7 @@ fallback_process_relative(struct fallback_dispatch *dispatch,
                          struct evdev_device *device,
                          struct input_event *e, uint64_t time)
 {
+<<<<<<< HEAD
        struct normalized_coords wheel_degrees = { 0.0, 0.0 };
        struct discrete_coords discrete = { 0.0, 0.0 };
        enum libinput_pointer_axis_source source;
@@ -1137,6 +1153,8 @@ fallback_process_relative(struct fallback_dispatch *dispatch,
                return;
        }
 
+=======
+>>>>>>> Remove unnecessary ttrace and add ttrace logs to another point
        switch (e->code) {
        case REL_X:
                if (dispatch->pending_event != EVDEV_RELATIVE_MOTION)
@@ -1187,7 +1205,6 @@ fallback_process_relative(struct fallback_dispatch *dispatch,
                        &discrete);
                break;
        }
-       TRACE_END();
 }
 
 static inline void
@@ -1196,13 +1213,11 @@ fallback_process_absolute(struct fallback_dispatch *dispatch,
                          struct input_event *e,
                          uint64_t time)
 {
-       TRACE_BEGIN(evdev_process_absolute);
        if (device->is_mt) {
                fallback_process_touch(dispatch, device, e, time);
        } else {
                fallback_process_absolute_motion(dispatch, device, e);
        }
-       TRACE_END();
 }
 
 static inline bool
@@ -2064,17 +2079,14 @@ evdev_process_event(struct evdev_device *device, struct input_event *e)
                          e->value);
 #endif
 
-       TRACE_BEGIN(evdev_process_event);
-
        dispatch->interface->process(dispatch, device, e, time);
-
-       TRACE_END();
 }
 
 static inline void
 evdev_device_dispatch_one(struct evdev_device *device,
                          struct input_event *ev)
 {
+       TRACE_BEGIN(evdev_device_dispatch_one);
        if (!device->mtdev) {
                evdev_process_event(device, ev);
        } else {
@@ -2087,6 +2099,7 @@ evdev_device_dispatch_one(struct evdev_device *device,
                        }
                }
        }
+       TRACE_END();
 }
 
 static int