[PATCH] egltrace/android: Fix tracing Zygote processes (v2)

Chad Versace chad.versace at linux.intel.com
Thu Jun 6 15:26:13 PDT 2013


Fixes egltrace.so on Android 4.2 x86.

Do not call trimDirectory() on the proc_name of Zygote processes, because
a Zyogote process name never contains a path separator. The proc_name of
a Zygote process is the application's package name (such as
com.exampe.myapp) because ActivityManager rewrites argv[0].

Not only is the call to trimDirectory() unnecessary, it also returns
garbage when there is no path separator. The garbage caused the equality
test between proc_name and system property apitrace.debug.procname to
incorrectly fail.

v2: Fix some typos in commit message.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---


 wrappers/trace.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/wrappers/trace.cpp b/wrappers/trace.cpp
index eb68934..d79b11b 100644
--- a/wrappers/trace.cpp
+++ b/wrappers/trace.cpp
@@ -98,7 +98,6 @@ isTracingEnabled(void)
     os::String proc_name;
 
     proc_name = getZygoteProcessName();
-    proc_name.trimDirectory();
 
     __system_property_get("debug.apitrace.procname", target_proc_name);
     enabled = !strcmp(target_proc_name, proc_name);
-- 
1.8.1.4



More information about the apitrace mailing list