]> git.cworth.org Git - apitrace/commitdiff
egltrace/android: Fix tracing Zygote processes (v2)
authorChad Versace <chad.versace@linux.intel.com>
Thu, 6 Jun 2013 22:26:13 +0000 (15:26 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 11 Jun 2013 19:16:13 +0000 (20:16 +0100)
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].

There exists an undiagnosed problem with trimDirectory, but I have been
unsuccessful diagnosing it. On the other hand, the call to trimDirectory
isn't needed and its removal fixes the bug's symptoms.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wrappers/trace.cpp

index eb68934f7e63a714098b2b9df08f81bd205eaadb..d79b11bbd306a700e7fac55d485c9210c63f57f8 100644 (file)
@@ -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);