summaryrefslogtreecommitdiffstats
path: root/opengl/libs/GLES_trace/tools
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-02-17 10:55:03 -0800
committerSiva Velusamy <vsiva@google.com>2012-02-17 11:09:47 -0800
commit05df4504e57657994a89e424b6881ee26d0f313c (patch)
tree4a5576e6b7e4fa82a60c90a9d88cc1a30dd3d4e9 /opengl/libs/GLES_trace/tools
parent27521811746a5e172484e9c1ef2bb2fae1354970 (diff)
downloadframeworks_native-05df4504e57657994a89e424b6881ee26d0f313c.zip
frameworks_native-05df4504e57657994a89e424b6881ee26d0f313c.tar.gz
frameworks_native-05df4504e57657994a89e424b6881ee26d0f313c.tar.bz2
gltrace: Trace thread time and wall clock time.
For each gl function, trace both the thread and wall clock times. Change-Id: I32b6caa67fa50bf915dab89b3c5021ee82e28d55
Diffstat (limited to 'opengl/libs/GLES_trace/tools')
-rwxr-xr-xopengl/libs/GLES_trace/tools/genapi.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index 557e407..e1660be 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -162,13 +162,15 @@ TRACE_CALL_TEMPLATE = pyratemp.Template(
<!--(end)-->
// call function
- nsecs_t start_time = systemTime();
+ nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
<!--(if retType != "void")-->
$!retType!$ retValue = glContext->hooks->gl.$!callsite!$;
<!--(else)-->
glContext->hooks->gl.$!callsite!$;
<!--(end)-->
- nsecs_t end_time = systemTime();
+ nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+ nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
<!--(if retType != "void")-->
// set return value
@@ -178,7 +180,9 @@ TRACE_CALL_TEMPLATE = pyratemp.Template(
rt->$!retDataType.getProtobufCall()!$retValue);
<!--(end)-->
- fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ fixupGLMessage(glContext, wallStartTime, wallEndTime,
+ threadStartTime, threadEndTime,
+ &glmsg);
glContext->traceGLMessage(&glmsg);
<!--(if retType != "void")-->