diff options
author | David Li <davidxli@google.com> | 2011-04-08 18:43:16 -0700 |
---|---|---|
committer | David Li <davidxli@google.com> | 2011-04-12 15:56:10 -0700 |
commit | 27f130a292683278b721399341d7c4e36009ec8b (patch) | |
tree | fd415a7046c99c8fc698fdd22c556783d9f03c7e /opengl/libs/EGL/egl.cpp | |
parent | e2ad4d0e3748c2f0180d24d1b3468aac79adac3a (diff) | |
download | frameworks_base-27f130a292683278b721399341d7c4e36009ec8b.zip frameworks_base-27f130a292683278b721399341d7c4e36009ec8b.tar.gz frameworks_base-27f130a292683278b721399341d7c4e36009ec8b.tar.bz2 |
GLES2Dbg: use dump.gles2dbg file when fails to create socket
setprop debug.egl.debug_forceUseFile 1: always use file
setprop debug.egl.debug_maxFileSize <int MB>: exit when reached
setprop debug.egl.debug_filePath <path>: may need to make the file
writable first.
setprop debug.egl.debug_port <unsigned short>
setprop debug.egl.debug_proc <proc cmdline>: to match debuggee process
Change-Id: I34ca1f3092f3abf17e2ded9d1689d0cdef6e07e8
Signed-off-by: David Li <davidxli@google.com>
Diffstat (limited to 'opengl/libs/EGL/egl.cpp')
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 7183e83..9cf7223 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -311,7 +311,7 @@ static void initEglTraceLevel() { int propertyLevel = atoi(value); int applicationLevel = gEGLApplicationTraceLevel; gEGLTraceLevel = propertyLevel > applicationLevel ? propertyLevel : applicationLevel; - + property_get("debug.egl.debug_proc", value, ""); long pid = getpid(); char procPath[128] = {}; @@ -324,14 +324,20 @@ static void initEglTraceLevel() { { if (!strcmp(value, cmdline)) gEGLDebugLevel = 1; - } + } fclose(file); } - + if (gEGLDebugLevel > 0) { property_get("debug.egl.debug_port", value, "5039"); - StartDebugServer(atoi(value)); + const unsigned short port = (unsigned short)atoi(value); + property_get("debug.egl.debug_forceUseFile", value, "0"); + const bool forceUseFile = (bool)atoi(value); + property_get("debug.egl.debug_maxFileSize", value, "8"); + const unsigned int maxFileSize = atoi(value) << 20; + property_get("debug.egl.debug_filePath", value, "/data/local/tmp/dump.gles2dbg"); + StartDebugServer(port, forceUseFile, maxFileSize, value); } } |