--- /dev/null
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.h
+config.h.in
+config.h.in~
+config.log
+config.status
+config.guess
+config.sub
+configure
+compile
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+*.deps*
+*.libs*
+*.o
+*.lo
+*.la
+*.so
+*.pc
+stamp-h1
+bin/xdbg/xdbg
+bin/xevlog_analyze/xevlog_analyze
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
COMMON_SOURCE = \
- xdbg_dbus_client.c \
xdbg_evlog.c \
xdbg_evlog_request.c \
xdbg_evlog_core.c \
xdbg_evlog_composite.c \
xdbg_evlog_dri2.c \
xdbg_evlog_damage.c \
- xdbg_evlog_gesture.c \
xdbg_evlog_xext.c \
xdbg_evlog_randr.c \
xdbg_evlog_xinput.c \
ds/bool_exp_rule_checker.c \
ds/bool_exp_tokenizer.c
+if HAVE_GESTURE
+COMMON_SOURCE += xdbg_evlog_gesture.c
+endif
+
if HAVE_HWC
COMMON_SOURCE += xdbg_evlog_hwc.c
endif
libcommon_client_la_LIBADD = ${LDFLAGS} @XDBG_LIBS@
libcommon_client_la_LDFLAGS = ${LDFLAGS} @XDBG_LIBS@
libcommon_client_la_CFLAGS = ${COMMON_CLIENT_CFLAGS}
-libcommon_client_la_SOURCES = $(COMMON_SOURCE)
-
+libcommon_client_la_SOURCES = $(COMMON_SOURCE) \
+ xdbg_dbus_client.c
libcommon_server_la_LIBADD = ${LDFLAGS} @XDBG_LIBS@
libcommon_server_la_LDFLAGS = ${LDFLAGS} @XDBG_LIBS@
libcommon_server_la_CFLAGS = ${COMMON_CFLAGS}
{xDbgEvlogCompositeGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogDamageGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogDri2GetBase, 0, 0, 0, NULL, NULL},
- {xDbgEvlogGestureGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogXinputGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogRandrGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogXextDpmsGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogXextXtestExt1GetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogXextShapeGetBase, 0, 0, 0, NULL, NULL},
{xDbgEvlogXvGetBase, 0, 0, 0, NULL, NULL},
+#if HAVE_GESTURE
+ {xDbgEvlogGestureGetBase, 0, 0, 0, NULL, NULL},
+#endif
#if HAVE_HWC
{xDbgEvlogHwcGetBase, 0, 0, 0, NULL, NULL},
#endif
#include "xdbg_evlog_dri2.h"
#include "xdbg_evlog_composite.h"
#include "xdbg_evlog_damage.h"
-#include "xdbg_evlog_gesture.h"
#include "xdbg_evlog_xext.h"
#include "xdbg_evlog_randr.h"
#include "xdbg_evlog_xinput.h"
#include "xdbg_evlog_xv.h"
+#if HAVE_GESTURE
+#include "xdbg_evlog_gesture.h"
+#endif
#if HAVE_HWC
#include "xdbg_evlog_hwc.h"
#endif
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <windowstr.h>
-#include <dri2/dri2.h>
#include <X11/extensions/dri2proto.h>
return reply;
}
+#if HAVE_GESTURE
case X_DRI2SwapBuffersWithRegion:
{
xDRI2SwapBuffersWithRegionReq *stuff = (xDRI2SwapBuffersWithRegionReq *)req;
return reply;
}
+#endif
default:
break;
[moduledir="$libdir/xorg/modules"])
AC_ARG_WITH(dbus-busconfig-dir,
AC_HELP_STRING([--with-dbus-busconfig-dir=DIR],
- [directory of the xdbg's dbus busconfig file [[default=$sysconfdir/dbus-1/system.d]]]),
+ [directory of the xdbg's dbus busconfig file [[default=/etc/dbus-1/system.d]]]),
[dbusbusconfigdir="$withval"],
- [dbusbusconfigdir="$sysconfdir/dbus-1/system.d"])
-AC_ARG_ENABLE(secure-log,
- AS_HELP_STRING([--enable-secure-log],
- [Enable secure log (default: disabled)]),
- [SECURELOG=$enableval], [SECURELOG=no])
+ [dbusbusconfigdir="/etc/dbus-1/system.d"])
-AC_ARG_ENABLE(normal-log,
- AS_HELP_STRING([--enable-normal-log],
- [Enable normal log instead of secure log (default: disabled)]),
- [NORMALLOG=$enableval], [NORMALLOG=no])
+AC_ARG_ENABLE(dlog,
+ AS_HELP_STRING([--enable-dlog],
+ [Enable dlog (default: disabled)]),
+ [enable_dlog=$enableval], [enable_dlog=no])
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XDBG, dlog xorg-server x11 xdamage xext dbus-1 bigreqsproto compositeproto damageproto dri2proto fixesproto fontsproto gestureproto inputproto kbproto randrproto recordproto renderproto resourceproto videoproto xcmiscproto xextproto xf86vidmodeproto xproto libdrm xcomposite libdri2 xgesture xtst xrandr xi xv xcb)
+AM_CONDITIONAL(ENABLE_DLOG, [test "x$enable_dlog" = xyes])
+if test "x$enable_dlog" = xyes; then
+ AC_DEFINE(ENABLE_DLOG, 1, [Enable dlog])
+fi
-PKG_CHECK_MODULES(HWC, libhwc hwcproto,
- [SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $HWC_CFLAGS"
- AC_CHECK_HEADERS([X11/extensions/hwc.h],[have_hwc_h="yes"],[have_hwc_h="no"])
- CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
+# Checks for pkg-config packages
+PKG_CHECK_MODULES(DBUS, dbus-1)
+XDBG_CFLAGS="$DBUS_CFLAGS"
+XDBG_LIBS="$DBUS_LIBS"
+
+PKG_CHECK_MODULES(XORG, xorg-server > 1.12.0 x11 bigreqsproto compositeproto damageproto dri2proto fixesproto fontsproto inputproto kbproto randrproto recordproto renderproto resourceproto videoproto xcmiscproto xextproto xf86vidmodeproto xproto)
+XDBG_CFLAGS="$XDBG_CFLAGS $XORG_CFLAGS"
+XDBG_LIBS="$XDBG_LIBS $XORG_LIBS"
+
+PKG_CHECK_MODULES(GESTURE, gestureproto, [have_gesture="yes"], [have_gesture="no"])
+AM_CONDITIONAL(HAVE_GESTURE, [test "x$have_gesture" = xyes])
+if test "x$have_gesture" = xyes; then
+ AC_DEFINE(HAVE_GESTURE, 1, [Have gesture extension])
+ XDBG_CFLAGS="$XDBG_CFLAGS $GESTURE_CFLAGS"
+ XDBG_LIBS="$XDBG_LIBS $GESTURE_LIBS"
+fi
-AM_CONDITIONAL(HAVE_HWC, [test "x$have_hwc_h" = xyes])
-if test "x$have_hwc_h" = xyes; then
- AC_DEFINE(HAVE_HWC, 1, [Have libhwc])
+PKG_CHECK_MODULES(HWC, hwcproto, [have_hwc="yes"], [have_hwc="no"])
+AM_CONDITIONAL(HAVE_HWC, [test "x$have_hwc" = xyes])
+if test "x$have_hwc" = xyes; then
+ AC_DEFINE(HAVE_HWC, 1, [Have hwc extension])
XDBG_CFLAGS="$XDBG_CFLAGS $HWC_CFLAGS"
XDBG_LIBS="$XDBG_LIBS $HWC_LIBS"
fi
AC_DEFINE_UNQUOTED(MODULE_NAME, "$MODULE_NAME", [module name])
-TIZEN_ENGINEER_MODE=0
-if test "x$SECURELOG" = xyes; then
- TIZEN_ENGINEER_MODE=1
- AC_SUBST([TIZEN_ENGINEER_MODE])
-fi
-
-USE_NORMAL_LOG=0
-if test "x$NORMALLOG" = xyes; then
- USE_NORMAL_LOG=1
- AC_SUBST([USE_NORMAL_LOG])
-fi
-
AC_OUTPUT([Makefile
common/Makefile
bin/Makefile
bin/xdbg/Makefile
bin/xevlog_analyze/Makefile
lib/Makefile
- lib/xdbg_log_secure.h
lib/xdbg.pc
module/Makefile])
echo "CFLAGS : $CFLAGS"
echo "LDFLAGS : $LDFLAGS"
-echo "LOG : secure($SECURELOG) normal($NORMALLOG)"
echo "XDBG_CFLAGS: $XDBG_CFLAGS"
echo "XDBG_LIBS : $XDBG_LIBS"
echo "XDBG_CLIENT_CFLAGS: $XDBG_CLIENT_CFLAGS"
libxdbg_lib_la_SOURCES = \
xdbg_log.c \
- xdbg_log_klog.c \
- xdbg_log_dlog.c \
- xdbg_log_drmevent.c \
- xdbg_log_plist.c \
- xdbg_log_fpsdebug.c \
- xdbg_dump.c
+ xdbg_log_klog.c
+if ENABLE_DLOG
+libxdbg_lib_la_SOURCES += xdbg_log_dlog.c
+endif
xdbgincludedir = $(includedir)/xdbg
xdbginclude_HEADERS = \
xdbg.h \
- xdbg_log.h \
- xdbg_log_drmevent.h \
- xdbg_log_secure.h \
- xdbg_log_plist.h \
- xdbg_log_fpsdebug.h \
- xdbg_dump.h
+ xdbg_log.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xdbg.pc
/* include only headers */
#include <xdbg_log.h>
-#include <xdbg_log_drmevent.h>
-#include <xdbg_log_plist.h>
-#include <xdbg_log_fpsdebug.h>
-#include <xdbg_dump.h>
#endif /* __XDBG_H__ */
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <fcntl.h>
-#include <dirent.h>
-#include <sys/stat.h>
-
-#include "xdbg_log.h"
-#include "xdbg_dump.h"
-#include "xdbg_dump_module.h"
-#include <list.h>
-
-#ifndef API
-#define API __attribute__ ((visibility("default")))
-#endif
-
-#define DUMP_BUFCNT 50
-#define DUMP_DIR "/tmp/xdump"
-#define DUMP_SCALE_RATIO 2
-
-typedef struct
-{
- int index;
-
- void *bo; /* buffer object */
- int bo_size;
-
- char file[128];
- union {
- struct {
- int dump_w;
- int dump_h;
- xRectangle dump_rect;
- } a;
- int dump_size;
- } u;
- Bool is_dirty;
- Bool is_bmp;
-
- struct xorg_list link;
-} xDbgDumpBuffer;
-
-typedef struct
-{
- Bool init;
-
- char *type_str;
- char *file_str;
- char *count_str;
- char *crop_str;
-
- xDbgDumpBufferFunc func;
- int bo_size;
-
- struct xorg_list *cursor;
- struct xorg_list buffers;
-
- int type;
- int count;
- xRectangle *crop;
-} xDbgDumpInfo;
-
-static xDbgDumpInfo xdbg_dump_info;
-
-static int
-_parse_int (char *s)
-{
- char *fmt = "%lu";
- int retval = 0;
- int thesign = 1;
-
- if (s && s[0])
- {
- char temp[12];
- snprintf (temp, sizeof (temp), "%s", s);
- s = temp;
-
- if (s[0] == '-')
- s++, thesign = -1;
- if (s[0] == '0')
- s++, fmt = "%o";
- if (s[0] == 'x' || s[0] == 'X')
- s++, fmt = "%x";
- (void) sscanf (s, fmt, &retval);
- }
- return (thesign * retval);
-}
-
-static Bool
-_xDbgDumpEnsureDir (void)
-{
- char *dir = DUMP_DIR;
- DIR *dp;
- int ret;
-
- if (!(dp = opendir (dir)))
- {
- ret = mkdir (dir, 0755);
- if (ret < 0)
- {
- XDBG_ERROR (MXDBG, "fail: mkdir '%s'\n", DUMP_DIR);
- return FALSE;
- }
- }
- else
- closedir (dp);
-
- return TRUE;
-}
-
-static void
-_xDbgDumpSetOptions (void)
-{
- char options[256];
- int tempsize = sizeof (options);
- char *reply = options;
- int *len = &tempsize;
-
- options[0] = '\0';
-
- /* type */
- if (xdbg_dump_info.type_str)
- {
- char *c = xdbg_dump_info.type_str;
- if (!strcmp (c, "drawable"))
- xdbg_dump_info.type = XDBG_DUMP_TYPE_DRAWABLE;
- else if (!strcmp (c, "fb"))
- xdbg_dump_info.type = XDBG_DUMP_TYPE_FB;
- else if (!strcmp (c, "ui"))
- xdbg_dump_info.type = XDBG_DUMP_TYPE_UI;
- else if (!strcmp (c, "video"))
- xdbg_dump_info.type = XDBG_DUMP_TYPE_VIDEO;
- else
- xdbg_dump_info.type = _parse_int (c);
- }
- else
- xdbg_dump_info.type = XDBG_DUMP_TYPE_UI;
- XDBG_REPLY ("type(0x%x) ", xdbg_dump_info.type);
-
- /* count */
- if (xdbg_dump_info.count_str)
- xdbg_dump_info.count = atoi (xdbg_dump_info.count_str);
- else
- xdbg_dump_info.count = DUMP_BUFCNT;
- XDBG_REPLY ("count(%d) ", xdbg_dump_info.count);
-
- /* file */
- if (xdbg_dump_info.file_str)
- XDBG_REPLY ("file(%s) ", xdbg_dump_info.file_str);
-
- /* crop */
- if (xdbg_dump_info.crop_str)
- {
- int i;
- char temp[64];
- char *c;
- int nums[4];
-
- if (xdbg_dump_info.crop)
- {
- free (xdbg_dump_info.crop);
- xdbg_dump_info.crop = NULL;
- }
-
- snprintf (temp, sizeof (temp), "%s", xdbg_dump_info.crop_str);
-
- c = strtok (temp, ",");
- i = 0;
- while (c != NULL)
- {
- nums[i++] = atoi(c);
- c = strtok (NULL, ",");
- if (i == 4)
- break;
- }
-
- if (i == 4)
- {
- xdbg_dump_info.crop = calloc (1, sizeof (xRectangle));
- XDBG_RETURN_IF_FAIL (xdbg_dump_info.crop != NULL);
-
- xdbg_dump_info.crop->x = nums[0];
- xdbg_dump_info.crop->y = nums[1];
- xdbg_dump_info.crop->width = nums[2];
- xdbg_dump_info.crop->height = nums[3];
-
- XDBG_REPLY ("crop(%d,%d %dx%d) ",
- nums[0], nums[1], nums[2], nums[3]);
- }
- }
-
- XDBG_DEBUG (MXDBG, "%s\n", options);
-}
-
-static void
-_xDbgDumpInit (void)
-{
- if (xdbg_dump_info.init)
- return;
-
- xdbg_dump_info.init = TRUE;
- xdbg_dump_info.cursor = NULL;
- xorg_list_init (&xdbg_dump_info.buffers);
-}
-
-static int
-_xDbgDumpBmp (const char * file, const void * data, int width, int height)
-{
- int i;
-
- struct
- {
- unsigned char magic[2];
- } bmpfile_magic = { {'B', 'M'} };
-
- struct
- {
- unsigned int filesz;
- unsigned short creator1;
- unsigned short creator2;
- unsigned int bmp_offset;
- } bmpfile_header = { 0, 0, 0, 0x36 };
-
- struct
- {
- unsigned int header_sz;
- unsigned int width;
- unsigned int height;
- unsigned short nplanes;
- unsigned short bitspp;
- unsigned int compress_type;
- unsigned int bmp_bytesz;
- unsigned int hres;
- unsigned int vres;
- unsigned int ncolors;
- unsigned int nimpcolors;
- } bmp_dib_v3_header_t = { 0x28, 0, 0, 1, 24, 0, 0, 0, 0, 0, 0 };
- unsigned int * blocks;
-
- XDBG_RETURN_VAL_IF_FAIL (file != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (data != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (width > 0, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (height > 0, FALSE);
-
- FILE * fp = fopen (file, "w+");
- XDBG_RETURN_VAL_IF_FAIL (fp != NULL, FALSE);
-
- bmpfile_header.filesz = sizeof (bmpfile_magic) + sizeof (bmpfile_header) +
- sizeof (bmp_dib_v3_header_t) + width * height * 3;
- bmp_dib_v3_header_t.header_sz = sizeof (bmp_dib_v3_header_t);
- bmp_dib_v3_header_t.width = width;
- bmp_dib_v3_header_t.height = -height;
- bmp_dib_v3_header_t.nplanes = 1;
- bmp_dib_v3_header_t.bmp_bytesz = width * height * 3;
-
- fwrite (&bmpfile_magic, sizeof (bmpfile_magic), 1, fp);
- fwrite (&bmpfile_header, sizeof (bmpfile_header), 1, fp);
- fwrite (&bmp_dib_v3_header_t, sizeof (bmp_dib_v3_header_t), 1, fp);
-
- blocks = (unsigned int*)data;
- for (i=0; i<height * width; i++)
- fwrite (&blocks[i], 3, 1, fp);
-
- fclose (fp);
-
- XDBG_TRACE (MXDBG, "%s saved\n", file);
-
- return TRUE;
-}
-
-static Bool
-_xDbgDumpRaw (const char * file, const void * data, int size)
-{
- XDBG_RETURN_VAL_IF_FAIL (file != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (data != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (size > 0, FALSE);
-
- FILE * fp = fopen (file, "w+");
- XDBG_RETURN_VAL_IF_FAIL (fp != NULL, FALSE);
-
- unsigned int *blocks = (unsigned int*)data;
- fwrite (blocks, 1, size, fp);
- fclose (fp);
-
- XDBG_TRACE (MXDBG, "%s saved\n", file);
-
- return TRUE;
-}
-
-API Bool
-xDbgDumpSetType (char *type_str)
-{
- XDBG_RETURN_VAL_IF_FAIL (type_str != NULL, FALSE);
-
- _xDbgDumpInit ();
-
- if (!xorg_list_is_empty (&xdbg_dump_info.buffers))
- {
- XDBG_ERROR (MXDBG, "can't set.\n");
- return FALSE;
- }
-
- if (xdbg_dump_info.type_str)
- free (xdbg_dump_info.type_str);
-
- xdbg_dump_info.type_str = strdup (type_str);
- XDBG_DEBUG (MXDBG, "type_str: %s\n", xdbg_dump_info.type_str);
-
- return TRUE;
-}
-
-API Bool
-xDbgDumpSetFile (char *file_str)
-{
- XDBG_RETURN_VAL_IF_FAIL (file_str != NULL, FALSE);
-
- _xDbgDumpInit ();
-
- if (!xorg_list_is_empty (&xdbg_dump_info.buffers))
- {
- XDBG_ERROR (MXDBG, "can't set.\n");
- return FALSE;
- }
-
- if (xdbg_dump_info.file_str)
- free (xdbg_dump_info.file_str);
-
- xdbg_dump_info.file_str = strdup (file_str);
- XDBG_DEBUG (MXDBG, "file_str: %s\n", xdbg_dump_info.file_str);
-
- return TRUE;
-}
-
-API Bool
-xDbgDumpSetCount (char *count_str)
-{
- XDBG_RETURN_VAL_IF_FAIL (count_str != NULL, FALSE);
-
- _xDbgDumpInit ();
-
- if (!xorg_list_is_empty (&xdbg_dump_info.buffers))
- {
- XDBG_ERROR (MXDBG, "can't set.\n");
- return FALSE;
- }
-
- if (xdbg_dump_info.count_str)
- free (xdbg_dump_info.count_str);
-
- xdbg_dump_info.count_str = strdup (count_str);
- XDBG_DEBUG (MXDBG, "count_str: %s\n", xdbg_dump_info.count_str);
-
- return TRUE;
-}
-
-API Bool
-xDbgDumpSetCrop (char *crop_str)
-{
- XDBG_RETURN_VAL_IF_FAIL (crop_str != NULL, FALSE);
-
- _xDbgDumpInit ();
-
- if (!xorg_list_is_empty (&xdbg_dump_info.buffers))
- {
- XDBG_ERROR (MXDBG, "can't set.\n");
- return FALSE;
- }
-
- if (xdbg_dump_info.crop_str)
- free (xdbg_dump_info.crop_str);
-
- xdbg_dump_info.crop_str = strdup (crop_str);
- XDBG_DEBUG (MXDBG, "crop_str: %s\n", xdbg_dump_info.crop_str);
-
- return TRUE;
-}
-
-API char*
-xDbgDumpGetType (void)
-{
- return xdbg_dump_info.type_str;
-}
-
-API char*
-xDbgDumpGetFile (void)
-{
- return xdbg_dump_info.file_str;
-}
-
-API char*
-xDbgDumpGetCount (void)
-{
- return xdbg_dump_info.count_str;
-}
-
-API char*
-xDbgDumpGetCrop (void)
-{
- return xdbg_dump_info.crop_str;
-}
-
-API Bool
-xDbgDumpPrepare (void)
-{
- int i;
-
- _xDbgDumpInit ();
-
- if (!xorg_list_is_empty (&xdbg_dump_info.buffers))
- return TRUE;
-
- _xDbgDumpSetOptions ();
-
- for (i = 0; i < xdbg_dump_info.count; i++)
- {
- xDbgDumpBuffer *dumpbuf = calloc (1, sizeof (xDbgDumpBuffer));
- XDBG_GOTO_IF_FAIL (dumpbuf != NULL, fail);
-
- xorg_list_add (&dumpbuf->link, &xdbg_dump_info.buffers);
- dumpbuf->index = i;
- dumpbuf->bo_size = xdbg_dump_info.bo_size;
- if (xdbg_dump_info.func.alloc)
- {
- dumpbuf->bo = xdbg_dump_info.func.alloc (dumpbuf->bo_size);
- XDBG_GOTO_IF_FAIL (dumpbuf->bo != NULL, fail);
- }
- }
-
- xdbg_dump_info.cursor = &xdbg_dump_info.buffers;
-
- return TRUE;
-fail:
- xDbgDumpClear ();
- return FALSE;
-}
-
-API void
-xDbgDumpSave (void)
-{
- xDbgDumpBuffer *cur = NULL, *next = NULL;
-
- _xDbgDumpInit ();
-
- if (!_xDbgDumpEnsureDir ())
- return;
-
- xorg_list_for_each_entry_safe (cur, next, &xdbg_dump_info.buffers, link)
- {
- char file[128];
- void *ptr;
-
- if (!cur->is_dirty)
- continue;
-
- if (xdbg_dump_info.func.map)
- ptr = xdbg_dump_info.func.map (cur->bo);
- else
- ptr = cur->bo;
- XDBG_GOTO_IF_FAIL (ptr != NULL, reset_dump);
-
- snprintf (file, sizeof(file), "%s/%s", DUMP_DIR, cur->file);
-
- if (cur->is_bmp)
- {
- unsigned int *p = (unsigned int*)ptr;
- int i, j;
-
- /* fill magenta color(#FF00FF) for background */
- for (j = 0; j < cur->u.a.dump_h; j++)
- for (i = 0; i < cur->u.a.dump_w ; i++)
- {
- if (i >= cur->u.a.dump_rect.x && i < (cur->u.a.dump_rect.x + cur->u.a.dump_rect.width))
- if (j >= cur->u.a.dump_rect.y && j < (cur->u.a.dump_rect.y + cur->u.a.dump_rect.height))
- continue;
- p[i + j * cur->u.a.dump_w] = 0xFFFF00FF;
- }
-
- _xDbgDumpBmp (file, ptr, cur->u.a.dump_w, cur->u.a.dump_h);
-
- if (xdbg_dump_info.file_str && !strcmp (xdbg_dump_info.file_str, "raw"))
- {
- snprintf (file, sizeof(file), "%s/%s.raw", DUMP_DIR, cur->file);
- _xDbgDumpRaw (file, ptr, cur->u.a.dump_w*cur->u.a.dump_h*4);
- }
- }
- else
- {
- _xDbgDumpRaw (file, ptr, cur->u.dump_size);
- }
-
- if (xdbg_dump_info.func.unmap)
- xdbg_dump_info.func.unmap (cur->bo);
-
-reset_dump:
- cur->file[0] = '\0';
- memset (&cur->u, 0, sizeof (cur->u));
- cur->is_dirty = FALSE;
- cur->is_bmp = FALSE;
- }
-}
-
-API void
-xDbgDumpClear (void)
-{
- xDbgDumpBuffer *cur = NULL, *next = NULL;
-
- _xDbgDumpInit ();
-
- xorg_list_for_each_entry_safe (cur, next, &xdbg_dump_info.buffers, link)
- {
- if (xdbg_dump_info.func.free)
- xdbg_dump_info.func.free (cur->bo);
- xorg_list_del (&cur->link);
- free (cur);
- }
-
- xdbg_dump_info.cursor = NULL;
-
- xdbg_dump_info.type = XDBG_DUMP_TYPE_NONE;
- xdbg_dump_info.count = 0;
- if (xdbg_dump_info.crop)
- {
- free (xdbg_dump_info.crop);
- xdbg_dump_info.crop = NULL;
- }
-
- XDBG_DEBUG (MXDBG, "\n");
-}
-
-API Bool
-xDbgDumpSetBufferFunc (xDbgDumpBufferFunc *func, int bo_size)
-{
- XDBG_RETURN_VAL_IF_FAIL (bo_size > 0, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (func != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (func->alloc != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (func->free != NULL, FALSE);
- if (func->map)
- XDBG_RETURN_VAL_IF_FAIL (func->unmap != NULL, FALSE);
-
- _xDbgDumpInit ();
-
- xdbg_dump_info.func = *func;
- xdbg_dump_info.bo_size = bo_size;
-
- XDBG_INFO (MXDBG, "\n");
-
- return TRUE;
-}
-
-API Bool
-xDbgDumpIsEnable (xDbgDumpType type)
-{
- return (xdbg_dump_info.type & type) ? TRUE : FALSE;
-}
-
-API void
-xDbgDumpRaw (void *data, xDbgDumpType type, void *var_buf, const char *file)
-{
- xDbgDumpBuffer *dumpbuf;
- struct xorg_list *next_cursor;
-
- XDBG_RETURN_IF_FAIL (type > 0);
- XDBG_RETURN_IF_FAIL (var_buf != NULL);
- XDBG_RETURN_IF_FAIL (file != NULL);
-
- _xDbgDumpInit ();
- if (xorg_list_is_empty (&xdbg_dump_info.buffers))
- {
- XDBG_WARNING (MXDBG, "not ready to dump\n");
- return;
- }
-
- next_cursor = xdbg_dump_info.cursor->next;
- XDBG_RETURN_IF_FAIL (next_cursor != NULL);
-
- if (next_cursor == &xdbg_dump_info.buffers)
- {
- next_cursor = next_cursor->next;
- XDBG_RETURN_IF_FAIL (next_cursor != NULL);
- }
-
- dumpbuf = xorg_list_entry (next_cursor, xDbgDumpBuffer, link);
- XDBG_RETURN_IF_FAIL (dumpbuf != NULL);
-
- if (xdbg_dump_info.func.dumpRaw)
- {
- Bool ret;
- int dump_size = 0;
-
- ret = xdbg_dump_info.func.dumpRaw (data, type,
- var_buf, dumpbuf->bo, dumpbuf->bo_size,
- &dump_size);
- XDBG_RETURN_IF_FAIL (ret == TRUE);
- XDBG_RETURN_IF_FAIL (dump_size > 0);
- XDBG_RETURN_IF_FAIL (dump_size <= dumpbuf->bo_size);
-
- snprintf (dumpbuf->file, sizeof (dumpbuf->file), "%.3f_%s", GetTimeInMillis()/1000.0, file);
- dumpbuf->u.dump_size = dump_size;
- dumpbuf->is_dirty = TRUE;
- dumpbuf->is_bmp = FALSE;
-
- xdbg_dump_info.cursor = next_cursor;
- }
-
- XDBG_DEBUG (MXDBG, "type:0x%x file: %s\n", type, file);
-}
-
-API void
-xDbgDumpBmp (void *data, xDbgDumpType type, void *var_buf, const char *file)
-{
- xDbgDumpBuffer *dumpbuf;
- struct xorg_list *next_cursor;
-
- XDBG_RETURN_IF_FAIL (type > 0);
- XDBG_RETURN_IF_FAIL (var_buf != NULL);
- XDBG_RETURN_IF_FAIL (file != NULL);
-
- _xDbgDumpInit ();
- if (xorg_list_is_empty (&xdbg_dump_info.buffers))
- {
- XDBG_WARNING (MXDBG, "not ready to dump\n");
- return;
- }
-
- next_cursor = xdbg_dump_info.cursor->next;
- XDBG_RETURN_IF_FAIL (next_cursor != NULL);
-
- if (next_cursor == &xdbg_dump_info.buffers)
- {
- next_cursor = next_cursor->next;
- XDBG_RETURN_IF_FAIL (next_cursor != NULL);
- }
-
- dumpbuf = xorg_list_entry (next_cursor, xDbgDumpBuffer, link);
- XDBG_RETURN_IF_FAIL (dumpbuf != NULL);
-
- if (xdbg_dump_info.func.dumpBmp)
- {
- Bool ret;
- int dump_w = 0, dump_h = 0;
- xRectangle dump_rect = {0,};
-
- ret = xdbg_dump_info.func.dumpBmp (data, type,
- var_buf, dumpbuf->bo, dumpbuf->bo_size,
- &dump_w, &dump_h, &dump_rect);
- XDBG_RETURN_IF_FAIL (ret == TRUE);
- XDBG_RETURN_IF_FAIL (dump_w > 0);
- XDBG_RETURN_IF_FAIL (dump_h > 0);
- XDBG_RETURN_IF_FAIL (dump_rect.width > 0);
- XDBG_RETURN_IF_FAIL (dump_rect.height > 0);
-
- snprintf (dumpbuf->file, sizeof (dumpbuf->file), "%.3f_%s", GetTimeInMillis()/1000.0, file);
- dumpbuf->u.a.dump_w = dump_w;
- dumpbuf->u.a.dump_h = dump_h;
- dumpbuf->u.a.dump_rect = dump_rect;
- dumpbuf->is_dirty = TRUE;
- dumpbuf->is_bmp = TRUE;
-
- xdbg_dump_info.cursor = next_cursor;
- }
-
- XDBG_DEBUG (MXDBG, "type:0x%x file: %s\n", type, file);
-}
-
-API Bool
-xDbgDumpReplaceBuffer (void *old_dump_buf, void *new_dump_buf, int new_dump_buf_size)
-{
- xDbgDumpBuffer *cur = NULL, *next = NULL;
-
- XDBG_RETURN_VAL_IF_FAIL (new_dump_buf != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (new_dump_buf_size > 0, FALSE);
-
- _xDbgDumpInit ();
-
- xorg_list_for_each_entry_safe (cur, next, &xdbg_dump_info.buffers, link)
- {
- if (cur->bo == old_dump_buf)
- {
- if (xdbg_dump_info.func.free)
- xdbg_dump_info.func.free (cur->bo);
-
- cur->bo = new_dump_buf;
- cur->bo_size = new_dump_buf_size;
- return TRUE;
- }
- }
-
- return FALSE;
-}
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#if defined(XDBG_CLIENT)
-#error "This header is not for client."
-#endif
-
-#ifndef __XDBG_DUMP_H__
-#define __XDBG_DUMP_H__
-
-#include <X11/Xdefs.h>
-#include <X11/Xprotostr.h>
-
-/* "xdbg dump" is designed for "x video driver" to dump various buffers without
- * losing performance. When it starts, it allocates 50 dump-buffers by default.
- * You can change the count of dump-buffers with "-count" option. After starting,
- * various buffers will be copied into dump-buffers. Finally when it stops,
- * all copied buffers will be saved into "/tmp/xdump" directory.
- * You can use "-type" option to distinguish the type of various buffers inside of
- * x video driver.
- *
- * # xdbg dump on //begin
- * # xdbg dump off //off with saving
- * # xdbg dump clear //off without saving
- * # xdbg dump -count [n]
- * # xdbg dump -type [drawable|fb|ui|video]
- * # xdbg dump on -type ui -count 100
- * # xdbg dump -type 0x2000 //user-defined type(number only)
- * # xdbg dump -crop 10,10,200,200 //dump only (10,10 200x200) area
- */
-typedef enum
-{
- XDBG_DUMP_TYPE_NONE = 0x00000000,
- XDBG_DUMP_TYPE_DRAWABLE = 0x00000001,
- XDBG_DUMP_TYPE_FB = 0x00000010,
- XDBG_DUMP_TYPE_UI = 0x00000011,
- XDBG_DUMP_TYPE_VIDEO = 0x00000100,
-} xDbgDumpType;
-
-/* "xDbgDumpBufferFunc" should be implemented in "x video driver". */
-typedef struct
-{
- /* [in ] dump_buf_size: size of dump-buffer
- * [out] a newly-allocated dump-buffer
- */
- void* (*alloc) (int dump_buf_size);
-
- /* map() should return virtual address of dump-buffer. If alloc() returns
- * virtual address, map() and unmap() can be NULL. Don't need to implement.
- * [in ] dump_buf: a dump-buffer
- * [out] virtual address of a dump-buffer
- */
- void* (*map) (void *dump_buf);
- void (*unmap) (void *dump_buf);
- void (*free) (void *dump_buf);
-
- /* xDbgDumpBmp() calls dumpBum(). Returned dump_w, dump_h and dump_rect will
- * be used when a dump-buffer is saved to a bmp file.
- * If you don't call xDbgDumpBmp(), dumpBmp() can be NULL.
- * [in ] data: user-data
- * [in ] type: dump-type
- * [in ] var_buf: various buffer
- * [in ] dump_buf: a dump-buffer
- * [in ] dump_buf_size: size of dump-buffer
- * [out] dump_w: a dump-buffer's width
- * [out] dump_h a dump-buffer's height
- * [out] dump_rect: rect which contains copied-image within a dump-buffer
- * [out] TRUE if success to copy, FALSE if fail
- */
- Bool (*dumpBmp) (void *data, xDbgDumpType type,
- void *var_buf, void *dump_buf, int dump_buf_size,
- int *dump_w, int *dump_h, xRectangle *dump_rect);
-
- /* xDbgDumpRaw() calls dumpRaw(). Returned dump_size will be used when a
- * dump-buffer is saved to a raw file.
- * If you don't call xDbgDumpRaw(), dumpRaw() can be NULL.
- * [in ] data: user-data
- * [in ] type: dump-type
- * [in ] var_buf: various buffer
- * [in ] dump_buf: a dump-buffer
- * [in ] dump_buf_size: size of dump-buffer
- * [out] dump_size: size which contains copied-image in a dump-buffer
- * [out] TRUE if success to copy, FALSE if fail
- */
- Bool (*dumpRaw) (void *data, xDbgDumpType type,
- void *var_buf, void *dump_buf, int dump_buf_size,
- int *dump_size);
-
- void (*reserved1) (void);
- void (*reserved2) (void);
- void (*reserved3) (void);
- void (*reserved4) (void);
-} xDbgDumpBufferFunc;
-
-/* Register dump-buffer-functions and set max-size of a dump-buffer.
- * [in ] func: dump-buffer-functions
- * [in ] dump_buf_size: dump-buffer size. alloc() receives this size.
- * [out] TRUE if success, FALSE if fail
- */
-Bool xDbgDumpSetBufferFunc (xDbgDumpBufferFunc *func, int dump_buf_size);
-
-/* Check if "xdbg dump" is on.
- * [in ] type: dump-type
- * [out] TRUE if on, FALSE if off
- *
- * Sample:
- * if (xDbgDumpIsEnable (XDBG_DUMP_TYPE_UI))
- * xDbgDumpBmp (scrn, XDBG_DUMP_TYPE_UI, pPixmap, "drawable_1.bmp");
- *
- * if (xDbgDumpIsEnable (XDBG_DUMP_TYPE_VIDEO))
- * xDbgDumpRaw (scrn, XDBG_DUMP_TYPE_VIDEO, yuv_buffer, "video_1.yuv");
- */
-Bool xDbgDumpIsEnable (xDbgDumpType type);
-
-/* Dump various buffer as raw file
- * [in ] data: user-data
- * [in ] type: dump-type
- * [in ] var_buf: various buffer
- * [in ] file: filename to save
- */
-void xDbgDumpRaw (void *data, xDbgDumpType type, void *var_buf, const char *file);
-
-/* Dump various buffer as bmp file
- * [in ] data: user-data
- * [in ] type: dump-type
- * [in ] var_buf: various buffer
- * [in ] file: filename to save
- */
-void xDbgDumpBmp (void *data, xDbgDumpType type, void *var_buf, const char *file);
-
-/* Replace a old dump-buffer to a new dump-buffer.
- * [in ] old_dump_buf: old dump-buffer
- * [in ] new_dump_buf: new dump-buffer
- * [in ] new_dump_buf_size: new dump-buffer's size
- * [out] TRUE if success, FALSE if fail
- */
-Bool xDbgDumpReplaceBuffer (void *old_dump_buf, void *new_dump_buf, int new_dump_buf_size);
-
-#endif /* __XDBG_DUMP_H__ */
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#if defined(XDBG_CLIENT)
-#error "This header is not for client."
-#endif
-
-#ifndef __XDBG_DUMP_MODULE_H__
-#define __XDBG_DUMP_MODULE_H__
-
-#include <X11/Xdefs.h>
-#include <X11/Xprotostr.h>
-#include "xdbg_dump.h"
-
-Bool xDbgDumpSetType (char *type_str);
-Bool xDbgDumpSetFile (char *file_str);
-Bool xDbgDumpSetCount (char *count_str);
-Bool xDbgDumpSetCrop (char *crop_str);
-char* xDbgDumpGetType (void);
-char* xDbgDumpGetFile (void);
-char* xDbgDumpGetCount (void);
-char* xDbgDumpGetCrop (void);
-
-Bool xDbgDumpPrepare (void);
-void xDbgDumpSave (void);
-void xDbgDumpClear (void);
-
-#endif /* __XDBG_DUMP_MODULE_H__ */
#include <time.h>
#include <string.h>
#include <stdarg.h>
+#if ENABLE_DLOG
#include <dlog.h>
+#endif
#include "xdbg_log.h"
#ifndef API
#include <stdlib.h>
#include <xorg-server.h>
#include <os.h>
-#include <xdbg_log_secure.h>
unsigned int xDbgLogGetModule (char *name);
Bool xDbgGetLogEnableDlog ();
#define XDBG_ERRNO(mod, fmt, ARG...) XLOG_ERROR(mod, "[%s](err=%s(%d)) "fmt, __FUNCTION__, strerror(errno), errno, ##ARG)
#define XDBG_KLOG(mod, fmt, ARG...) XLOG_KLOG(mod, "[%s] "fmt, __FUNCTION__, ##ARG)
-#if TIZEN_ENGINEER_MODE
-#define XDBG_SECURE(mod, fmt, ARG...) XLOG_SECURE(mod, "[%s] "fmt, __FUNCTION__, ##ARG)
-#else
-#if USE_NORMAL_LOG
-#define XDBG_SECURE(mod, fmt, ARG...) XLOG_INFO(mod, "[%s] "fmt, __FUNCTION__, ##ARG)
-#else
-#define XDBG_SECURE(mod, fmt, ARG...) do { } while(0)
-#endif
-#endif
-
#define XDBG_NEVER_GET_HERE(mod) XLOG_ERROR(mod, "[%s:%d] ** NEVER GET HERE **\n", __FUNCTION__,__LINE__)
#define XDBG_WARNING_IF_FAIL(cond) {if (!(cond)) { XDBG_ERROR (MXDBG, "'%s' failed.\n", #cond);}}
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include "xdbg.h"
-#include "xdbg_log_int.h"
-#include "xdbg_types.h"
-#include <list.h>
-
-#ifndef API
-#define API __attribute__ ((visibility("default")))
-#endif
-
-typedef struct _xdbgVblankInfo
-{
- int crtc_pipe;
- unsigned int client_idx;
- unsigned int draw_id;
- int flag;
- unsigned long time;
- struct xorg_list link;
-} XDbgVblankInfo, *XDbgVblankInfoPtr;
-
-typedef struct _xdbgPageFlipInfo
-{
- int crtc_pipe;
- unsigned int client_idx;
- unsigned int draw_id;
- unsigned long time;
- struct xorg_list link;
-} XDbgPageFlipInfo, *XDbgPageFlipInfoPtr;
-
-static int init_drmevent = 0;
-static struct xorg_list vblank_event_list;
-static struct xorg_list pageflip_event_list;
-
-API void
-xDbgLogDrmEventInit ()
-{
- init_drmevent = 1;
-
- xorg_list_init (&vblank_event_list);
- xorg_list_init (&pageflip_event_list);
-}
-
-API void
-xDbgLogDrmEventDeInit ()
-{
- /* TODO: delete all link(xorg_list_del) in the two list */
-}
-
-API void *
-xDbgLogDrmEventAddVblank ( int crtc_pipe, unsigned int client_idx, unsigned int draw_id, int flag)
-{
- XDbgVblankInfoPtr pVblankInfo = NULL;
-
- pVblankInfo = calloc (1, sizeof (XDbgVblankInfo));
- if (!pVblankInfo)
- return NULL;
-
- pVblankInfo->crtc_pipe = crtc_pipe;
- pVblankInfo->client_idx = client_idx;
- pVblankInfo->draw_id = draw_id;
- pVblankInfo->flag = flag;
- pVblankInfo->time =GetTimeInMillis();
-
- xorg_list_init(&pVblankInfo->link);
- xorg_list_add(&pVblankInfo->link, &vblank_event_list);
-
- return (void *)pVblankInfo;
-}
-
-API void
-xDbgLogDrmEventRemoveVblank (void *vblank_data)
-{
- XDbgVblankInfoPtr pVblankInfo = (XDbgVblankInfoPtr) vblank_data;
-
- xorg_list_del (&pVblankInfo->link);
- free (pVblankInfo);
- pVblankInfo = NULL;
-}
-
-API void *
-xDbgLogDrmEventAddPageflip (int crtc_pipe, unsigned int client_idx, unsigned int draw_id)
-{
- XDbgPageFlipInfoPtr pPageFlipInfo = NULL;
-
- pPageFlipInfo = calloc (1, sizeof (XDbgPageFlipInfo));
- if (!pPageFlipInfo)
- return NULL;
-
- pPageFlipInfo->crtc_pipe = crtc_pipe;
- pPageFlipInfo->client_idx = client_idx;
- pPageFlipInfo->draw_id = draw_id;
- pPageFlipInfo->time =GetTimeInMillis();
-
- xorg_list_init(&pPageFlipInfo->link);
- xorg_list_add(&pPageFlipInfo->link, &pageflip_event_list);
-
- return (void *)pPageFlipInfo;
-}
-
-API void
-xDbgLogDrmEventRemovePageflip (void *pageflip_data)
-{
- XDbgPageFlipInfoPtr pPageFlipInfo = (XDbgPageFlipInfoPtr) pageflip_data;
-
- xorg_list_del (&pPageFlipInfo->link);
- free (pPageFlipInfo);
- pPageFlipInfo = NULL;
-}
-
-API void
-xDbgLogDrmEventPendingLists ( char *reply, int *len)
-{
- XDbgVblankInfoPtr vblank_ref = NULL;
- XDbgVblankInfoPtr vblank_next = NULL;
- XDbgPageFlipInfoPtr flip_ref = NULL;
- XDbgPageFlipInfoPtr flip_next = NULL;
- Bool check_flip = FALSE;
- Bool check_vblank = FALSE;
-
- if (!init_drmevent)
- {
- XDBG_REPLY ("drmevent_pending is not supported.\n");
- return;
- }
-
-
- XDBG_REPLY ("[vblank event pending]\n");
- xorg_list_for_each_entry_safe (vblank_ref, vblank_next, &vblank_event_list, link)
- {
- check_vblank = TRUE;
-
- if (vblank_ref->flag > -1)
- {
- XDBG_REPLY ("req_time client_id draw_id crtc_pipe vblank_type\n");
- XDBG_REPLY ("[%10.3f] %5d 0x%x %5d %5d\n",
- (double)vblank_ref->time/1000.0,
- (unsigned int)vblank_ref->client_idx,
- (unsigned int)vblank_ref->draw_id, vblank_ref->crtc_pipe, vblank_ref->flag);
- }
- else
- {
- XDBG_REPLY ("req_time vblank_type\n");
- XDBG_REPLY ("[%10.3f] %d\n", (double)vblank_ref->time/1000.0, vblank_ref->flag);
- }
- }
- if (!check_vblank)
- XDBG_REPLY ("\t no pending events\n");
-
- XDBG_REPLY ("[flip event pending]\n");
- xorg_list_for_each_entry_safe (flip_ref, flip_next, &pageflip_event_list, link)
- {
- check_flip = TRUE;
-
- XDBG_REPLY ("req_time client_id draw_id crtc_pipe\n");
- XDBG_REPLY ("[%10.3f] %5d 0x%x %4d\n",
- (double)flip_ref->time/1000.0, (unsigned int)flip_ref->client_idx,
- (unsigned int)flip_ref->draw_id, flip_ref->crtc_pipe);
- }
- if (!check_flip)
- XDBG_REPLY ("\t no pending events\n");
-}
-
-
-
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#if defined(XDBG_CLIENT)
-#error "This header is not for client."
-#endif
-
-#ifndef __XDBG_LOG_DRMEVENT_H__
-#define __XDBG_LOG_DRMEVENT_H__
-
-void xDbgLogDrmEventInit (void);
-void xDbgLogDrmEventDeInit (void);
-
-void * xDbgLogDrmEventAddVblank ( int crtc_pipe, unsigned int client_idx, unsigned int draw_id, int flag);
-void xDbgLogDrmEventRemoveVblank (void *vblank_data);
-
-void *xDbgLogDrmEventAddPageflip (int crtc_pipe, unsigned int client_idx, unsigned int draw_id);
-void xDbgLogDrmEventRemovePageflip (void *pageflip_data);
-
-#endif /* __XDBG_LOG_DRMEVENT_H__ */
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdint.h>
-#include <sys/types.h>
-#include <xf86drm.h>
-#include "xorg-server.h"
-#include "xdbg.h"
-#include "xdbg_log_int.h"
-#include "xdbg_types.h"
-#include "xdbg_log_fpsdebug.h"
-
-#ifndef API
-#define API __attribute__ ((visibility("default")))
-#endif
-
-#define FPS_DEBUG_TIMER_INTERVAL 500
-
-static int init_fpsdebug = 0;
-static Bool g_on = FALSE;
-
-struct _fpsDebug
-{
- int nPanCount;
- CARD32 tStart, tCur, tLast;
- OsTimerPtr fpsTimer;
- int connector_type;
- int cid;
-};
-
-static struct
-{
- int type;
- const char *name;
-} connector_list[] =
-{
- { DRM_MODE_CONNECTOR_Unknown, "unknown" },
- { DRM_MODE_CONNECTOR_VGA, "VGA" },
- { DRM_MODE_CONNECTOR_DVII, "DVI-I" },
- { DRM_MODE_CONNECTOR_DVID, "DVI-D" },
- { DRM_MODE_CONNECTOR_DVIA, "DVI-A" },
- { DRM_MODE_CONNECTOR_Composite, "composite" },
- { DRM_MODE_CONNECTOR_SVIDEO, "s-video" },
- { DRM_MODE_CONNECTOR_LVDS, "LVDS" },
- { DRM_MODE_CONNECTOR_Component, "component" },
- { DRM_MODE_CONNECTOR_9PinDIN, "9-pin DIN" },
- { DRM_MODE_CONNECTOR_DisplayPort, "displayport" },
- { DRM_MODE_CONNECTOR_HDMIA, "HDMI-A" },
- { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" },
- { DRM_MODE_CONNECTOR_TV, "TV" },
- { DRM_MODE_CONNECTOR_eDP, "embedded displayport" },
- { DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" },
-};
-
-static int
-_get_connector_id (int connector_type)
-{
- int num = sizeof (connector_list) / sizeof (connector_list[0]);
- int i;
- int cid = 0;
-
- for (i = 0; i < num; i++)
- {
- if (connector_type == connector_list[i].type)
- {
- cid = i;
- break;
- }
- }
-
- return cid;
-}
-
-
-static int
-_fps_print_fps (FpsDebugPtr pFpsDebug, int isTimeOut)
-{
- double sec;
-
- sec = (double) (pFpsDebug->tLast - pFpsDebug->tStart) /1000.0;
- ErrorF ("[Xorg..V][%s][FB:(%3dframes %3.1ffps)] Dur:%3.3f...%s\n",
- connector_list[pFpsDebug->cid].name, pFpsDebug->nPanCount, pFpsDebug->nPanCount / sec,
- sec, isTimeOut ? "[TimeOut]" : "");
- pFpsDebug->nPanCount = 0;
-
- return 0;
-}
-
-static CARD32
-_fps_frame_timeout (OsTimerPtr timer, CARD32 now, pointer arg)
-{
- _fps_print_fps (arg, TRUE);
-
- return 0;
-}
-
-
-API FpsDebugPtr
-xDbgLogFpsDebugCreate ()
-{
- FpsDebugPtr pFpsDebug = NULL;
-
- init_fpsdebug = 1;
-
- pFpsDebug = calloc (1, sizeof (struct _fpsDebug));
- if (!pFpsDebug)
- {
- XDBG_ERROR (MXDBG, "fail to allocate the FpsDebug\n");
- return NULL;
- }
-
- return pFpsDebug;
-}
-
-API void
-xDbgLogFpsDebugDestroy (FpsDebugPtr pFpsDebug)
-{
- if (!pFpsDebug)
- return;
-
- free (pFpsDebug);
- pFpsDebug = NULL;
-}
-
-API void
-xDbgLogFpsDebugCount (FpsDebugPtr pFpsDebug, int connector_type)
-{
- /* if fpsdebug is off, do not count fps */
- if (!g_on)
- return;
-
- if (connector_type != pFpsDebug->connector_type)
- {
- pFpsDebug->connector_type = connector_type;
- pFpsDebug->cid = _get_connector_id (connector_type);
- }
-
- pFpsDebug->tCur = GetTimeInMillis();
- if (pFpsDebug->nPanCount && pFpsDebug->tStart + FPS_DEBUG_TIMER_INTERVAL <= pFpsDebug->tCur)
- _fps_print_fps (pFpsDebug, FALSE);
-
- if (pFpsDebug->nPanCount == 0)
- pFpsDebug->tStart = pFpsDebug->tLast;
-
- pFpsDebug->nPanCount++;
- pFpsDebug->tLast = pFpsDebug->tCur;
- pFpsDebug->fpsTimer = TimerSet (pFpsDebug->fpsTimer
- , 0, FPS_DEBUG_TIMER_INTERVAL
- , _fps_frame_timeout, pFpsDebug);
-}
-
-API void
-xDbgLogFpsDebug (char *reply, int *len, int on)
-{
- if (!init_fpsdebug)
- {
- XDBG_REPLY ("fps_debug is not supported.\n");
- return;
- }
-
- if (g_on != on)
- g_on = on;
-}
-
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#if defined(XDBG_CLIENT)
-#error "This header is not for client."
-#endif
-
-#ifndef __XDBG_LOG_FPSDEBUG_H__
-#define __XDBG_LOG_FPSDEBUG_H__
-
-typedef struct _fpsDebug *FpsDebugPtr;
-
-FpsDebugPtr xDbgLogFpsDebugCreate (void);
-void xDbgLogFpsDebugDestroy (FpsDebugPtr pFpsDebug);
-void xDbgLogFpsDebugCount (FpsDebugPtr pFpsDebug, int connector_type);
-
-#endif /* __XDBG_LOG_FPSDEBUG_H__ */
-
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef __XDBG_LOG_INT_H__
-#define __XDBG_LOG_INT_H__
-
-void xDbgLogDrmEventPendingLists ( char *reply, int *len);
-void xDbgLogFpsDebug (char *reply, int *len, int on);
-void xDbgLogPList (char *reply, int *len);
-
-#endif /* __XDBG_LOG_INT_H__ */
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include "xorg-server.h"
-#include "xf86.h"
-#include <scrnintstr.h>
-#include <resource.h>
-#include <windowstr.h>
-#include <pixmap.h>
-#include <list.h>
-#include "xdbg.h"
-#include "xdbg_log_int.h"
-#include "xdbg_types.h"
-#include "xdbg_log_plist.h"
-
-/* for debug message */
-#define MMEM XDBG_M('M','E','M',0)
-
-#ifndef API
-#define API __attribute__ ((visibility("default")))
-#endif
-
-/*=========================================================================*/
-/* trace the usage of the pixmaps in xserver */
-/*=========================================================================*/
-
-#define CLIENT_BITS(id) ((id) & RESOURCE_CLIENT_MASK)
-#define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET))
-#define MAX_HISTORY 10
-
-typedef struct {
- PixmapPtr pPixmap;
- unsigned int size;
- unsigned int refs;
- char *hint;
- XID refHistorys[MAX_HISTORY];
- int numHistory;
- struct xorg_list link;
-} XDbgPixmap;
-
-typedef struct {
- PixmapPtr pPixmap;
- struct xorg_list link;
-} XDbgRefPixmap;
-
-typedef struct {
- DrawablePtr pDraw;
- XDbgRefPixmap *pRefPixmap;
- struct xorg_list link;
- struct xorg_list refPixmaps;
-} XDbgDrawable;
-
-static int init_plist = 0;
-static struct xorg_list xdbgPixmaps;
-static struct xorg_list xdbgDrawables;
-static PixmapPtr pPixRoot = NULL;
-unsigned int total_size = 0;
-unsigned int peek_size = 0;
-
-const struct {
- unsigned int hint;
- char* str;
-} pixmap_hint[] = {
- {CREATE_PIXMAP_USAGE_SCRATCH, "scratch"},
- {CREATE_PIXMAP_USAGE_BACKING_PIXMAP, "backing_pixmap"},
- {CREATE_PIXMAP_USAGE_GLYPH_PICTURE, "glyph_picture"},
- {CREATE_PIXMAP_USAGE_SHARED, "shared"},
- {CREATE_PIXMAP_USAGE_OVERLAY, "overlay"},
- {CREATE_PIXMAP_USAGE_DRI2_FLIP_BACK, "dri2_flip_back"},
- {CREATE_PIXMAP_USAGE_FB, "fb"},
- {CREATE_PIXMAP_USAGE_SUB_FB, "sub_fb"},
- {CREATE_PIXMAP_USAGE_DRI2_BACK, "dri2_back"},
- /******END********/
- {0, "normal"}
-};
-
-static char *
-_get_pixmap_hint_name (signed int usage_hint)
-{
- int i = 0;
-
- while (pixmap_hint[i].hint)
- {
- if (pixmap_hint[i].hint == usage_hint)
- return pixmap_hint[i].str;
- i++;
- }
- return NULL;
-}
-
-static XDbgPixmap *
-_findXDbgPixmap (PixmapPtr pPixmap)
-{
- XDbgPixmap *cur = NULL, *tmp = NULL;
-
- xorg_list_for_each_entry_safe (cur, tmp, &xdbgPixmaps, link)
- {
- if (cur->pPixmap == pPixmap)
- return cur;
- }
-
- return NULL;
-}
-
-static XDbgDrawable *
-_findXDbgDrawable (DrawablePtr pDraw)
-{
- XDbgDrawable *cur = NULL, *tmp = NULL;
-
- xorg_list_for_each_entry_safe (cur, tmp, &xdbgDrawables, link)
- {
- if (cur->pDraw == pDraw)
- return cur;
- }
-
- return NULL;
-}
-
-static XDbgRefPixmap*
-_findXDbgRefPixmap (XDbgDrawable* pXDbgDrawable, PixmapPtr pPixmap)
-{
- XDbgRefPixmap *cur = NULL, *tmp = NULL;
-
- xorg_list_for_each_entry_safe (cur, tmp, &pXDbgDrawable->refPixmaps, link)
- {
- if (cur->pPixmap == pPixmap)
- return cur;
- }
-
- return NULL;
-}
-
-static void
-_addXDbgPixmap (PixmapPtr pPixmap)
-{
- XDbgPixmap *cur = NULL;
- unsigned int size;
-
- cur = _findXDbgPixmap (pPixmap);
- if (cur)
- {
- size = pPixmap->devKind * pPixmap->drawable.height;
- if (size == cur->size)
- return;
-
- XDBG_TRACE (MMEM, " Change pixmap(%p) size(%d -> %d)\n",
- cur->pPixmap, cur->size, size);
-
- total_size -= cur->size;
- cur->size = size;
- cur->hint = _get_pixmap_hint_name (pPixmap->usage_hint);
- }
- else
- {
- cur = calloc (1, sizeof (XDbgPixmap));
- cur->pPixmap = pPixmap;
- cur->size = pPixmap->devKind*pPixmap->drawable.height;
- cur->hint = _get_pixmap_hint_name (pPixmap->usage_hint);
- xorg_list_add (&cur->link, &xdbgPixmaps);
- }
-
- /* caculate the total_size of pixmaps */
- total_size += cur->size;
- if (total_size > peek_size)
- peek_size = total_size;
-
- if (pPixmap->usage_hint == CREATE_PIXMAP_USAGE_FB)
- pPixRoot = pPixmap;
-
- XDBG_TRACE (MMEM, "Add pixmap(%p) size:%d, hint:%s\n",
- cur->pPixmap, cur->size, cur->hint);
-}
-
-static void
-_removeXDbgPixmap (PixmapPtr pPixmap)
-{
- XDbgPixmap *cur = NULL;
-
- cur = _findXDbgPixmap (pPixmap);
- if (!cur)
- {
- XDBG_WARNING (MMEM, "Unknown pixmap XID:0x%x, pPix:%p\n",
- (unsigned int)pPixmap->drawable.id, pPixmap);
- return;
- }
-
- if (cur->refs > 0)
- XDBG_TRACE (MMEM,"Pixmap(%p) refs:%d\n", cur->pPixmap, cur->refs);
-
- /* caculate the total_size of pixmaps */
- total_size -= cur->size;
-
- XDBG_TRACE (MMEM, " Remove pixmap(%p) size:%d, hint:%s\n",
- cur->pPixmap, cur->size, cur->hint);
-
- xorg_list_del(&cur->link);
- free(cur);
-}
-
-#if 0
-static void
-_dumpDraws (char *reply, int *len)
-{
- XDbgDrawable *cur = NULL, *tmp = NULL;
- XDbgRefPixmap *p = NULL, *ptmp = NULL;
- XDbgPixmap *dp = NULL;
-
- xorg_list_for_each_entry_safe (cur, tmp, &xdbgDrawables, link)
- {
- XDBG_REPLY ("[%d] XID:0x%x type:%s %dx%d+%d+%d\n",
- CLIENT_ID(cur->pDraw->id),
- (unsigned int)cur->pDraw->id,
- (cur->pDraw->type == DRAWABLE_WINDOW ? "window":"pixmap"),
- cur->pDraw->width, cur->pDraw->height, cur->pDraw->x, cur->pDraw->y);
-
- xorg_list_for_each_entry_safe (p, ptmp, &cur->refPixmaps, link)
- {
- dp = _findXDbgPixmap (p->pPixmap);
- if(!dp)
- {
- XDBG_REPLY ("\t***[REF_Pixmap] unknown pixmap(%p)\n", p->pPixmap);
- continue;
- }
-
- XDBG_REPLY ("\t[REF_Pixmap] %p, hint:%s, size:%d\n",
- dp->pPixmap, dp->hint, (unsigned int)dp->size/1024);
- }
- }
-}
-
-static void
-_dumpPixmaps (char *reply, int *len)
-{
- XDbgPixmap *cur = NULL, *tmp = NULL;
- int client_id;
- int i;
-
- if (pPixRoot)
- {
- cur = _findXDbgPixmap (pPixRoot);
- XDBG_RETURN_IF_FAIL (cur != NULL);
- XDBG_REPLY ("ROOT_Pixmap XID:0x%x pixmap(%p) hint:%s(0x%x) size:%d\n",
- (unsigned int)cur->pPixmap->drawable.id, pPixRoot,
- cur->hint, cur->pPixmap->usage_hint,
- (unsigned int)cur->size/1024);
- }
-
- xorg_list_for_each_entry_safe (cur, tmp, &xdbgPixmaps, link)
- {
- if (cur->pPixmap == pPixRoot)
- continue;
-
- if (cur->pPixmap->drawable.id || cur->refs == 0)
- {
- client_id = CLIENT_ID(cur->pPixmap->drawable.id);
- if (cur->pPixmap->drawable.id)
- {
- XDBG_REPLY ("[%d] XID:0x%x %dx%d hint:%s(0x%x) size:%d refs:%d\n",
- client_id, (unsigned int)cur->pPixmap->drawable.id,
- cur->pPixmap->drawable.width, cur->pPixmap->drawable.height,
- cur->hint, cur->pPixmap->usage_hint,
- (unsigned int)cur->size/1024, cur->refs);
- }
- else
- {
- XDBG_REPLY ("[%d] Pixmap:%p %dx%d hint:%s(0x%x) size:%d refs:%d\n",
- client_id, cur->pPixmap,
- cur->pPixmap->drawable.width, cur->pPixmap->drawable.height,
- cur->hint, cur->pPixmap->usage_hint,
- (unsigned int)cur->size/1024, cur->refs);
- }
-
- if (cur->numHistory)
- {
- XDBG_REPLY ("\t[RefHistory] ");
- for (i = 0; i < cur->numHistory; i++)
- {
- XDBG_REPLY ("0x%x ", (unsigned int)cur->refHistorys[i]);
- }
- XDBG_REPLY ("\n");
- }
- }
- }
-}
-#endif
-
-CreatePixmapProcPtr fnCreatePixmap;
-DestroyPixmapProcPtr fnDestroyPixmap;
-ModifyPixmapHeaderProcPtr fnModifyPixmap;
-SetWindowPixmapProcPtr fnSetWindowPixmap;
-DestroyWindowProcPtr fnDestroyWindow;
-
-static PixmapPtr
-XDbgLogCreatePixmap (ScreenPtr pScreen, int width, int height,
- int depth, unsigned usage_hint)
-{
- PixmapPtr pPixmap = NULL;
-
- pScreen->CreatePixmap = fnCreatePixmap;
- pPixmap = pScreen->CreatePixmap(pScreen, width, height, depth, usage_hint);
- pScreen->CreatePixmap = XDbgLogCreatePixmap;
-
- if(pPixmap)
- _addXDbgPixmap (pPixmap);
-
- return pPixmap;
-}
-
-static Bool
-XDbgLogModifyPixmapHeader (PixmapPtr pPixmap, int width, int height,
- int depth, int bitsPerPixel, int devKind, pointer pPixData)
-{
- Bool ret;
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
-
- pScreen->ModifyPixmapHeader = fnModifyPixmap;
- ret = pScreen->ModifyPixmapHeader (pPixmap, width, height,
- depth, bitsPerPixel, devKind, pPixData);
- pScreen->ModifyPixmapHeader = XDbgLogModifyPixmapHeader;
-
- _addXDbgPixmap (pPixmap);
-
- return ret;
-}
-
-static Bool
-XDbgLogDestroyPixmap (PixmapPtr pPixmap)
-{
- Bool ret;
-
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
-
- if (pPixmap->refcnt == 1)
- _removeXDbgPixmap (pPixmap);
-
- pScreen->DestroyPixmap = fnDestroyPixmap;
- ret = pScreen->DestroyPixmap(pPixmap);
- pScreen->DestroyPixmap = XDbgLogDestroyPixmap;
-
- return ret;
-}
-
-static void
-XDbgLogSetWindowPixmap (WindowPtr pWin, PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = (ScreenPtr) pWin->drawable.pScreen;
- WindowPtr pParent = pWin->parent;
- XDbgDrawable *d = NULL;
- XDbgPixmap *p = NULL;
- XDbgRefPixmap *p_ref = NULL;
-
- pScreen->SetWindowPixmap = fnSetWindowPixmap;
- pScreen->SetWindowPixmap (pWin, pPixmap);
- pScreen->SetWindowPixmap = XDbgLogSetWindowPixmap;
-
- if (pPixmap != pScreen->GetWindowPixmap(pParent))
- {
- //Add to window list
- p = _findXDbgPixmap (pPixmap);
- if (!p)
- {
- XDBG_WARNING (MMEM, "Unknown pixmap(%p) hint:%s\n",
- pPixmap, _get_pixmap_hint_name(pPixmap->usage_hint));
- return;
- }
-
- d = _findXDbgDrawable (&pWin->drawable);
- if (!d)
- {
- d = calloc (1, sizeof(XDbgDrawable));
- d->pDraw = &pWin->drawable;
- xorg_list_init (&d->refPixmaps);
- xorg_list_add (&d->link, &xdbgDrawables);
- XDBG_TRACE (MMEM, " Add window(0x%x)\n", (unsigned int)pWin->drawable.id);
- }
-
- if (d->pRefPixmap)
- {
- XDBG_TRACE (MMEM, " Unset WinPixmap win(0x%x), pixmap(%p) hint:%s\n",
- (unsigned int)pWin->drawable.id, p->pPixmap, p->hint);
- xorg_list_del (&d->pRefPixmap->link);
- free (d->pRefPixmap);
- d->pRefPixmap = NULL;
- }
-
- p_ref = calloc (1, sizeof(XDbgRefPixmap));
- p_ref->pPixmap = pPixmap;
- xorg_list_init (&p_ref->link);
- xorg_list_add (&p_ref->link, &d->refPixmaps);
- d->pRefPixmap = p_ref;
-
- p->refs++;
- p->refHistorys[p->numHistory++] = pWin->drawable.id;
-
- XDBG_TRACE (MMEM, " Set WinPixmap win(0x%x), pixmap(%p) hint:%s\n",
- (unsigned int)pWin->drawable.id, p->pPixmap, p->hint);
- }
- else
- {
- //find window
- d = _findXDbgDrawable (&pWin->drawable);
-
- //remove window
- if (d && d->pRefPixmap)
- {
- p = _findXDbgPixmap (d->pRefPixmap->pPixmap);
- if (p)
- {
- if (p->refs > 0)
- p->refs--;
- else
- XDBG_WARNING (MMEM, "pixmap(%p), refs(%d)\n",
- __FUNCTION__, __LINE__, p->pPixmap, p->refs);
- }
-
- XDBG_TRACE (MMEM,"Unset WinPixmap win(0x%x): pixmap(%p) to NULL\n",
- (unsigned int)pWin->drawable.id, d->pRefPixmap->pPixmap);
-
- p_ref = _findXDbgRefPixmap (d, d->pRefPixmap->pPixmap);
- if(p_ref)
- {
- xorg_list_del (&d->pRefPixmap->link);
- free (d->pRefPixmap);
- }
- else
- XDBG_WARNING (MMEM, "Unknown refpixmap : WinPixmap win(0x%x) pixmap(%p) \n",
- (unsigned int)pWin->drawable.id, d->pRefPixmap->pPixmap);
-
- d->pRefPixmap = NULL;
-
- if (xorg_list_is_empty (&d->refPixmaps))
- {
- xorg_list_del (&d->link);
- free(d);
- }
- }
- }
-}
-
-static Bool
-XDbgLogDestroyWindow (WindowPtr pWindow)
-{
- Bool ret;
- ScreenPtr pScreen = pWindow->drawable.pScreen;
- XDbgDrawable *d = NULL;
- XDbgPixmap *p = NULL;
- XDbgRefPixmap *pos = NULL, *tmp = NULL;
-
- pScreen->DestroyWindow = fnDestroyWindow;
- ret = pScreen->DestroyWindow (pWindow);
- pScreen->DestroyWindow = XDbgLogDestroyWindow;
-
- d = _findXDbgDrawable (&pWindow->drawable);
- if (d)
- {
- XDBG_TRACE (MMEM, "Remove drawable(0x%x)\n",
- (unsigned int)pWindow->drawable.id);
-
- xorg_list_for_each_entry_safe (pos, tmp, &d->refPixmaps, link)
- {
- p = _findXDbgPixmap (pos->pPixmap);
- if(p)
- p->refs--;
-
- XDBG_TRACE (MMEM, "Remove ref_pixmap(%p), dbgPixmap(%p)\n",
- pos->pPixmap, p);
-
- xorg_list_del (&pos->link);
- free (pos);
- }
-
- xorg_list_del (&d->link);
- free (d);
- }
-
- return ret;
-}
-
-API void
-xDbgLogPListInit (ScreenPtr pScreen)
-{
- init_plist = 1;
-
- xorg_list_init (&xdbgPixmaps);
- xorg_list_init (&xdbgDrawables);
-
- fnSetWindowPixmap = pScreen->SetWindowPixmap;
- fnDestroyWindow = pScreen->DestroyWindow;
- fnCreatePixmap = pScreen->CreatePixmap;
- fnModifyPixmap = pScreen->ModifyPixmapHeader;
- fnDestroyPixmap = pScreen->DestroyPixmap;
-
- pScreen->CreatePixmap = XDbgLogCreatePixmap;
- pScreen->DestroyPixmap = XDbgLogDestroyPixmap;
- pScreen->ModifyPixmapHeader = XDbgLogModifyPixmapHeader;
- pScreen->SetWindowPixmap = XDbgLogSetWindowPixmap;
- pScreen->DestroyWindow = XDbgLogDestroyWindow;
-}
-
-API void
-xDbgLogPListDeinit (ScreenPtr pScreen)
-{}
-
-
-API void
-xDbgLogPListDrawAddRefPixmap (DrawablePtr pDraw, PixmapPtr pRefPixmap)
-{
- XDbgDrawable *d = NULL;
- XDbgPixmap *p = NULL;
- XDbgRefPixmap *p_ref = NULL;
-
- XDBG_RETURN_IF_FAIL (pDraw != NULL);
- XDBG_RETURN_IF_FAIL (pRefPixmap != NULL);
-
- d = _findXDbgDrawable (pDraw);
- p = _findXDbgPixmap (pRefPixmap);
- if(!p)
- {
- XDBG_WARNING (MMEM, "%s:%d : Unknown pixmap XID:0x%x, pPix:%p\n",
- __FUNCTION__, __LINE__,
- (unsigned int)pRefPixmap->drawable.id, pRefPixmap);
- return;
- }
-
- if (!d)
- {
- d = calloc (1, sizeof(XDbgDrawable));
- d->pDraw = pDraw;
- xorg_list_init (&d->refPixmaps);
- xorg_list_add (&d->link, &xdbgDrawables);
-
- XDBG_TRACE (MMEM, " Add window(0x%x)\n", (unsigned int)pDraw->id);
- }
-
- p_ref =_findXDbgRefPixmap (d, pRefPixmap);
- if(p_ref)
- return;
-
- p_ref = calloc (1, sizeof(XDbgRefPixmap));
- p_ref->pPixmap = pRefPixmap;
- xorg_list_init (&p_ref->link);
- xorg_list_add (&p_ref->link, &d->refPixmaps);
-
- p->refs++;
- if (p->numHistory < (MAX_HISTORY-1))
- p->refHistorys[p->numHistory++] = pDraw->id;
-
- if (pDraw->type == DRAWABLE_WINDOW)
- XDBG_TRACE (MMEM, " Add RefPixmap win(0x%x), pixmap(%p) hint:%s\n",
- (unsigned int)pDraw->id, p->pPixmap, p->hint);
- else
- XDBG_TRACE (MMEM, " Add RefPixmap pix(0x%x), pixmap(%p) hint:%s\n",
- (unsigned int)pDraw->id, p->pPixmap, p->hint);
-}
-
-API void
-xDbgLogPListDrawRemoveRefPixmap (DrawablePtr pDraw, PixmapPtr pRefPixmap)
-{
- XDbgDrawable *d = NULL;
- XDbgRefPixmap *p_ref = NULL;
- XDbgPixmap *p = NULL;
-
- p = _findXDbgPixmap (pRefPixmap);
- if (pDraw == NULL)
- {
- if (p && p->refs > 0)
- {
- XDBG_ERROR (MMEM, "Error:%s:%d null draw pixmap(%p)\n",
- __FUNCTION__, __LINE__, pRefPixmap);
- }
- return;
- }
-
- d = _findXDbgDrawable (pDraw);
- if (!d)
- {
- XDBG_WARNING (MMEM, "%s:%d : Unknown drawable XID:0x%x, pPix:%p\n",
- __FUNCTION__, __LINE__, (unsigned int)pDraw->id, pRefPixmap);
- return;
- }
-
- p_ref = _findXDbgRefPixmap (d, pRefPixmap);
- if(!p_ref)
- {
- XDBG_WARNING (MMEM, "%s:%d : Unknown refpixmap XID:0x%x, pPix:%p\n",
- __FUNCTION__, __LINE__, (unsigned int)pDraw->id, pRefPixmap);
- return;
- }
-
- xorg_list_del (&p_ref->link);
- free (p_ref);
- if (p)
- p->refs--;
-
- if (xorg_list_is_empty (&d->refPixmaps))
- {
- xorg_list_del(&d->link);
- free(d);
- }
-
- if (pDraw->type == DRAWABLE_WINDOW)
- XDBG_TRACE (MMEM, " Remove RefPixmap win(0x%x), pixmap(%p) hint:%s\n",
- (unsigned int)pDraw->id, pRefPixmap,
- _get_pixmap_hint_name(pRefPixmap->usage_hint));
- else
- XDBG_TRACE (MMEM, " Remove RefPixmap pix(0x%x), pixmap(%p) hint:%s\n",
- (unsigned int)pDraw->id, pRefPixmap,
- _get_pixmap_hint_name(pRefPixmap->usage_hint));
-}
-
-
-API void
-xDbgLogPList (char *reply, int *len)
-{
- if (!init_plist)
- {
- XDBG_REPLY ("plist is not supported.\n");
- return;
- }
-
- XDBG_REPLY ("\n\n====================================\n");
- XDBG_REPLY (" Total:%d, Peek:%d\n", (unsigned int)total_size/1024, (unsigned int)peek_size/1024);
- XDBG_REPLY ( "====================================\n");
-
- XDBG_REPLY ("== WINDOWS ==\n");
- XDbgDrawable *dd = NULL, *ddtmp = NULL;
- XDbgRefPixmap *rp = NULL, *rptmp = NULL;
- XDbgPixmap *dp = NULL;
-
- xorg_list_for_each_entry_safe (dd, ddtmp, &xdbgDrawables, link)
- {
- XDBG_REPLY ("[%d] XID:0x%x type:%s %dx%d+%d+%d\n",
- CLIENT_ID(dd->pDraw->id),
- (unsigned int)dd->pDraw->id,
- (dd->pDraw->type == DRAWABLE_WINDOW ? "window":"pixmap"),
- dd->pDraw->width, dd->pDraw->height, dd->pDraw->x, dd->pDraw->y);
-
- xorg_list_for_each_entry_safe (rp, rptmp, &dd->refPixmaps, link)
- {
- dp = _findXDbgPixmap (rp->pPixmap);
- if(!dp)
- {
- XDBG_REPLY ("\t***[REF_Pixmap] unknown pixmap(%p)\n", rp->pPixmap);
- continue;
- }
-
- XDBG_REPLY ("\t[REF_Pixmap] %p, hint:%s, size:%d\n",
- dp->pPixmap, dp->hint, (unsigned int)dp->size/1024);
- }
- }
- XDBG_REPLY ("\n");
-
-
- XDBG_REPLY ( "== PIXMAPS ==\n");
- XDbgPixmap *cur = NULL, *tmp = NULL;
- int client_id;
- int i;
-
- if (pPixRoot)
- {
- cur = _findXDbgPixmap (pPixRoot);
- XDBG_RETURN_IF_FAIL (cur != NULL);
- XDBG_REPLY ("ROOT_Pixmap XID:0x%x pixmap(%p) hint:%s(0x%x) size:%d\n",
- (unsigned int)cur->pPixmap->drawable.id, pPixRoot,
- cur->hint, cur->pPixmap->usage_hint,
- (unsigned int)cur->size/1024);
- }
-
- xorg_list_for_each_entry_safe (cur, tmp, &xdbgPixmaps, link)
- {
- if (cur->pPixmap == pPixRoot)
- continue;
-
- if (cur->pPixmap->drawable.id || cur->refs == 0)
- {
- client_id = CLIENT_ID(cur->pPixmap->drawable.id);
- if (cur->pPixmap->drawable.id)
- {
- XDBG_REPLY ("[%d] XID:0x%x %dx%d hint:%s(0x%x) size:%d refs:%d\n",
- client_id, (unsigned int)cur->pPixmap->drawable.id,
- cur->pPixmap->drawable.width, cur->pPixmap->drawable.height,
- cur->hint, cur->pPixmap->usage_hint,
- (unsigned int)cur->size/1024, cur->refs);
- }
- else
- {
- XDBG_REPLY ("[%d] Pixmap:%p %dx%d hint:%s(0x%x) size:%d refs:%d\n",
- client_id, cur->pPixmap,
- cur->pPixmap->drawable.width, cur->pPixmap->drawable.height,
- cur->hint, cur->pPixmap->usage_hint,
- (unsigned int)cur->size/1024, cur->refs);
- }
-
- if (cur->numHistory)
- {
- XDBG_REPLY ("\t[RefHistory] ");
- for (i = 0; i < cur->numHistory; i++)
- {
- XDBG_REPLY ("0x%x ", (unsigned int)cur->refHistorys[i]);
- }
- XDBG_REPLY ("\n");
- }
- }
- }
- XDBG_REPLY ("\n");
-}
-
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#if defined(XDBG_CLIENT)
-#error "This header is not for client."
-#endif
-
-#ifndef __XDBG_LOG_PLIST_H__
-#define __XDBG_LOG_PLIST_H__
-
-#include <pixmap.h>
-
-/* pixmap usage_hint stands for back-flipbuffer pixmap */
-#ifndef CREATE_PIXMAP_USAGE_DRI2_FLIP_BACK
-#define CREATE_PIXMAP_USAGE_DRI2_FLIP_BACK 0x100
-#endif
-
-/* pixmap usage_hint stands for framebuffer pixmap */
-#ifndef CREATE_PIXMAP_USAGE_FB
-#define CREATE_PIXMAP_USAGE_FB 0x101
-#endif
-
-/* pixmap usage_hint stands for sub-framebuffer pixmap */
-#ifndef CREATE_PIXMAP_USAGE_SUB_FB
-#define CREATE_PIXMAP_USAGE_SUB_FB 0x202
-#endif
-
-/* pixmap usage_hint stands for backbuffer pixmap */
-#ifndef CREATE_PIXMAP_USAGE_DRI2_BACK
-#define CREATE_PIXMAP_USAGE_DRI2_BACK 0x404
-#endif
-
-void xDbgLogPListInit (ScreenPtr pScreen);
-void xDbgLogPListDeInit (ScreenPtr pScreen);
-
-void xDbgLogPListDrawAddRefPixmap (DrawablePtr pDraw, PixmapPtr pRefPixmap);
-void xDbgLogPListDrawRemoveRefPixmap (DrawablePtr pDraw, PixmapPtr pRefPixmap);
-
-#endif /* __XDBG_LOG_PLIST_H__ */
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#if defined(XDBG_CLIENT)
-#error "This header is not for client."
-#endif
-
-#ifndef __XDBG_LOG_SECURE_H__
-#define __XDBG_LOG_SECURE_H__
-
-#define TIZEN_ENGINEER_MODE @TIZEN_ENGINEER_MODE@
-#define USE_NORMAL_LOG @USE_NORMAL_LOG@
-
-#endif /* __XDBG_LOG_SECURE_H__ */
xdbg_module_main.c \
xdbg_module_options.c \
xdbg_module_command.c \
- xdbg_module_clist.c \
- xdbg_module_plist.c \
- xdbg_module_fpsdebug.c \
- xdbg_module_evlog.c \
- xdbg_module_drmevent.c
+ xdbg_module_evlog.c
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-
-#include "xdbg.h"
-#include "xdbg_types.h"
-#include "xdbg_module.h"
-
-
-void
-xDbgModuleCList (XDbgModule *pMod, char *reply, int *len)
-{
- int i;
-
- XDBG_REPLY ("%6s %6s %s %s\n", "INDEX", "PID", "BLOCKED", "NAME");
-
- for (i = 1; i < currentMaxClients && (0 < *len); i++)
- {
- ClientPtr pClient = clients[i];
- ModuleClientInfo *info;
-
- if (!pClient)
- continue;
-
- info = GetClientInfo (pClient);
- if (!info)
- continue;
-
- XDBG_REPLY ("%6d %6d %4d %9s\n",
- info->index, info->pid, pClient->ignoreCount, info->command);
- }
-}
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef __XDBG_MODULE_CLIST_H__
-#define __XDBG_MODULE_CLIST_H__
-
-#include "xdbg_module.h"
-
-void xDbgModuleCList (XDbgModule *pMod, char *reply, int *len);
-
-#endif /* __XDBG_MODULE_CLIST_H__ */
\ No newline at end of file
#include <xdbg.h>
#include "xdbg_types.h"
#include <xf86Priv.h>
-#include "xdbg_dump_module.h"
#include "xdbg_module.h"
-#include "xdbg_module_clist.h"
-#include "xdbg_module_plist.h"
#include "xdbg_module_evlog.h"
-#include "xdbg_module_drmevent.h"
-#include "xdbg_module_fpsdebug.h"
#include "xdbg_module_command.h"
+#if ENABLE_DLOG
static void
_CommandDLog (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
{
XDBG_REPLY ("Success\n");
}
+#endif
static Bool
_CommandSetLogFile (int pid, char *path, char *reply, int *len, XDbgModule *pMod)
}
static void
-_CommandClientList (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
-{
- if (argc != 2)
- {
- XDBG_REPLY ("Error : too few arguments\n");
- return;
- }
-
- xDbgModuleCList (pMod, reply, len);
-}
-
-static void
-_CommandPixmapList (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
-{
- if (argc != 2)
- {
- XDBG_REPLY ("Error : too few arguments\n");
- return;
- }
-
- xDbgModulePList (pMod, reply, len);
-}
-
-static void
_CommandEvlog (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
{
int on;
XDBG_REPLY ("evlog path: %s/%s\n", pMod->cwd, pMod->evlog_path);
}
-static void
-_CommandDrmEventPending (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
-{
- if (argc != 2)
- {
- XDBG_REPLY ("Error : too few arguments\n");
- return;
- }
-
- xDbgModuleDrmEventPending (pMod, reply, len);
-}
-
-static void
-_CommandFpsDebug (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
-{
- int on;
-
- if (argc != 3)
- {
- XDBG_REPLY ("Error : too few arguments\n");
- return;
- }
-
- on = atoi (argv[2]);
-
- xDbgModuleFpsDebug (pMod, on, reply, len);
-
- XDBG_REPLY ("Success\n");
-}
-
-static char *
-_printDumpOption (char *reply, int *len)
-{
- if (xDbgDumpGetType ())
- XDBG_REPLY ("type:%s ", xDbgDumpGetType ());
- if (xDbgDumpGetCount ())
- XDBG_REPLY ("count:%s ", xDbgDumpGetCount ());
- if (xDbgDumpGetFile ())
- XDBG_REPLY ("file:%s ", xDbgDumpGetFile ());
- if (xDbgDumpGetCrop ())
- XDBG_REPLY ("crop:%s ", xDbgDumpGetCrop ());
-
- return reply;
-}
-
-static void
-_CommandDump (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod)
-{
- int i;
- char *c;
-
- if (argc < 3)
- {
- reply = _printDumpOption (reply, len);
- XDBG_REPLY("\n");
- return;
- }
-
- for (i = 0; i < argc; i++)
- {
- char *c = argv[i];
- if (*c != '-')
- continue;
-
- if (!strcmp (c, "-type"))
- {
- c = argv[++i];
- if (!xDbgDumpSetType (c))
- {
- XDBG_REPLY ("fail: set '%s' (already running)\n", c);
- return;
- }
- }
- else if (!strcmp (c, "-count"))
- {
- c = argv[++i];
- if (!xDbgDumpSetCount (c))
- {
- XDBG_REPLY ("fail: set '%s' (already running)\n", c);
- return;
- }
- }
- else if (!strcmp (c, "-file"))
- {
- c = argv[++i];
- if (!xDbgDumpSetFile (c))
- {
- XDBG_REPLY ("fail: set '%s' (already running)\n", c);
- return;
- }
- }
- else if (!strcmp (c, "-crop"))
- {
- c = argv[++i];
- if (!xDbgDumpSetCrop (c))
- {
- XDBG_REPLY ("fail: set '%s' (already running)\n", c);
- return;
- }
- }
- }
-
- c = argv[2];
- if (!strcmp (c, "on"))
- {
- xDbgDumpPrepare ();
- XDBG_REPLY ("'%s'", c);
- reply = _printDumpOption (reply, len);
- }
- else if (!strcmp (c, "off"))
- {
- xDbgDumpSave ();
- xDbgDumpClear ();
- XDBG_REPLY ("'%s' ", c);
- }
- else if (!strcmp (c, "clear"))
- {
- xDbgDumpClear ();
- XDBG_REPLY ("'%s' ", c);
- }
- else if (*c != '-')
- {
- XDBG_REPLY ("unknown option '%s'\n", c);
- return;
- }
-
- XDBG_REPLY ("success\n");
-}
-
static struct
{
const char *Cmd;
void (*func) (int pid, int argc, char **argv, char *reply, int *len, XDbgModule *pMod);
} command_proc[] =
{
+#if ENABLE_DLOG
{
"dlog", "to enable dlog", "[0-1]",
NULL, "[OFF:0/ON:1]",
_CommandDLog
},
+#endif
{
"log_path", "to set log path", "[console/filepath]",
},
{
- "clist", "to print clients", "",
- NULL, "",
- _CommandClientList
- },
-
- {
- "plist", "to print pixmap list", "",
- NULL, "",
- _CommandPixmapList
- },
-
- {
"evlog", "to print x events", "[0-1]",
NULL, "[OFF:0/ON:1]",
_CommandEvlog
NULL, "[console/filepath]",
_CommandSetEvlogPath
},
-
- {
- "drmevent_pending", "to print pending drmvents", "",
- NULL, "",
- _CommandDrmEventPending
- },
-
- {
- "fpsdebug", "to print fps", "[0-1]",
- NULL, "[OFF:0/ON:1]",
- _CommandFpsDebug
- },
-
- {
- "dump", "to dump buffers", "[on,off,clear]",
- NULL, "[on,off,clear] -type [ui,drawable,fb,video] -count [n] -file [bmp,raw]",
- _CommandDump
- },
};
static void _CommandPrintUsage (char *reply, int *len, const char * exec)
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "xdbg.h"
-#include "xdbg_log_int.h"
-#include "xdbg_types.h"
-#include "xdbg_module.h"
-
-
-void
-xDbgModuleDrmEventPending (XDbgModule *pMod, char *reply, int *remain)
-{
- xDbgLogDrmEventPendingLists (reply, remain);
-}
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: SooChan Lim <sc1.lim@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef __XDBG_MODULE_DRMEVENT_H__
-#define __XDBG_MODULE_DRMEVENT_H__
-
-#include "xdbg_module.h"
-
-void xDbgModuleDrmEventPending (XDbgModule *pMod, char *reply, int *remain);
-
-#endif /* __XDBG_MODULE_DRMEVENT_H__ */
\ No newline at end of file
xDbgDistroyRegionList(&evinfo);
}
-#if (TIZEN_ENGINEER_MODE || USE_NORMAL_LOG)
static const char*
_traceGetWindowName (ClientPtr client, Window window)
{
return NULL;
}
-#endif
static void
_traceFlush (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
static int xi2_opcode = -1;
xEvent *pev;
-#if (TIZEN_ENGINEER_MODE || USE_NORMAL_LOG)
static char* ename[]=
{
"KeyPress",
"ButtonPress",
"ButtonRelease",
};
-#endif
XDBG_RETURN_IF_FAIL (pei != NULL);
{
case KeyPress:
case KeyRelease:
- XDBG_SECURE (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%x) root(%d,%d) win(%d,%d)\n"
+ XDBG_INFO (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%x) root(%d,%d) win(%d,%d)\n"
, ename[type-KeyPress], pev->u.u.detail, pev->u.u.type
, info->command, info->pid
, _traceGetWindowName (pClient, pev->u.keyButtonPointer.event), (unsigned int)pev->u.keyButtonPointer.event
case ButtonPress:
case ButtonRelease:
- XDBG_SECURE (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%x) root(%d,%d) win(%d,%d)\n"
+ XDBG_INFO (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%x) root(%d,%d) win(%d,%d)\n"
, ename[type-KeyPress], pev->u.u.detail, pev->u.u.type
, info->command, info->pid
, _traceGetWindowName (pClient, pev->u.keyButtonPointer.event), (unsigned int)pev->u.keyButtonPointer.event
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "xdbg.h"
-#include "xdbg_log_int.h"
-#include "xdbg_types.h"
-#include "xdbg_module.h"
-
-void
-xDbgModuleFpsDebug (XDbgModule *pMod, int on, char *reply, int *len)
-{
- xDbgLogFpsDebug (reply, len, on);
-}
-
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef __XDBG_MODULE_FPSDEBUG_H__
-#define __XDBG_MODULE_FPSDEBUG_H__
-
-#include "xdbg_module.h"
-
-void xDbgModuleFpsDebug (XDbgModule *pMod, int on, char *reply, int *len);
-
-
-#endif /* __XDBG_MODULE_FPSDEBUG_H__ */
if (client->clientState == ClientStateInitial)
_debugClientInfo (client);
- XDBG_SECURE (MXDBG, "id:%d, conn_fd:%d, pid:%d, uid:%d, name:%s (%s)\n",
+ XDBG_INFO (MXDBG, "id:%d, conn_fd:%d, pid:%d, uid:%d, name:%s (%s)\n",
info->index, info->conn_fd, info->pid, info->uid, info->command,
clientState[client->clientState]);
return;
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "xdbg.h"
-#include "xdbg_log_int.h"
-#include "xdbg_types.h"
-#include "xdbg_module.h"
-
-
-void
-xDbgModulePList (XDbgModule *pMod, char *reply, int *len)
-{
- xDbgLogPList (reply, len);
-}
-
+++ /dev/null
-/**************************************************************************
-
-xdbg
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
-
-Contact: Boram Park <boram1288.park@samsung.com>
- Sangjin LEE <lsj119@samsung.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef __XDBG_MODULE_PLIST_H__
-#define __XDBG_MODULE_PLIST_H__
-
-#include "xdbg_module.h"
-
-void xDbgModulePList (XDbgModule *pMod, char *reply, int *remain);
-
-#endif /* __XDBG_MODULE_PLIST_H__ */
\ No newline at end of file
+++ /dev/null
-%bcond_with x
-
-Name: xf86-module-xdbg
-Summary: Xserver debug module
-Version: 0.1.46
-Release: 1
-Group: System/Libraries
-License: MIT
-Source0: %{name}-%{version}.tar.gz
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(xorg-server)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(xext)
-BuildRequires: pkgconfig(xdamage)
-BuildRequires: pkgconfig(xorg-macros)
-BuildRequires: pkgconfig(dbus-1)
-BuildRequires: pkgconfig(bigreqsproto)
-BuildRequires: pkgconfig(xcomposite)
-BuildRequires: pkgconfig(compositeproto)
-BuildRequires: pkgconfig(damageproto)
-BuildRequires: pkgconfig(dmxproto)
-BuildRequires: pkgconfig(libdri2)
-BuildRequires: pkgconfig(dri2proto)
-BuildRequires: pkgconfig(fixesproto)
-BuildRequires: pkgconfig(fontsproto)
-BuildRequires: pkgconfig(xgesture)
-BuildRequires: pkgconfig(gestureproto)
-BuildRequires: pkgconfig(inputproto)
-BuildRequires: pkgconfig(kbproto)
-BuildRequires: pkgconfig(xrandr)
-BuildRequires: pkgconfig(randrproto)
-BuildRequires: pkgconfig(recordproto)
-BuildRequires: pkgconfig(renderproto)
-BuildRequires: pkgconfig(resourceproto)
-BuildRequires: pkgconfig(scrnsaverproto)
-BuildRequires: pkgconfig(videoproto)
-BuildRequires: pkgconfig(xcmiscproto)
-BuildRequires: pkgconfig(xextproto)
-BuildRequires: pkgconfig(xf86bigfontproto)
-BuildRequires: pkgconfig(xf86dgaproto)
-BuildRequires: pkgconfig(xf86driproto)
-BuildRequires: pkgconfig(xf86vidmodeproto)
-BuildRequires: pkgconfig(xineramaproto)
-BuildRequires: pkgconfig(xproto)
-BuildRequires: pkgconfig(libdrm)
-BuildRequires: pkgconfig(xtst)
-BuildRequires: pkgconfig(xi)
-BuildRequires: pkgconfig(xv)
-BuildRequires: pkgconfig(xcb)
-
-%if !%{with x}
-ExclusiveArch:
-%endif
-
-%description
-This package provides the runtime debug library and module for debug of inside X server.
-
-%package devel
-Summary: X server runtime debug library development package
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: pkgconfig(xorg-server)
-Requires: pkgconfig(x11)
-Requires: pkgconfig(xproto)
-Requires: pkgconfig(dlog)
-
-%description devel
-X server runtime debug library development package
-
-%prep
-%setup -q
-
-%build
-%autogen --disable-static --enable-normal-log \
- CFLAGS="$CFLAGS -Wall -Werror" \
- LDFLAGS="$LDFLAGS -Wl,--hash-style=both -Wl,--as-needed"
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-cp -af COPYING %{buildroot}/usr/share/license/%{name}
-%make_install
-
-%remove_docs
-
-%files
-%defattr(-,root,root,-)
-/usr/share/license/%{name}
-%{_bindir}/xdbg
-%{_bindir}/xevlog_analyze
-%{_libdir}/libxdbg-lib.so.*
-%{_libdir}/xorg/modules/libxdbg.so
-%{_sysconfdir}/dbus-1/system.d/xdbg.conf
-
-%files devel
-%dir %{_includedir}/xdbg/
-%{_includedir}/xdbg/*.h
-%{_libdir}/libxdbg-lib.so
-%{_libdir}/pkgconfig/xdbg.pc
-