debugch: modify the emulator log print format. 54/30554/1
authorSooyoung Ha <yoosah.ha@samsung.com>
Thu, 20 Nov 2014 07:02:54 +0000 (16:02 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Thu, 20 Nov 2014 07:02:54 +0000 (16:02 +0900)
log shows the time resolution to milliseconds
fix the debug class output name length to 4 characters
limit the debug channel name length to 10 characters
remove the useless prefix of debug channel name

Change-Id: I82ffaa15d834fde005bf7859fd3b41545a2438e9
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
35 files changed:
hw/9pfs/virtio-9p-local-maru.c
hw/9pfs/virtio-9p-maru.c
tizen/src/display/maru_finger.c
tizen/src/display/maru_sdl.c
tizen/src/display/maru_sdl_processing.c
tizen/src/display/maru_shm.c
tizen/src/ecs/ecs_eventcast.c
tizen/src/eventcast/common.c
tizen/src/eventcast/encode_fb.c
tizen/src/eventcast/sensor.c
tizen/src/eventcast/touch.c
tizen/src/hw/maru_pm.c
tizen/src/hw/pci/maru_brightness.c
tizen/src/hw/pci/maru_camera_common_pci.c
tizen/src/hw/pci/maru_camera_darwin_converter.c
tizen/src/hw/pci/maru_camera_darwin_pci.m
tizen/src/hw/pci/maru_camera_linux_pci.c
tizen/src/hw/pci/maru_camera_win32_pci.c
tizen/src/hw/usb/maru_usb_touchscreen.c
tizen/src/hw/virtio/maru_virtio_esm.c
tizen/src/hw/virtio/maru_virtio_evdi.c
tizen/src/hw/virtio/maru_virtio_jack.c
tizen/src/hw/virtio/maru_virtio_keyboard.c
tizen/src/hw/virtio/maru_virtio_nfc.c
tizen/src/hw/virtio/maru_virtio_power.c
tizen/src/hw/virtio/maru_virtio_sensor.c
tizen/src/hw/virtio/maru_virtio_touchscreen.c
tizen/src/hw/virtio/maru_virtio_vmodem.c
tizen/src/skin/maruskin_client.c
tizen/src/skin/maruskin_keymap.c
tizen/src/skin/maruskin_operation.c
tizen/src/skin/maruskin_server.c
tizen/src/util/new_debug_ch.c
tizen/src/util/new_debug_ch.h
tizen/src/util/osutil.h

index 21406a0990b5bc3b59e7a5536b441a33729f6afd..2147fd20ab5411b9c5db4ed5aedfc26673d9c4e7 100644 (file)
@@ -50,7 +50,7 @@
 #endif
 
 #include "tizen/src/util/new_debug_ch.h"
-DECLARE_DEBUG_CHANNEL(9p_local);
+DECLARE_DEBUG_CHANNEL(9pfs_local);
 
 #ifndef XFS_SUPER_MAGIC
 #define XFS_SUPER_MAGIC  0x58465342
index 9556dbdad5c36cdd780b7be61ed47d7ae3bd2b4f..0811794527cd71422d7a966e5ccb9c563ac357c8 100644 (file)
@@ -57,7 +57,7 @@ extern uint64_t hostBytesPerSector;
 #endif
 
 #include "../../tizen/src/debug_ch.h"
-MULTI_DEBUG_CHANNEL(tizen, qemu_9p_test);
+MULTI_DEBUG_CHANNEL(tizen, 9pfs);
 
 int open_fd_hw;
 int total_open_fd;
index de365e84606057a85f6343810c318f37d41d1d60..e628b5dbb55abf296a227c6e6ed6835164eac3f3 100644 (file)
@@ -36,7 +36,7 @@
 #include "hw/virtio/maru_virtio_touchscreen.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(qemu, maru_finger);
+MULTI_DEBUG_CHANNEL(qemu, finger);
 
 
 /* ===== Reference: http://content.gpwiki.org/index.php/SDL:Tutorials:Drawing_and_Filling_Circles ===== */
index 43aea68c07f54395ac4975a99f553c7593fdd418..adad35ec42d8d7ec5adfabdbc9144b98b257f2bb 100644 (file)
@@ -45,7 +45,7 @@
 #include <SDL_syswm.h>
 #endif
 
-MULTI_DEBUG_CHANNEL(tizen, maru_sdl);
+MULTI_DEBUG_CHANNEL(tizen, sdl);
 
 static DisplayChangeListener *dcl;
 
index 174198e46a0ef07f4d393567bb0c441ff339a755..dbe2a15efee8903a27b36c052b95b4b8a7a8abd8 100644 (file)
@@ -33,7 +33,7 @@
 #include "hw/pci/maru_brightness.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(tizen, sdl_processing);
+MULTI_DEBUG_CHANNEL(tizen, sdl_op);
 
 
 /* Image processing functions using the pixman library */
index 12674d713ff7db5c7da0fc37e4789d8e1022b316..226e8888e6d5c3307d45fc4928a6bc583ffb931e 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "eventcast/encode_fb.h"
 
-MULTI_DEBUG_CHANNEL(tizen, maru_shm);
+MULTI_DEBUG_CHANNEL(tizen, shm);
 
 static DisplayChangeListener *dcl;
 
index a2792cba9d584e9b6804d3f051436dac0321a795..45261b9895ae316bcf6302ba0175bc4efd8afa87 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "util/new_debug_ch.h"
 
-DECLARE_DEBUG_CHANNEL(ecs_eventcast);
+DECLARE_DEBUG_CHANNEL(ecs);
 
 #define MSG_BUF_SIZE  255
 #define MSG_LEN_SIZE    4
index f7c15384368f9f0f1cc9fa93fdd6cdb5712de26a..0a8fb3587bd7972cf5c7a4f028a30364427e26b5 100644 (file)
@@ -50,7 +50,7 @@
 
 #include "util/new_debug_ch.h"
 
-DECLARE_DEBUG_CHANNEL(app_eventcast);
+DECLARE_DEBUG_CHANNEL(eventcast);
 
 #define EVENTCAST_MSG_HANDSHAKE_KEY     100
 #define MSG_BUF_SIZE    255
index 1f5bf5ce78a8346b8e1bb0f93a3124524f96b79b..48d457d9c114a2a7c734dfa36546a3696a440fb1 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "util/new_debug_ch.h"
 
-DECLARE_DEBUG_CHANNEL(app_eventcast);
+DECLARE_DEBUG_CHANNEL(eventcast);
 
 #if !defined(CONFIG_SDL) && !defined(CONFIG_USE_SHM)
 bool maru_extract_framebuffer(void *buffer)
index 952c218d8250856e35351c143d5029bc9d5b8548..8ceaafc6a2e4b0c04b4bed4a0bde8cd3a16c74fe 100644 (file)
@@ -50,7 +50,7 @@
 
 #include "util/new_debug_ch.h"
 
-DECLARE_DEBUG_CHANNEL(app_eventcast);
+DECLARE_DEBUG_CHANNEL(eventcast);
 
 typedef struct sensor_state {
     bool is_sensor_event;
index f0be2b430704374fd9942919bde888c846ee0bdb..5d2ae70a951f04a49b3beb9cc1c2eaacd588c71a 100644 (file)
@@ -37,7 +37,7 @@
 #include "ecs/ecs_eventcast.h"
 #include "util/new_debug_ch.h"
 
-DECLARE_DEBUG_CHANNEL(app_eventcast);
+DECLARE_DEBUG_CHANNEL(eventcast);
 
 static int touch_device_status;
 static bool send_display_image_data(void);
index c9833648125058bf8b8c3836161aef99768ee69b..2fcf610ce62cb4cac78e9eb91dc0cb2019f24b7f 100644 (file)
@@ -34,7 +34,7 @@
 #include "util/sdb.h"
 
 /* define debug channel */
-MULTI_DEBUG_CHANNEL(tizen, maru_pm);
+MULTI_DEBUG_CHANNEL(tizen, power_mgr);
 
 ACPIREGS *maru_pm_ar;
 acpi_update_sci_fn maru_pm_update_sci;
index 7cc309f21887b5d2ca433cc9de48f47b07ea0810..a6eb9a21e284be774c387452ccb9e301e09a1503 100644 (file)
@@ -39,7 +39,7 @@
 #include "skin/maruskin_server.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(tizen, maru-brightness);
+MULTI_DEBUG_CHANNEL(tizen, brightness);
 
 #define QEMU_DEV_NAME           "maru-brightness"
 
index 694dea42d6fce04145643619a712c24f528f063a..882d83311fbf53ae4fd3040009f824bb085f2faf 100644 (file)
@@ -43,7 +43,7 @@
 #include "hw/maru_device_ids.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(tizen, maru-camera);
+MULTI_DEBUG_CHANNEL(tizen, camera);
 
 #define MARU_PCI_CAMERA_DEVICE_NAME     "maru-camera"
 
index 24c560f48fadecba38dcb97df91cea08a96fc46d..3f9cec5f4f14ea32b051b21cd57fb47675f9e4b8 100644 (file)
@@ -32,7 +32,7 @@
 #include "maru_camera_darwin.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(tizen, camera_darwin);
+MULTI_DEBUG_CHANNEL(tizen, camera);
 
 static void UYVYToYUV420(unsigned char *bufsrc, unsigned char *bufdest,
                          int width, int height);
index 46df90c3300b6f01c510de28832fb99f8897e76b..b470da3662427beba3ff85ce2812dd878455a1f9 100644 (file)
@@ -38,7 +38,7 @@
 #include "maru_camera_darwin.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(tizen, maru-camera);
+MULTI_DEBUG_CHANNEL(tizen, camera);
 
 #define MARUCAM_THREAD_NAME    "marucam_worker_thread"
 
index 751e467fff9033cf736f27ff172c2de4298c0372..406478b83896ef6aaea0d13c273267eabd8bd753 100644 (file)
@@ -41,7 +41,7 @@
 #include <libv4l2.h>
 #include <libv4lconvert.h>
 
-MULTI_DEBUG_CHANNEL(tizen, maru-camera);
+MULTI_DEBUG_CHANNEL(tizen, camera);
 
 #define MARUCAM_THREAD_NAME    "marucam_worker_thread"
 
index 719006f090d9a50954106f6c55fd7aa80003bd4c..550bbce8088fdecd25cc060c651a548058f34fe7 100644 (file)
@@ -39,7 +39,7 @@
 #include "mmsystem.h"    /* for MAKEFOURCC macro */
 #include "maru_camera_win32_interface.h"
 
-MULTI_DEBUG_CHANNEL(tizen, maru-camera);
+MULTI_DEBUG_CHANNEL(tizen, camera);
 
 /*
  * COM Interface implementations
index 3f1b7e868940588ee608ce32ccd2984b7ccf6f37..6ed8703917a99f482ff4ad006c60f258c5ccbdbc 100644 (file)
@@ -32,7 +32,7 @@
 #include "maru_usb_touchscreen.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(qemu, usb_touchscreen);
+MULTI_DEBUG_CHANNEL(qemu, usb_tsp);
 
 
 #define MAX_TOUCH_EVENT_CNT 128
index 455c33b1cc332347ede0d77eb3639b5416ec1d1d..03b863dd971c2ddbfbf66101e9a1cc53b6d18e9a 100644 (file)
@@ -32,7 +32,7 @@
 #include "emul_state.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-esm);
+MULTI_DEBUG_CHANNEL(qemu, esm);
 
 
 #define SYSTEM_MODE_LAYER 1
index d3ff4321fde4677a72d4fb7cfa0e146f71fa145a..7e7a417e453ebaf076901a8db134b69d5d244b85 100644 (file)
@@ -33,7 +33,7 @@
 #include "debug_ch.h"
 #include "ecs/ecs.h"
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-evdi);
+MULTI_DEBUG_CHANNEL(qemu, evdi);
 
 #define EVDI_DEVICE_NAME "virtio-evdi"
 
index a30e0040aaa7d6fe3c9837bb0a12826fbf5737c1..eb7139a6850994f8470d743bf674f84c809cd70a 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "maru_virtio_jack.h"
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-jack);
+MULTI_DEBUG_CHANNEL(qemu, jack);
 
 #define JACK_DEVICE_NAME  "jack"
 #define _MAX_BUF          1024
index 7132d5104d83256032032882ccc2b054c0521efa..745934b34d5da16a3666f8d36b74830c854f4d61 100644 (file)
@@ -33,7 +33,7 @@
 #include "debug_ch.h"
 
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-kbd);
+MULTI_DEBUG_CHANNEL(qemu, keyboard);
 
 VirtIOKeyboard *vkbd;
 VirtQueueElement elem;
index df589f0614651707de0847bf0d065e417355bf66..e7a68b781dff9bf35ed4f0106a6b12b5f69cac31 100644 (file)
@@ -33,7 +33,7 @@
 #include "debug_ch.h"
 #include "ecs/ecs.h"
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-nfc);
+MULTI_DEBUG_CHANNEL(qemu, nfc);
 
 #define NFC_DEVICE_NAME "virtio-nfc"
 
index c275fdd9ae0674c17b10712729ec702307b35680..38dd4fd1bc001a1763ee5b10463f7f241dd0e960 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "maru_virtio_power.h"
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-power);
+MULTI_DEBUG_CHANNEL(qemu, power);
 
 #define POWER_DEVICE_NAME  "power_supply"
 #define _MAX_BUF           1024
index 6efedac8488845a335df38f698ca3ff123eb8317..09b21002fdfc2b64d9a382896f722ada0d44bf2a 100644 (file)
@@ -34,7 +34,7 @@
 #include "debug_ch.h"
 #include "ecs/ecs.h"
 
-MULTI_DEBUG_CHANNEL(qemu, virtio-sensor);
+MULTI_DEBUG_CHANNEL(qemu, sensor);
 
 #define SENSOR_DEVICE_NAME  "sensor"
 #define _MAX_BUF            1024
index 4e60b8b1019a122a4e580e72ecf7d922f7688542..85b5960e36f34a67b63c990e20d160aaf4d8a43c 100644 (file)
@@ -33,7 +33,7 @@
 #include "emul_state.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(qemu, touchscreen);
+MULTI_DEBUG_CHANNEL(qemu, tsp);
 
 
 #define DEVICE_NAME "virtio-touchscreen"
index 6206cd4151ac6d717bfae58344e74c6c08a52778..3e6bb101526dde06272194c0a048fd30e235ba88 100644 (file)
@@ -34,7 +34,7 @@
 #include "util/new_debug_ch.h"
 #include "ecs/ecs.h"
 
-DECLARE_DEBUG_CHANNEL(virtio-vmodem);
+DECLARE_DEBUG_CHANNEL(vmodem);
 
 #define VMODEM_DEVICE_NAME "virtio-vmodem"
 
index e6a97dc7a9517a7816a2120443bee14653ddf5b3..da8f8afcb61fc262ca4b2cc410c8234c5b09f41a 100644 (file)
@@ -48,7 +48,7 @@
 #include "util/maru_err_table.h"
 #endif
 
-MULTI_DEBUG_CHANNEL(qemu, skin_client);
+MULTI_DEBUG_CHANNEL(qemu, skinclient);
 
 
 #define SKIN_SERVER_READY_TIME 3 /* second */
index 0dbdc65743afe6703a0e9ff83c48ebddf848d45b..3a1528428306a55ab4283e3fc8f8602589648b13 100644 (file)
@@ -31,7 +31,7 @@
 #include "emul_state.h"
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(qemu, skin_keymap);
+MULTI_DEBUG_CHANNEL(qemu, skinkeymap);
 
 #ifdef KEYMAP_DEBUG
 static void trace_binary(int decimal)
index f2611eced875c653619875a2cc0529751d084cad..6facb3b3e31c106dcae5722b1d46d7d0860438e4 100644 (file)
@@ -57,7 +57,7 @@
 #include "target-i386/hax-i386.h"
 #endif
 
-MULTI_DEBUG_CHANNEL(qemu, skin_operation);
+MULTI_DEBUG_CHANNEL(qemu, skin_op);
 
 
 #define RESUME_KEY_SEND_INTERVAL 500 /* milli-seconds */
index 5899b1133e169d6ad2798d8eecb111bdfa7f90fa..fcc7b8df1a6100ec909ee3c68a6e18e34adadb80 100644 (file)
@@ -57,7 +57,7 @@
 
 #include "debug_ch.h"
 
-MULTI_DEBUG_CHANNEL(qemu, skin_server);
+MULTI_DEBUG_CHANNEL(qemu, skinserver);
 
 
 #define MAX_REQ_ID 0x7fffffff
index cddb6928493764feaa95bd764d36cdc1ab3e5510..8537ee314bb099f81d61950b0738f7d5cf329cf5 100644 (file)
@@ -41,7 +41,7 @@ static char debugchfile[MAX_FILE_LEN] = {0, };
 static int fd = STDOUT_FILENO;
 
 static const char * const debug_classes[] =
-        {"SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "TRACE"};
+        {"SEVR", "WARN", "INFO", "CONF", "FINE", "TRCE"};
 
 #define MAX_DEBUG_OPTIONS 256
 
@@ -294,10 +294,12 @@ int dbg_log(enum _debug_class cls, struct _debug_channel *channel,
 
     if (!(_dbg_get_channel_flags(channel) & (1 << cls))) {
         return -1;
+    } else {
+        channel->name[MAX_NAME_LEN] = '\0';
     }
 
     ret += get_timeofday(buf_msg, sizeof(buf_msg));
-    ret += g_snprintf(buf_msg + ret, sizeof(buf_msg) - ret, "(%5d) [%s:%s] ",
+    ret += g_snprintf(buf_msg + ret, sizeof(buf_msg) - ret, "(%5d) [%4s:%10s] ",
                 qemu_get_thread_id(), debug_classes[cls], channel->name);
 
     va_start(valist, format);
index 6a0de055f41f6ec5665ed12e04048e739d7eb0a4..6be8fb28065a742d0aee7d93382575cf1b41c593 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <sys/types.h>
 
-#define MAX_NAME_LEN    15
+#define MAX_NAME_LEN    10
 // #define NO_DEBUG
 
 #ifdef __cplusplus
index e0edb0baf6575ff90f8654e487698f7ba63278b5..75982d408ecbba2a43824cf0ea4f4a8ce9c35613 100644 (file)
@@ -120,7 +120,7 @@ static inline int get_timeofday(char *buf, size_t size)
     ptm = localtime(&ti);
     ret = strftime(buf, size, "%H:%M:%S", ptm);
 
-    return ret + g_snprintf(buf + ret, size - ret, ".%06ld", (long)tv.tv_usec);
+    return ret + g_snprintf(buf + ret, size - ret, ".%03ld", (long)tv.tv_usec/1000);
 }
 
 int get_number_of_processors(void);