GithubHelp home page GithubHelp logo

arm-software / patrace Goto Github PK

View Code? Open in Web Editor NEW
68.0 13.0 37.0 2.5 MB

License: MIT License

CMake 1.65% C++ 72.78% Makefile 1.00% Java 2.25% Python 19.11% Shell 1.21% Objective-C++ 0.77% Objective-C 0.55% C 0.16% SWIG 0.52%

patrace's Introduction

Patrace

PATrace is software for capturing GLES calls of an application and replaying them on a different device, keeping the GPU workload the same. It's similar to the open source Apitrace project, but optimised for performance measurements.

Manual

Caveats

PATrace cannot open trace files captured with the open source Apitrace.

patrace's People

Contributors

jyangsh avatar kexia01 avatar lucpan01 avatar per-mathisen-arm avatar qiq-2022 avatar yuacui01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patrace's Issues

Failed to open trace file: permission denied

Hi all,

I am running patrace on an Hikey960 board with Android 9 (AOSP). I have an issue where the patrace complains that it fails to open the trace file to write. Here's what I see in the logcat:

01-03 23:59:47.459 4036 4056 I patrace64: egltrace.cpp,133: The trace file name is : /data/apitrace/com.android.gl2jni/com.android.gl2jni.1.pat
01-03 23:59:47.459 4036 4056 I patrace64: out_file.cpp,57: Failed to open file /data/apitrace/com.android.gl2jni/com.android.gl2jni.1.pat: Permission denied
01-03 23:59:47.496 4036 4061 I patrace64: out_file.cpp,140: cant write header when file is closed!

I don't see anything wrong with the permission of the path. Actually if I log into adb shell as a normal user (not root), I can write to that path:

hikey960:/ $ touch /data/apitrace/com.android.gl2jni/com.android.gl2jni.1.pat
hikey960:/ $ ls -l /data/apitrace/com.android.gl2jni/com.android.gl2jni.1.pat
-rw-rw---- 1 root sdcard_rw 0 2020-01-04 00:02 /data/apitrace/com.android.gl2jni/com.android.gl2jni.1.pat
hikey960:/ $ rm /data/apitrace/com.android.gl2jni/com.android.gl2jni.1.pat
hikey960:/ $

Any advice is highly appreciated,

Lik

trace on Android

Hi team:
I try to trace some graphics application on Android Honor p30.
I follow the mannual and come to install fake driver on Android. I noticed that libGLES.so is first show up in that context, but how can I get that driver file?
image

Android build error for "could not find or load main class org.gradle.wrapper.GradleWrapperMain"

I have meet an error when trying to build for android using command "./scripts/build.py patrace android release".

  1. Because the linux server I used is using proxy, I am not sure does this problem caused by network.
    If it is caused by network problem, does anyone know which host the "./script/build.py" need to connect, so I can add them into proxy white list.
    PS: I set proxy in Android Studio, and download SDK and NDK as the manaul required.
    Or I can download exactly version gradle and put it in linux server?
  2. Or it caused by other problem?

The ERROR details:

root@pekshcsitd19020:/home/Z00014739# ./scripts/build.py patrace android release
Command : cmake -H/home/Z00014739/patrace/project/cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/x11_x64.cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/Z00014739/install/patrace/android/release -DCMAKE_BUILD_TYPE=Release -DSANITIZELIB=false -DTEST_LIBRARY=/usr/lib/x86_64-linux-gnu -B/home/Z00014739/builds/patrace/android/release

Current directory : /home/Z00014739
Command : cmake -H/home/Z00014739/patrace/project/cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/x11_x64.cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/Z00014739/install/patrace/android/release -DCMAKE_BUILD_TYPE=Release -DSANITIZELIB=false -DTEST_LIBRARY=/usr/lib/x86_64-linux-gnu -B/home/Z00014739/builds/patrace/android/release

-- main ar: /usr/bin/ar
-- libpng ar: /usr/bin/ar
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Configuring done
CMake Warning (dev) in pat_editor_gui/CMakeLists.txt:
Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

For compatibility, CMake is excluding the GENERATED source file(s):

"/home/Z00014739/patrace/src/common/call_parser.cpp"

from processing by AUTOMOC and AUTOUIC. If any of the files should be
processed, set CMP0071 to NEW. If any of the files should not be
processed, explicitly exclude them by setting the source file property
SKIP_AUTOGEN:

set_property(SOURCE file.h PROPERTY SKIP_AUTOGEN ON)

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at fakedriver/CMakeLists.txt:19 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target
"/home/Z00014739/patrace/project/cmake/../../src/fakedriver/gles1/auto.cpp"
of target "GLESv1_CM" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at fakedriver/CMakeLists.txt:9 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target
"/home/Z00014739/patrace/project/cmake/../../src/fakedriver/egl/auto.cpp"
of target "EGL" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at fakedriver/CMakeLists.txt:29 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target
"/home/Z00014739/patrace/project/cmake/../../src/fakedriver/gles2/auto.cpp"
of target "GLESv2" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/Z00014739/builds/patrace/android/release
Using ndk-build: /home/Z00014739/AndroidTools/android-ndk-r13b/
Command : cmake -DSRC_ROOT=/home/Z00014739/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=3 -DPATRACE_VERSION_MINOR=1 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY=/usr/lib/x86_64-linux-gnu -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/Z00014739/scripts/../patrace/project/cmake/egltrace/config.cmake

Current directory : /home/Z00014739
Command : cmake -DSRC_ROOT=/home/Z00014739/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=3 -DPATRACE_VERSION_MINOR=1 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY=/usr/lib/x86_64-linux-gnu -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/Z00014739/scripts/../patrace/project/cmake/egltrace/config.cmake

Command : sed -i -e "s/(<string name="version">).*(</string>)/\1r3p1 unofficial dev\2/g" /home/Z00014739/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Current directory : /home/Z00014739
Command : sed -i -e "s/(<string name="version">).*(</string>)/\1r3p1 unofficial dev\2/g" /home/Z00014739/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Command : sed -i -e "s/(android:versionCode=")[0-9]*/\13010/g" /home/Z00014739/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Current directory : /home/Z00014739
Command : sed -i -e "s/(android:versionCode=")[0-9]*/\13010/g" /home/Z00014739/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Command : /home/Z00014739/scripts/../patrace/project/android/gradlew --build-file /home/Z00014739/scripts/../patrace/project/android/build.gradle assembleRelease --stacktrace

Current directory : /home/Z00014739
Command : /home/Z00014739/scripts/../patrace/project/android/gradlew --build-file /home/Z00014739/scripts/../patrace/project/android/build.gradle assembleRelease --stacktrace

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

The following command failed with error code 1:
/home/Z00014739/scripts/../patrace/project/android/gradlew --build-file /home/Z00014739/scripts/../patrace/project/android/build.gradle assembleRelease --stacktrace

recording a patrace

I tried recording a patrace for some games like Diablo Immortal and Genshin Impact. Genshin Impact crashes at the end of the loading screen. Diablo Immortal the game plays but the trace stops recording after the loading screen. Are there some tricks for basic use recording games?

Patrace build issue:Makefile:23: recipe for target 'callNdkBuild' failed

ant release
Buildfile: /home/user/work/git/patrace/patrace/project/android/eglretrace/build.xml

-set-mode-check:

-set-release-mode:
[echo] *************************************************
[echo] **** Android Manifest has debuggable=true ****
[echo] **** Doing DEBUG packaging with RELEASE keys ****
[echo] *************************************************

-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
[checkenv] Android SDK Tools Revision 23.0.2
[checkenv] Installed at /home/user/work/android/adt-bundle-linux-x86_64-20140702/sdk

-setup:
[echo] Project Name: eglretrace
[gettype] Project Type: Application

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for eglretrace...
[gettarget] Project Target: Android 6.0
[gettarget] API level: 23
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/bin
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/bin/res
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/bin/rsObj
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/bin/rsLibs
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/gen
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/bin/classes
[mkdir] Created dir: /home/user/work/git/patrace/patrace/project/android/eglretrace/bin/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for eglretrace...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...

BUILD FAILED
/home/user/work/android/adt-bundle-linux-x86_64-20140702/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/user/work/android/adt-bundle-linux-x86_64-20140702/sdk/tools/ant/build.xml:698: Execute failed: java.io.IOException: Cannot run program "/home/user/work/android/adt-bundle-linux-x86_64-20140702/sdk/build-tools/android-4.4W/aapt" (in directory "/home/user/work/git/patrace/patrace/project/android/eglretrace"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:424)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:438)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:630)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:497)
at com.android.ant.AaptExecTask.execute(AaptExecTask.java:699)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at java.util.Vector.forEach(Vector.java:1275)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at java.util.Vector.forEach(Vector.java:1275)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:834)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 48 more

Total time: 1 second
Makefile:23: recipe for target 'callNdkBuild' failed
make: *** [callNdkBuild] Error 1
make: Leaving directory '/home/user/work/git/patrace/patrace/project/android/eglretrace'
The following command failed with error code 2:
make -j8 -C /home/user/work/git/patrace/scripts/../patrace/project/android/eglretrace

dlopen failed: library "/data/local/debug/gles/libGLES_layer_arm64.so" not found

I have followed the following steps as in the documation to enable GLES layer.

  1. adb push libGLES_layer_arm64.so /data/local/debug/gles
  2. adb shell settings put global enable_gpu_debug_layers 1
  3. adb shell settings put global gpu_debug_layers_gles libGLES_layer_arm64.so
  4. adb shell settings put global gpu_debug_app com.glbenchmark.glbenchmark27
  5. adb shell setprop debug.gles.layers libGLES_layer_arm64.so
  6. adb logcat | grep libEGL
  7. create output trace directory and give it 777 permission
  8. chcon u:object_r:app_data_file:s0:c512,c768 /data/apitrace/com.glbenchmark.glbenchmark27

However, when i used "adb logcat | grep libegl" , I got the error message as shown below.
image
Since I haved copied the libGLES_layer_arm64.so to the directory "/data/local/debug/gles", I have no ideas what reasons may cause this error.

Moreover, I cannot get any traceing result after running the benchmark.

Is there any missing commands in my steps ?

Thank You!

SIGSEGV in libinterceptor_patrace_arm.so library

Hi all,

I face the below error.

14757 14757 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone 1840 1840 I /system/bin/tombstoned: received crash request for pid 8959 14757 14757 I crash_dump32: performing dump of process 8796 (target tid = 8959) 14757 14757 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 14757 14757 F DEBUG : Build fingerprint: 'test/xxxxxxx/xxxxx/eng.B06038.20191104.204557:eng/release-keys' 14757 14757 F DEBUG : Revision: '0' 14757 14757 F DEBUG : ABI: 'arm' 14757 14757 F DEBUG : pid: 8796, tid: 8959, name: RenderThread >>> com.test.google.tv <<< 14757 14757 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 14757 14757 F DEBUG : Cause: null pointer dereference 14757 14757 F DEBUG : r0 8ad7ea4c r1 00000000 r2 0000001c r3 00000004 14757 14757 F DEBUG : r4 ab93ad8c r5 8b841464 r6 00000020 r7 8ad7ea08 14757 14757 F DEBUG : r8 00000000 r9 00000000 r10 8ad7eea8 r11 8b841464 14757 14757 F DEBUG : ip 80000000 sp 8ad7e9c8 lr 8b3064bb pc ab8a8dc8 6154 6154 I AR_thread: type=1400 audit(0.0:545): avc: denied { ioctl } for path="/dev/binder" dev="tmpfs" ino=5483 ioctlcmd=0x6201 scontext=u:r:iptvmedia_hal:s0 14757 14757 F DEBUG : 14757 14757 F DEBUG : backtrace: 14757 14757 F DEBUG : #00 pc 00019dc8 /system/lib/libc.so (memcpy+68) 14757 14757 F DEBUG : #01 pc 0013b4b7 /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #02 pc 0009ecad /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #03 pc 00132663 /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #04 pc 0005196b /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #05 pc 00047cdd /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #06 pc 00132bf1 /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #07 pc 000488bd /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #08 pc 00064881 /vendor/lib/egl/libinterceptor_patrace_arm.so 14757 14757 F DEBUG : #09 pc 00064c0d /vendor/lib/egl/libinterceptor_patrace_arm.so (glDrawArrays+32) 14757 14757 F DEBUG : #10 pc 0035536d /system/lib/libhwui.so (GrMesh::sendToGpu(GrPrimitiveProcessor const&, GrMesh::SendToGpuImpl*) const+132)

I found the code line as below:
addr2line -Cfe obj/local/armeabi-v7a/libinterceptor_patrace_arm.so 0x0013b4b7
patrace/patrace/project/android/egltrace/jni/../../../../src/../../thirdparty/md5/md5.c:207
207 SET(a, b, c, d, 0, 7, T1);

Did I do something wrong or missing?

Error while bulding patrace for android

build.log
Hi, I am getting errors while building PAtrace for android -
Executed the following command -
./scripts/build.py patrace android release

Error -
Build eglretrace with Android-NDK...
##Generate C header for NativeAPI.java
ANDROID_JAR=/usr/local/xyz/home/abc/android-studio/adt-bundle-linux-x86_64-20140702/sdk//tools/../platforms/android-23/android.jar;
javac -classpath $ANDROID_JAR ./src/com/arm/pa/paretrace/NativeAPI.java;
javah -d jni -classpath $ANDROID_JAR:src com.arm.pa.paretrace.NativeAPI
Error: Could not find class file for 'com.arm.pa.paretrace.NativeAPI'.
make: *** [Makefile:25: callNdkBuild] Error 1
make: Leaving directory '/usr/local/xyz/home/abc/patrace/patrace/patrace/project/android/eglretrace'
The following command failed with error code 2:
make -j8 -C /usr/local/xyz/home/abc/patrace/patrace/scripts/../patrace/project/android/eglretrace

Can anyone help ? I'm new to this so not really sure what's going wrong
Attached is the full log.
[
build.log

some doubts about format of trace file

Hi, I read the manual document and there shows the format of trace file first begin with the common header, then the sigbook, final the actually call.

But when I read the source code of function OpenTraceFile() in in_file_mt.cpp, I found retrace decode the trace file with following order:

  1. common header
  2. first chunk
  3. sigbook
  4. other chunks

where the start of sigbook is the beginning of first chunk, that is what confused me. So what is the actually order in trace file, or is there something I just missed?

why does the pat_editor tool still use RA instead of MT?

Sometimes when I tried to extract data from a pat which has large size like 2GB, editor would straightly crashed with core dumped. I think it's because the RA format need to generate almost 3 times size of pat to make the extraction work. I realized the retrace process has already using MT instead of RA, so I suggest pat_editor could do that as well. If so, it needs to make some change in tools/pat_editor、 common/trace_mode.cpp.

failed to trace the chromium under wayland environment

i was capturing a trace under wayland environment, but it failed, while it is sucessful to small gles app.
did you ever run such situation before?

$ LD_PRELOAD=/usr/lib/libegltrace.so OUT_TRACE_FILE=chromium.trace chromium --use-gl=egl --disable-accelerated-video-decode --disable-setuid-sandbox http://10.192.241.30:8000/conformance-suites/2.0.0/conformance/misc/type-conversion-test.html?webglVersion=2&dumpShaders=undefined&quiet=0
[2] 1715
[3] 1716
root@machine:~# egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
egltrace.cpp,2115: PaTrace init version: r4p2 dev unofficial
tracerparams.cpp,64: Warning: tracerparams.cfg does not exist!
[1715:1772:0428/200314.689120:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

What if the game application creates PbufferSurface instead of WindowSurface?

As far as I know, PATrace supports the on-screen surface for capturing.
However, some kinds of apps create surfaces by "eglCreatePbufferSurface", I mean if it creates an off-screen surface, is there any way I can capture GLES calls of the application?

Please let me know the currently available support and whether you have any further plans.

Thanks.

requires extension GL_OES_EGL_image_external_essl3 to be enabled

When I tried to trace "Honkai: Star Rail", the shader compilation error "requires extension GL_OES_EGL_image_external_essl3 to be enabled" occurred.

I checked the code, found GL_OES_EGL_image_external_essl3 has already been written in gl2ext.h.

Is it a compatibility problem or did I make a mistake on setting?

Here is the log:

07-03 11:36:45.446 11381 11456 I patrace64: egltrace.cpp,2132: �[34;40mPaTrace init version: r4p3 dev unofficial�[00;00m
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,41: ErrorOutOnBinaryShaders: true
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,42: MaximumAnisotropicFiltering: 0
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,43: EnableErrorCheck: true
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,44: EnableActiveAttribCheck: true
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,45: InteractiveIntercept: false
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,46: FlushTraceFileEveryFrame: true
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,47: DisableBufferStorage: false
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,48: RendererName:
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,49: EnableRandomVersion: true
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,50: CloseTraceFileByTerminate: false
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,52: DisableErrorReporting: true
07-03 11:36:45.446 11381 11456 I patrace64: tracerparams.cpp,61: FilterSupportedExtension false
07-03 11:36:45.454 11381 11456 I patrace64: gleslayer_helper.cpp,1258: layer_init_netx_proc_address called with layer(patraceLayer) layer_id 0xb400007b7b45ea40 get_next_layer_proc_address 0x7d7e05e038, pid(11381)
07-03 11:36:45.454 11381 11456 I patrace64: egltrace_auto.cpp,54424: layer_init_intercept_map called.
07-03 11:36:45.458 11381 11456 I patrace64: Current process: com.miHoYo.hkrpg (11381)
07-03 11:36:45.458 11381 11456 I patrace64: Current process: com.miHoYo.hkrpg (11381)
07-03 11:36:45.458 11381 11456 I patrace64: egltrace.cpp,147: The trace file name is : /data/apitrace/com.miHoYo.hkrpg/com.miHoYo.hkrpg.3.pat
07-03 11:36:45.458 11381 11456 I patrace64: out_file.cpp,60: Successfully open file /data/apitrace/com.miHoYo.hkrpg/com.miHoYo.hkrpg.3.pat
07-03 11:36:45.459 11381 11456 I patrace64: out_file.cpp,74: json file end calculated correctly, endoffs: 524288
07-03 11:36:45.468 11381 11456 I patrace64: egltrace_auto.cpp,46511: eglDestroyContext called (implies flush to disk)
07-03 11:36:45.470 11381 11456 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080
07-03 11:36:45.473 11381 11456 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256
07-03 11:36:45.637 11381 11456 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080
07-03 11:36:48.171 11381 11456 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080
07-03 11:36:56.014 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07b80 does not exist!
07-03 11:36:56.022 11381 11961 I patrace64: egltrace_auto.cpp,46511: eglDestroyContext called (implies flush to disk)
07-03 11:36:56.025 11381 11961 I patrace64: egltrace.cpp,1443: Error: EGLSurface 0xb400007ac5f07b80 doesn't exist!
07-03 11:36:56.037 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist!
07-03 11:36:56.049 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x821E
07-03 11:36:56.130 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC
07-03 11:36:56.130 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256
07-03 11:36:56.143 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC
07-03 11:36:56.143 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256
07-03 11:36:56.361 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist!
07-03 11:36:56.361 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC
07-03 11:36:56.361 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256
07-03 11:36:56.369 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC
07-03 11:36:56.370 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256
07-03 11:36:56.552 11381 11961 I patrace64: paramsize.cpp,613: warning: unknown GLenum 0x88FC
07-03 11:36:56.552 11381 11961 I patrace64: egltrace_auto.cpp,3506: Value of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT modified from 32 to 256
07-03 11:36:56.695 11381 12132 I patrace64: egltrace.cpp,1073: Warning: EGLSurface is EGL_NO_SURFACE!
07-03 11:36:56.695 11381 12132 I patrace64: egltrace_auto.cpp,32782: Invalid index 116 to extension list! Max is 116.
07-03 11:36:56.695 11381 12132 I patrace64: egltrace_auto.cpp,32782: Invalid index 117 to extension list! Max is 116.
07-03 11:36:56.701 11381 12132 I patrace64: egltrace.cpp,333: Width: 2400, Height: 1080
07-03 11:36:56.731 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call
07-03 11:36:56.738 11381 12132 I patrace64: gleslayer_helper.cpp,22: dispatch_intercept_func(glBindFragDataLocationEXT): Not support to trace proc glBindFragDataLocationEXT, and calling from next layer.
07-03 11:36:56.741 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call
07-03 11:36:56.744 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call
07-03 11:36:56.747 11381 12132 I patrace64: egltrace_auto.cpp,34187: Deliberately failing a glProgramBinary call
07-03 11:36:56.796 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist!
07-03 11:36:56.797 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist!
07-03 11:36:56.797 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist!
07-03 11:36:56.797 11381 11961 I patrace64: egltrace.cpp,1078: Error: EGLSurface 0xb400007ac5f07c00 does not exist!
07-03 11:37:15.950 11381 12132 I patrace64: gleslayer_helper.cpp,22: dispatch_intercept_func(eglGetNativeClientBufferANDROID): Not support to trace proc eglGetNativeClientBufferANDROID, and calling from next layer.
07-03 11:37:15.962 11381 12132 I patrace64: shaderutility.cpp,16: texture_external_image fragment shader compilation information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled
07-03 11:37:15.962 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated.
07-03 11:37:15.962 11381 12132 I patrace64:
07-03 11:37:15.962 11381 12132 I patrace64:
07-03 11:37:15.962 11381 12132 I patrace64: shaderutility.cpp,34: shader program texture_external_image shader's linking information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled
07-03 11:37:15.962 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated.
07-03 11:37:15.962 11381 12132 I patrace64:
07-03 11:37:15.962 11381 12132 I patrace64:
07-03 11:37:15.962 11381 12132 I patrace64: shaderutility.cpp,44: unifor parameter u_Texture hasn't been defined.
07-03 11:37:15.982 11381 12132 I patrace64: shaderutility.cpp,16: texture_external_image fragment shader compilation information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled
07-03 11:37:15.982 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated.
07-03 11:37:15.982 11381 12132 I patrace64:
07-03 11:37:15.982 11381 12132 I patrace64:
07-03 11:37:15.982 11381 12132 I patrace64: shaderutility.cpp,34: shader program texture_external_image shader's linking information: ERROR: 0:3: 'samplerExternalOES' : requires extension GL_OES_EGL_image_external_essl3 to be enabled
07-03 11:37:15.982 11381 12132 I patrace64: ERROR: 1 compilation errors. No code generated.
07-03 11:37:15.982 11381 12132 I patrace64:
07-03 11:37:15.982 11381 12132 I patrace64:
07-03 11:37:15.982 11381 12132 I patrace64: shaderutility.cpp,44: unifor parameter u_Texture hasn't been defined.
07-03 11:37:16.022 11381 12132 I patrace64: egltrace.cpp,1073: Warning: EGLSurface is EGL_NO_SURFACE!

limit the replay speed on android

I found the replay fps is much faster than the fps when captured.
I need to use patrace to simulate the GPU workload of the honor of kings game, so I want the replayed frames to be in the same render pace with the render pace of original captured game.
Is it possible to make replay app use the same render pace of the original captured app/game?

Thanks in advance!

Application crashed immediately when try to trace it

Hi, I make a simple demo with ue4 and build a apk that I installed it.
When I add its package name to appList.cfg and I start the application, the app just crashed immediately.

I got two different log.
1.every time patrace seems to open to trace file at the same time

04-12 04:16:21.208 12322 12396 I patrace32: egltrace.cpp,2047: PaTrace init version: r3p0 dev unofficial
04-12 04:16:21.209 12322 12396 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (12322)
04-12 04:16:21.209 12322 12396 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (12322)
04-12 04:16:21.209 12322 12396 I patrace32: tracerparams.cpp,45: Warning: /system/lib/egl/tracerparams.cfg does not exist!
04-12 04:16:21.209 12322 12396 I fakedriver32: proc.cpp,32: Successfully loaded monolithic library /vendor/lib/egl/libinterceptor_patrace_arm.so
04-12 04:16:21.210 12322 12396 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libGLESv2_mali.so load failed: dlopen failed: library "/system/lib/egl/libGLESv2_mali.so" not found
04-12 04:16:21.210 12322 12396 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/system/lib/egl/libGLES_mali.so" not found
04-12 04:16:21.211 12322 12396 I patrace32: eglproc_trace.cpp,180: /vendor/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/vendor/lib/egl/libGLES_mali.so" not found
04-12 04:16:21.212 12322 12396 I patrace32: library.cpp,41: Loaded /vendor/lib/egl/lib_mali.so from /vendor/lib/egl/lib_mali.so
04-12 04:16:21.212 12322 12396 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libEGL_mali.so load failed: dlopen failed: library "/system/lib/egl/libEGL_mali.so" not found
04-12 04:16:21.213 12322 12396 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/system/lib/egl/libGLES_mali.so" not found
04-12 04:16:21.213 12322 12396 I patrace32: eglproc_trace.cpp,180: /vendor/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/vendor/lib/egl/libGLES_mali.so" not found
04-12 04:16:21.214 12322 12396 I patrace32: library.cpp,41: Loaded /vendor/lib/egl/lib_mali.so from /vendor/lib/egl/lib_mali.so
04-12 04:16:21.214 12322 12396 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (12322)
04-12 04:16:21.214 12322 12396 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (12322)
04-12 04:16:21.214 12322 12396 I patrace32: egltrace.cpp,134: The trace file name is : /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.9.pat
04-12 04:16:21.215 12322 12396 I patrace32: out_file.cpp,60: Successfully open file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.9.pat
04-12 04:16:21.225 12322 12396 I patrace32: out_file.cpp,74: json file end calculated correctly, endoffs: 524288
04-12 04:16:21.226 12322 12396 I patrace32: out_file.cpp,224: ===write sigbook===
04-12 04:16:21.227 12322 12396 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:16:21.227 12322 12396 I patrace32: eglproc_auto.hpp,794: Warning: Ignoring call to unavailable function eglGetPlatformDisplay
04-12 04:16:21.314 12322 12412 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:16:21.899 12322 12322 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:16:21.909 12322 12322 I patrace32: out_file.cpp,170: wrote json header, length=329
04-12 04:16:21.911 12322 12322 I patrace32: egltrace_auto.cpp,51101: warning: unknown function eglSetBlobCacheFuncsANDROID
04-12 04:16:21.917 12322 12322 I patrace32: egltrace.cpp,1038: Note: EGLSurface is EGL_NO_SURFACE or 0xb618ae88 doesn't exit!
04-12 04:16:21.918 12322 12322 I patrace32: egltrace.cpp,1366: Error: EGLSurface 0xb618ae88 doesn't exist!
04-12 04:16:21.919 12322 12322 I patrace32: egltrace_auto.cpp,44577: eglDestroyContext called (implies flush to disk)
04-12 04:16:21.920 12322 12322 I patrace32: out_file.cpp,170: wrote json header, length=3311
04-12 04:16:21.920 12322 12322 I patrace32: egltrace_auto.cpp,43347: eglTerminate called -- closing file handle
04-12 04:16:21.920 12322 12322 I patrace32: out_file.cpp,170: wrote json header, length=3312
04-12 04:16:21.920 12322 12322 I patrace32: out_file.cpp,103: Close trace file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.9.pat
04-12 04:16:22.060 12322 12392 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (12322)
04-12 04:16:22.061 12322 12392 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (12322)
04-12 04:16:22.061 12322 12392 I patrace32: egltrace.cpp,134: The trace file name is : /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.10.pat
04-12 04:16:22.063 12322 12392 I patrace32: out_file.cpp,60: Successfully open file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.10.pat
04-12 04:16:22.069 12322 12392 I patrace32: out_file.cpp,74: json file end calculated correctly, endoffs: 524288
04-12 04:16:22.069 12322 12392 I patrace32: out_file.cpp,224: ===write sigbook===
04-12 04:16:22.070 12322 12392 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:16:22.070 12322 12392 I patrace32: out_file.cpp,170: wrote json header, length=461
04-12 04:16:22.071 12322 12392 I patrace32: egltrace_auto.cpp,51101: warning: unknown function eglSetBlobCacheFuncsANDROID
04-12 04:16:22.072 12322 12392 I patrace32: egltrace.cpp,1038: Note: EGLSurface is EGL_NO_SURFACE or 0x0 doesn't exit!
04-12 04:16:22.079 12322 12392 I patrace32: egltrace.cpp,308: Width: 2026, Height: 1080
04-12 04:16:22.099 12322 12392 I patrace32: os_posix.cpp,273: patrace: warning: caught signal 11
04-12 04:16:22.100 12322 12392 I patrace32: out_file.cpp,170: wrote json header, length=3765
04-12 04:16:22.101 12322 12392 I patrace32: out_file.cpp,103: Close trace file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.10.pat
  1. The interceptor show some log may helper but I cannot understand
04-12 04:12:48.239 10327 10358 I patrace32: egltrace.cpp,2047: PaTrace init version: r3p0 dev unofficial
04-12 04:12:48.239 10327 10358 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (10327)
04-12 04:12:48.240 10327 10358 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (10327)
04-12 04:12:48.240 10327 10358 I patrace32: tracerparams.cpp,45: Warning: /system/lib/egl/tracerparams.cfg does not exist!
04-12 04:12:48.240 10327 10358 I fakedriver32: proc.cpp,32: Successfully loaded monolithic library /vendor/lib/egl/libinterceptor_patrace_arm.so
04-12 04:12:48.241 10327 10358 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libGLESv2_mali.so load failed: dlopen failed: library "/system/lib/egl/libGLESv2_mali.so" not found
04-12 04:12:48.241 10327 10358 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/system/lib/egl/libGLES_mali.so" not found
04-12 04:12:48.241 10327 10358 I patrace32: eglproc_trace.cpp,180: /vendor/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/vendor/lib/egl/libGLES_mali.so" not found
04-12 04:12:48.242 10327 10358 I patrace32: library.cpp,41: Loaded /vendor/lib/egl/lib_mali.so from /vendor/lib/egl/lib_mali.so
04-12 04:12:48.243 10327 10358 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libEGL_mali.so load failed: dlopen failed: library "/system/lib/egl/libEGL_mali.so" not found
04-12 04:12:48.243 10327 10358 I patrace32: eglproc_trace.cpp,180: /system/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/system/lib/egl/libGLES_mali.so" not found
04-12 04:12:48.244 10327 10358 I patrace32: eglproc_trace.cpp,180: /vendor/lib/egl/libGLES_mali.so load failed: dlopen failed: library "/vendor/lib/egl/libGLES_mali.so" not found
04-12 04:12:48.244 10327 10358 I patrace32: library.cpp,41: Loaded /vendor/lib/egl/lib_mali.so from /vendor/lib/egl/lib_mali.so
04-12 04:12:48.244 10327 10358 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (10327)
04-12 04:12:48.245 10327 10358 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (10327)
04-12 04:12:48.245 10327 10358 I patrace32: egltrace.cpp,134: The trace file name is : /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.2.pat
04-12 04:12:48.245 10327 10358 I patrace32: out_file.cpp,60: Successfully open file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.2.pat
04-12 04:12:48.248 10327 10358 I patrace32: out_file.cpp,74: json file end calculated correctly, endoffs: 524288
04-12 04:12:48.249 10327 10358 I patrace32: out_file.cpp,224: ===write sigbook===
04-12 04:12:48.249 10327 10358 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:12:48.249 10327 10358 I patrace32: eglproc_auto.hpp,794: Warning: Ignoring call to unavailable function eglGetPlatformDisplay
04-12 04:12:48.379 10327 10362 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:12:49.106 10327 10327 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:12:49.125 10327 10327 I patrace32: out_file.cpp,170: wrote json header, length=329
04-12 04:12:49.128 10327 10327 I patrace32: egltrace_auto.cpp,51101: warning: unknown function eglSetBlobCacheFuncsANDROID
04-12 04:12:49.134 10327 10327 I patrace32: egltrace.cpp,1038: Note: EGLSurface is EGL_NO_SURFACE or 0xb61f6e88 doesn't exit!
04-12 04:12:49.136 10327 10327 I patrace32: egltrace.cpp,1366: Error: EGLSurface 0xb61f6e88 doesn't exist!
04-12 04:12:49.137 10327 10327 I patrace32: egltrace_auto.cpp,44577: eglDestroyContext called (implies flush to disk)
04-12 04:12:49.137 10327 10327 I patrace32: out_file.cpp,170: wrote json header, length=3311
04-12 04:12:49.138 10327 10327 I patrace32: egltrace_auto.cpp,43347: eglTerminate called -- closing file handle
04-12 04:12:49.139 10327 10327 I patrace32: out_file.cpp,170: wrote json header, length=3312
04-12 04:12:49.139 10327 10327 I patrace32: out_file.cpp,103: Close trace file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.2.pat
04-12 04:12:49.289 10327 10354 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (10327)
04-12 04:12:49.289 10327 10354 I patrace32: Current process: com.YourCompany.RaysGameDemo4 (10327)
04-12 04:12:49.289 10327 10354 I patrace32: egltrace.cpp,134: The trace file name is : /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.3.pat
04-12 04:12:49.289 10327 10354 I patrace32: out_file.cpp,60: Successfully open file /data/apitrace/com.YourCompany.RaysGameDemo4/com.YourCompany.RaysGameDemo4.3.pat
04-12 04:12:49.295 10327 10354 I patrace32: out_file.cpp,224: ===write sigbook===
04-12 04:12:49.296 10327 10354 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:12:49.297 10327 10354 I patrace32: out_file.cpp,170: wrote json header, length=461
04-12 04:12:49.297 10327 10354 I patrace32: egltrace_auto.cpp,51101: warning: unknown function eglSetBlobCacheFuncsANDROID
04-12 04:12:49.299 10327 10354 I patrace32: egltrace.cpp,1038: Note: EGLSurface is EGL_NO_SURFACE or 0x0 doesn't exit!
04-12 04:12:49.312 10327 10354 I patrace32: egltrace.cpp,308: Width: 2026, Height: 1080
04-12 04:12:49.405 10327 10354 I patrace32: egltrace.cpp,308: Width: 2026, Height: 1080
04-12 04:12:49.663 10327 10371 I patrace32: eglproc_trace.cpp,266: Cannot find the function pointer of eglGetPlatformDisplay
04-12 04:12:49.677 10327 10371 I patrace32: egltrace.cpp,308: Width: 2026, Height: 1080
04-12 04:12:50.471 10327 10371 I patrace32: egltrace.cpp,79: API::ERROR::HIGH (call=603): Error:glIsEnabled::<cap> is not one of the accepted values
04-12 04:12:50.474 10327 10371 I patrace32: egltrace.cpp,1038: Note: EGLSurface is EGL_NO_SURFACE or 0xa497f008 doesn't exit!
04-12 04:12:50.534 10327 10371 D UE4     : [2022.04.11-20.12.50:534][  0]LogAndroid: Error: [Callstack] 0x00000000C1EEC21A libinterceptor_patrace_arm.so(0x000000000006521A)![Unknown]()  []

If you have any time to give me any advice, I will be really grateful.

Android gradle CLI build failing with missing android packages in NativeAPI.java

Hello. I have followed all of the steps in manual.md for building the Android projects with gradle from CLI, and build.py gets to Task :eglretrace:autoGenRetrace of the makefile and fails with:

> Task :eglretrace:autoGenRetrace
Remove the existing auto-generated source files...
rm -f ../../../src/common/api_info_auto.cpp
rm -f ../../../src/dispatch/eglproc_auto.hpp
rm -f ../../../src/dispatch/eglproc_auto.cpp
rm -f ../../../src/helper/paramsize.cpp
rm -f ../../../src/retracer/retrace_gles_auto.cpp
rm -f ../../../src/specs/khronos_enums.hpp
Auto-generate the retrace code...
cd ../../../src/common && python api_info.py
cd ../../../src/common && python call_parser.py
cd ../../../src/dispatch && python eglproc.py
cd ../../../src/helper && python paramsize.py
cd ../../../src/retracer && python retrace.py
cd ../../../src/specs/ && python glxml_header.py
Generate C header for NativeAPI.java
ANDROID_JAR=/code/android/rvc-arc/prebuilts/devtools/tools/../platforms/android-23/android.jar; \
    javac -classpath $ANDROID_JAR ./src/com/arm/pa/paretrace/NativeAPI.java; \
    javah -d jni -classpath $ANDROID_JAR:src com.arm.pa.paretrace.NativeAPI
./src/com/arm/pa/paretrace/NativeAPI.java:3: error: package android.util does not exist
import android.util.Log;
                   ^
./src/com/arm/pa/paretrace/NativeAPI.java:4: error: package android.view does not exist
import android.view.Surface;
                   ^
./src/com/arm/pa/paretrace/NativeAPI.java:5: error: package android.os does not exist
import android.os.Handler;
                 ^
./src/com/arm/pa/paretrace/NativeAPI.java:6: error: package android.os does not exist
import android.os.Message;
                 ^
./src/com/arm/pa/paretrace/NativeAPI.java:7: error: package android.os does not exist
import android.os.Bundle;
                 ^

Any idea why this isn't working out of the box?

Executed commands:

14667  [2022-03-21 13:42:59 -0700] export ANDROID_HOME=[redacted]/Android/Sdk
14668  [2022-03-21 13:43:12 -0700] export PATH=$PATH:${ANDROID_HOME}/tools
14669  [2022-03-21 13:43:18 -0700] export PATH=$PATH:${ANDROID_HOME}/platform-tools
14671  [2022-03-21 13:43:43 -0700] sudo apt-get install openjdk-8-jdk
14673  [2022-03-21 13:44:05 -0700] sudo apt-get install lib32stdc++6 lib32z1
14687  [2022-03-21 13:45:51 -0700] python3 ./scripts/build.py patrace android release
14688  [2022-03-21 13:47:30 -0700] apt install build-essential cmake libx11-dev libtiff-dev default-jdk g++-multilib gcc-multilib libhdf5-dev libpq-dev libpq5 subversion qt5-default python3-setuptools python3-dev python3-pip python3-venv python3-wheel swig
14689  [2022-03-21 13:47:33 -0700] sudo apt install build-essential cmake libx11-dev libtiff-dev default-jdk g++-multilib gcc-multilib libhdf5-dev libpq-dev libpq5 subversion qt5-default python3-setuptools python3-dev python3-pip python3-venv python3-wheel swig
14690  [2022-03-21 13:48:40 -0700] sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
14691  [2022-03-21 13:49:13 -0700] python3 ./scripts/build.py patrace android release
14693  [2022-03-21 13:56:13 -0700] export PATH=$PATH:${ANDROID_HOME}/ndk/21.1.6352462
14706  [2022-03-21 14:22:32 -0700] /code/android/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "platforms;android-30" "build-tools;30.0.3"
14707  [2022-03-21 14:22:51 -0700] /code/android/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --install "ndk;21.1.6352462"
14708  [2022-03-21 14:23:21 -0700] python3 ./scripts/build.py patrace android release

libeglretrece.so unaccess to libui.so during replay

I trace games on Android 10, And PaRetrace was built by Android-29 and NDK 21. When I tried to replay pat on Android 10, this error happens at anytime of replay.
PaRetrace: libeglretrace.so:unauthorized access to "system/lib64/libui.so"

I notice that document about Android 10 was updated recently, any advice about how to solve this problem?

Error while building patrace for android

when I exec the command said in manual.md ./scripts/build.py patrace android release
error ocurred:
image

the directory that path in command pointed is existed. I have no idea how to fixed it. Can you give me some advice?

Clientsidetrim tool broke.

I used Clientsidetrim tool to optimize the memory usage of my PAT file.
But it broke and printed this log info:
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at

I found it was broken at line 117: while ((call = inputFile->next_call())) {}

Can not debug paretrace.apk process on Android phone.

I try to debug paretrace on Android by gdb by following "Debugging the interceptor on Android" part in manual.md. But when I try to attach to remote target, the paretrace process running on Android is crashed, appearing no repondng message.

I noticed that the libs in manual.md, such as libinterceptor_patrace.so, can not be found, Is this manual outdated?
Please help check whether the guideline for debugging paretrace on Android is still working.

About context state while retracing pat file

Hi, I noticed in state.hpp file there has a Class named Context. In fact, I want to know is it possible to reload OpenGL Context such as when it comes to the n^th frame, I could save the context of the end of n^th frame and I can reload this context state wherever I need it? Although I guess the Class Context is not the context that I think in OpenGL. Any Advice would be helpful, thanks !!!

Cannot trace and retrace for Android 10.

Problem: nothing showed in the "/data/apitrace/pakage-name", and no place to select/start retrace in eglretrace-release.apk.

I have post an issue before, but closed by Collaborator.
However, he/she didn't solve my problem, I STILL cannot get any trace.
Here is the old issue: https://github.com/ARM-software/patrace/issues/27#issue-923576754

Hope someone could share your steps to trace and retrace on Android.

Here is my problem:
After build the project on Linux, I start to use it to trace game on Android fowllowing the manual. The game package name is "com.tencent.tmgp.sgame".

  1. However, when I run this game and stop it through Android UI and kill it, nothing showed in the "/data/apitrace/com.tencent.tmgp.sgame".
  2. When I install the apk "/install/patrace/android/release/eglretrace/eglretrace-release.apk", there is no button to select a trace file or start to retarace, also It can't change the layout to be vertical (I don't know if it is the reason).
  3. According to collaborator "per-mathisen-arm"'s advice, I change my steps (I delete the "enable gles layer" step, only retain the interceptor). What is the differnce between "interceptor" and "GLES layer", for Android 10, which one should I use?

My working system:
I use MobaXterm to connect server, and MobaXterm Tunneling to let the server connect local device.

Here is my whole steps to trace this game:
STEP 1: install fakedriver
adb push /install/patrace/android/release/fakedriver/libGLES_wrapper_arm.so /sdcard/
adb shell
mount -o rw,remount /vendor

cp /sdcard/libGLES_wrapper_arm.so /vendor/lib/egl/
rm /sdcard/libGLES_wrapper_arm.so
chmod 755 /vendor/lib/egl/libGLES_wrapper_arm.so
mount -o ro,remount /vendor

STEP 2: installing interceptor
adb push install/patrace/android/release/egltrace/libinterceptor_patrace_arm.so /sdcard/
adb push install/patrace/android/release/egltrace/libinterceptor_patrace_arm64.so /sdcard/
adb shell
mount -o rw,remount /vendor

cp /sdcard/libinterceptor_patrace_arm.so /vendor/lib/egl/libinterceptor_patrace_arm.so
cp /sdcard/libinterceptor_patrace_arm64.so /vendor/lib64/egl/libinterceptor_patrace_arm64.so

chmod 755 /vendor/lib/egl/libinterceptor_patrace_arm.so
chmod 755 /vendor/lib64/egl/libinterceptor_patrace_arm64.so

echo "/vendor/lib/egl/libinterceptor_patrace_arm.so" > /vendor/lib/egl/interceptor.cfg
echo "/vendor/lib64/egl/libinterceptor_patrace_arm64.so" > /vendor/lib64/egl/interceptor.cfg

chmod 644 /vendor/lib/egl/interceptor.cfg
chmod 644 /vendor/lib64/egl/interceptor.cfg

mkdir /data/apitrace
chmod 777 /data/apitrace

STEP 3: set the game pakeage to applist
adb shell
echo com.tencent.tmgp.sgame >> /system/lib/egl/appList.cfg
chmod 644 /system/lib/egl/appList.cfg
mkdir -p /data/apitrace/com.tencent.tmgp.sgame
chmod 777 /data/apitrace/com.tencent.tmgp.sgame

STEP 4: trace
run the game for about 2 mintues and then back to home page and kill the game through Android UI.

Does forceSingleWindow mode still work?

I want to retrace some pat through forceSingleWindow mode. However, program always crashed at _shareContext check.
I tried to use tool 'single_surface' to convert multi surface to single surface pat. But that tool always failed with error like below:

in_file_ra.cpp,149: Creating temporary random access file com.miHoYo.Yuanshen.2.pat.ra
in_file_ra.cpp,37: Failed to open file com.miHoYo.Yuanshen.2.pat.ra
single_surface.cpp,396: Failed to open for reading: com.miHoYo.Yuanshen.2.pat

Does forceSingleWindow mode still work? Or are there something I missed to make that mode work?

Here is my retrace_parameters.json:

{
   "colorBitsRed" : 8,
   "colorBitsGreen" : 8,
   "colorBitsBlue" : 8,
   "colorBitsAlpha" : 8,
   "depthBits" : 24,
   "stencilBits" : 8,
   "forceSingleWindow" : true,
   "threadId": 3,
   "overrideResolution" : true,
   "overrideWidth" : 1920,
   "overrideHeight" : 1080,
   "offscreen" : false,
   "frames" : "0-20000000",
   "file" : "com.miHoYo.Yuanshen.2.pat",
   "preload" : true,
   "landscape" : true
}

size of pat file is 1.5GB
And my system os is Ubuntu18.04LTS
system memory totally 64GB

Using patrace on android 10 to trace hello-gl2 app

Hi Team,

I am trying to use patrace on android 10 to trace https://github.com/android/ndk-samples/tree/master/hello-gl2/.

I tried to follow the patrace manual as is but fakedriver/interceptor doesn't seem to be coming in the picture with no trace being generated.

  • logs from logcat when hello-gl2 starts:
    07-27 20:50:19.372 10174 10174 I .android.gl2jn: type=1400 audit(0.0:405): avc: denied { read execute } for path="/vendor/lib64/libion_google.so" dev="dm-1" ino=1288 scontext=u:r:untrusted_app_27:s0:c179,c256,c5
    12,c768 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=1 app=com.android.gl2jni
    07-27 20:50:19.454 10174 10201 W GL2JNIView: creating OpenGL ES 2.0 context
    07-27 20:50:19.459 10174 10201 I libgl2jni: GL Version = OpenGL ES 3.2 v1.r24p0-01rel0.###other-sha0123456789ABCDEF0###
    07-27 20:50:19.459 10174 10201 I libgl2jni: GL Vendor = ARM
    07-27 20:50:19.459 10174 10201 I libgl2jni: GL Renderer = Mali-TBEX
    07-27 20:50:19.459 10174 10201 I libgl2jni: GL Extensions = GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stenci
    l GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external
    _essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type
    _2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_co
    mpression_astc_sliced_3d GL_EXT_texture_compression_astc_decode_mode GL_EXT_texture_compression_astc_decode_mode_rgb9e5 GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax
    GL_EXT_disc
    07-27 20:50:19.459 10174 10201 I libgl2jni: setupGraphics(1440, 2984)
    07-27 20:50:19.460 10174 10201 I libgl2jni: glGetAttribLocation("vPosition") = 0
    07-27 20:50:19.478 3571 3571 I hwservicemanager: getTransport: Cannot find entry [email protected]::IMapper/default in either framework or device manifest.
    07-27 20:50:19.478 10174 10198 W Gralloc3: mapper 3.x is not supported 07-27 20:50:19.480 10174 10198 I gralloc : Arm Module v1.0
    07-27 20:50:19.505 4065 4093 I ActivityTaskManager: Displayed com.android.gl2jni/.GL2JNIActivity: +212ms
    07-27 20:50:19.476 10174 10174 I RenderThread: type=1400 audit(0.0:406): avc: denied { getattr } for path="/vendor/lib64/hw/gralloc.gs101.so" dev="overlay" ino=24328 scontext=u:r:untrusted_app_27:s0:c179,c256,c5
    12,c768 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=1 app=com.android.gl2jni

  • ls -l /vendor/lib64/egl/
    total 89652
    -rw-r--r-- 1 root root 19 2020-07-26 04:20 appList.cfg
    -rw-r--r-- 1 root root 50 2020-07-26 04:17 interceptor.cfg
    -rwxr-xr-x 1 root root 879072 2020-07-26 04:15 libEGL_wrapper_arm64.so
    -rw-r--r-- 1 root root 42528448 2008-12-31 19:00 libGLES_mali.so
    -rwxr-xr-x 1 root root 1317344 2020-07-26 04:15 libGLES_wrapper_arm64.so
    -rwxr-xr-x 1 root root 936416 2020-07-26 04:15 libGLESv1_CM_wrapper_arm64.so
    -rwxr-xr-x 1 root root 1182176 2020-07-26 04:15 libGLESv2_wrapper_arm64.so
    -rw-r--r-- 1 root root 42528448 2020-07-27 09:03 lib_mali.so (This is copy of libGLES_mali.so)
    -rwxr-xr-x 1 root root 2334424 2020-07-26 04:15 libinterceptor_patrace_arm64.so

  • cat /vendor/lib64/egl/appList.cfg
    com.android.gl2jni

  • cat /vendor/lib64/egl/interceptor.cfg
    /vendor/lib64/egl/libinterceptor_patrace_arm64.so

  • ls -l /data/apitrace/
    total 3
    drwxrwxrwx 2 root root 3488 2020-07-26 04:20 com.android.gl2jni

  • ls -l /vendor/lib64/libstdc++.so
    -rw-r--r-- 1 root root 19440 2020-07-27 20:34 /vendor/lib64/libstdc++.so

Few commands that I run at boot:
setprop security.perf_harden 0
setenforce 0
mount -o rw,remount /data

trace file replay issue

When I replay GFXbench-manhatan trace files and simultaneous monitoring eglApi.cpp, I found that there were three API(eglSwapBuffers / eglSwapBuffersWithDamageKHR) calls for each snap frame, is that normal ?

rreplay trace adb shell command:
adb shell 'am start -n com.arm.pa.paretrace/.Activities.RetraceActivity --ez multithread true --ez insequence true --ez force_single_window false --es fileName "/sdcard/apitrace/trace_repo/com.samsung.sdet.benchmark.manhattan.pat" --es snapshotPrefix "/sdcard/egl_dump/" --es snapshotCallset "*/frame"'

snapshot wrong picture paretrace retrace

Hello
There's a replay issue that needs your support.

issue occurrence probability:over 1/100.

issue demo:
normal case : snapshot start- pic1-pic2-pic3-pic4-pic5-pic6-pic7-pic8-pic9 = end
this issue case : snapshot start- pic1-pic2-pic3-pic6-pic7-pic6-pic7-pic8-pic9 = end

pic4 and pic5 lost and pic6-pic7 replay twice

replay a trace file(such as :com.samsung.sdet.benchmark.t_rex.pat) with snapshot, some frames will loss and some frames are duplicate.

adb shell command:
am start -n com.arm.pa.paretrace/.Activities.RetraceActivity --ei oresW 2008 --ei oresH 1080 --ez multithread true --ez insequence true --ez force_single_window false --es fileName "/sdcard/apitrace/trace_repo/com.samsung.sdet.benchmark.t_rex.pat" --es snapshotPrefix "/sdcard/egl_dump/" --es snapshotCallset "*/frame"

--------------------------------Here is my debugging information----------------------------------------
I try to find why paretrace snapshot wrong picture, and I fonnd between pic3-pic6 replay mCurCall.funcId sequence “disorder”

I print retreacer mCurCall.funcId sequence,I found the sequence disorder when issue occured,
I want to know why retreacer mCurCall.funcId sequence disorder!!! I should be same every time replay!

If you have any suggestion to debug this issue, please share to me ,thankyou~

debug code:

const bool doTakeSnapshot = mOptions.mSnapshotCallSet &&
        (mOptions.mSnapshotCallSet->contains(mCurCallNo, mFile.ExIdToName(mCurCall.funcId)));

    const bool doFrameTakeSnapshot = mOptions.mSnapshotCallSet &&
        (mOptions.mSnapshotCallSet->contains(mDispatchFrameNo, mFile.ExIdToName(mCurCall.funcId)));

    const bool isSwapBuffers = (mCurCall.funcId == mExIdEglSwapBuffers || mCurCall.funcId == mExIdEglSwapBuffersWithDamage);
   //add  debug code xinhua.zhang@
    fprintf(fp,"%d : %d -( %d : %d : %d)\n",mCurCallNo,mCurCall.funcId,doTakeSnapshot,doFrameTakeSnapshot,isSwapBuffers);    
    if (doFrameTakeSnapshot && isSwapBuffers)
    {        
        if (!mOptions.mMultiThread)
        {
            // Single thread mode
            this->TakeSnapshot(mCurCallNo-1, mDispatchFrameNo);
        }
        else
        {
            SnapshotWork* work = new SnapshotWork(mCurCall.tid, mDispatchFrameNo, mCurCallNo - 1, NULL, NULL, "Snapshot", NULL);
            DispatchWork(work);
        }
    }

when mCurCallNo = 1520054 , issue occur:

trace relay mCurCall.funcId sequence disorder during issue occur:

...
1520044 : 45 -( 0 : 0 : 0)
1520045 : 40 -( 0 : 0 : 0)
1520046 : 134 -( 0 : 0 : 0)
1520047 : 133 -( 0 : 0 : 0)
1520048 : 7 -( 0 : 0 : 0)
1520049 : 144 -( 0 : 0 : 0)
1520050 : 45 -( 0 : 0 : 0)
1520051 : 40 -( 0 : 0 : 0)
1520052 : 134 -( 0 : 0 : 0)
1520053 : 133 -( 0 : 0 : 0)
1520054 : 7 -( 0 : 0 : 0)
1520055 : 7 -( 0 : 0 : 0)
1520056 : 144 -( 0 : 0 : 0)
1520057 : 45 -( 0 : 0 : 0)
1520058 : 40 -( 0 : 0 : 0)
1520059 : 134 -( 0 : 0 : 0)
1520060 : 133 -( 0 : 0 : 0)
1520061 : 126 -( 0 : 0 : 0)
1520062 : 7 -( 0 : 0 : 0)
1520063 : 7 -( 0 : 0 : 0)
...

normal mCurCall.funcId sequence:

...
1520044 : 45 -( 0 : 0 : 0)
1520045 : 40 -( 0 : 0 : 0)
1520046 : 134 -( 0 : 0 : 0)
1520047 : 133 -( 0 : 0 : 0)
1520048 : 7 -( 0 : 0 : 0)
1520049 : 144 -( 0 : 0 : 0)
1520050 : 45 -( 0 : 0 : 0)
1520051 : 40 -( 0 : 0 : 0)
1520052 : 134 -( 0 : 0 : 0)
1520053 : 133 -( 0 : 0 : 0)
1520054 : 126 -( 0 : 0 : 0)
1520055 : 7 -( 0 : 0 : 0)
1520056 : 7 -( 0 : 0 : 0)
1520057 : 47 -( 0 : 0 : 0)
1520058 : 144 -( 0 : 0 : 0)
1520059 : 47 -( 0 : 0 : 0)
1520060 : 144 -( 0 : 0 : 0)
1520061 : 144 -( 0 : 0 : 0)
1520062 : 45 -( 0 : 0 : 0)
1520063 : 40 -( 0 : 0 : 0)
...

Compilation errors building on Fedora 35

Building on Fedora 35 and have these compilation errors:

166 /home/edwel1109/my_droid/patrace/thirdparty/libpng/pngprefix.h:141:27: error: ‘number_buf’ may be used uninitialized [-Werror=maybe-uninitialized]
209 /home/edwel1109/my_droid/patrace/thirdparty/libcollector/collectors/perf.cpp:425:25: error: loop variable ‘pair’ creates a copy from type ‘const std::pair<const std::__cxx1
1::basic_string, CollectorValueList>’ [-Werror=range-loop-construct]
216 /home/edwel1109/my_droid/patrace/thirdparty/libcollector/collectors/perf.cpp:436:29: error: loop variable ‘pair’ creates a copy from type ‘const std::pair<const std::__cxx1
1::basic_string, CollectorValueList>’ [-Werror=range-loop-construct]

build-errors-patrace.txt

Cannot remount /vendor as read-only on Android 10 / API 29 device which precludes tracing

In order to install the interceptor file manual.md instructs as follows:

adb shell  
su  
mount -o rw,remount /vendor  
cp /sdcard/libinterceptor_patrace_arm.so /vendor/lib/egl/libinterceptor_patrace_arm.so 

However there is no su on the device I am using, as an apparent result the remount does not work and the cp fails.

# su
/system/bin/sh: su: inaccessible or not found 
# mount -o rw,remount /vendor
'/dev/block/dm-3' is read-only
# cp /sdcard/libinterceptor_patrace_arm.so  /vendor/lib/egl/libinterceptor_patrace_arm.so                                                                            
cp: /vendor/lib/egl/libinterceptor_patrace_arm.so: Read-only file system

I have tried a number of variations on the mount. I even considered completely unmounting and mounting but the umount fails since /vendor is in use. I get this from prop, id, and ls and mount on /vendor.

# getprop ro.treble.enabled
true
# id
uid=0(root) gid=0(root)  groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:su:s0
# ls -lsd /vendor                                                                                                                                                                
4 drwxr-xr-x 13 root shell 4096 2008-12-31 16:00 /vendor
# mount | grep /vendor
/dev/block/dm-3 on /vendor type ext4 (ro,seclabel,relatime,discard,errors=remount-ro)

The document intimates that this has been tested on Android 10, what am I missing? Unless I can write to /vendor, it appears that tracing is not possible.

Android build problems: make: *** [all] Error 2

I want to build the patrace for android, and i use the ndk from the link in the manual, the sdk is the sdk_r24.4.1 because the version of sdk in the manual cannot be upgraded to acquire the android-23.
But i get the following error, could you give some advice?
Thank you.


./scripts/build.py patrace x11_x64 release
Command : cmake -H/home/paullee/ls/patrace-master/patrace/project/cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/x11_x64.cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/paullee/ls/patrace-master/install/patrace/x11_x64/release -DCMAKE_BUILD_TYPE=Release -DTEST_LIBRARY= -B/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release

Current directory : /home/paullee/ls/patrace-master
Command : cmake -H/home/paullee/ls/patrace-master/patrace/project/cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/x11_x64.cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/paullee/ls/patrace-master/install/patrace/x11_x64/release -DCMAKE_BUILD_TYPE=Release -DTEST_LIBRARY= -B/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release

-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- main ar: /usr/bin/ar
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- libpng ar: /usr/bin/ar
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- link with x11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-lwx_gtk2u_richtext-3.0 (found version "3.0.4")
-- -L/usr/lib/x86_64-linux-gnu-pthread-lwx_gtk2u_core-3.0-lwx_baseu-3.0-lwx_gtk2u_richtext-3.0
-- Configuring done
CMake Warning (dev) in pat_editor_gui/CMakeLists.txt:
Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

For compatibility, CMake is excluding the GENERATED source file(s):

"/home/paullee/ls/patrace-master/patrace/src/common/call_parser.cpp"

from processing by AUTOMOC and AUTOUIC. If any of the files should be
processed, set CMP0071 to NEW. If any of the files should not be
processed, explicitly exclude them by setting the source file property
SKIP_AUTOGEN:

set_property(SOURCE file.h PROPERTY SKIP_AUTOGEN ON)

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at fakedriver/CMakeLists.txt:19 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target
"/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/fakedriver/gles1/auto.cpp"
of target "GLESv1_CM" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at fakedriver/CMakeLists.txt:9 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target
"/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/fakedriver/egl/auto.cpp"
of target "EGL" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at fakedriver/CMakeLists.txt:29 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target
"/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/fakedriver/gles2/auto.cpp"
of target "GLESv2" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

TEST_LIBRARY

-- Build files have been written to: /home/paullee/ls/patrace-master/builds/patrace/x11_x64/release
Command : make install -j8 -C "/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release"

Current directory : /home/paullee/ls/patrace-master
Command : make install -j8 -C "/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release"

make: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[1]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
Scanning dependencies of target eglproc_auto_src_generation
Scanning dependencies of target retrace_gles_auto_src_generation
Scanning dependencies of target snappy_bundled
Scanning dependencies of target md5
Scanning dependencies of target call_parser_src_generation
Scanning dependencies of target glxml_header
Scanning dependencies of target png_bundled
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
Scanning dependencies of target z_bundled
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: *** No rule to make target '/home/paullee/ls/patrace-master/thirdparty/opengl-registry/xml/gl.xml', needed by 'CMakeFiles/eglproc_auto_src_generation'. Stop.
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/eglproc_auto_src_generation.dir/all' failed
make[1]: *** [CMakeFiles/eglproc_auto_src_generation.dir/all] Error 2
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: *** No rule to make target '/home/paullee/ls/patrace-master/thirdparty/opengl-registry/xml/gl.xml', needed by 'CMakeFiles/glxml_header'. Stop.
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/glxml_header.dir/all' failed
make[1]: *** [CMakeFiles/glxml_header.dir/all] Error 2
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 0%] Building C object md5/CMakeFiles/md5.dir/md5.c.o
[ 0%] Generating /home/paullee/ls/patrace-master/patrace/src/common/call_parser.cpp
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 0%] Building CXX object snappy/CMakeFiles/snappy_bundled.dir/snappy-sinksource.cc.o
[ 0%] Building CXX object snappy/CMakeFiles/snappy_bundled.dir/snappy-stubs-internal.cc.o
[ 0%] Building CXX object snappy/CMakeFiles/snappy_bundled.dir/snappy.cc.o
[ 0%] Building C object zlib/CMakeFiles/z_bundled.dir/adler32.c.o
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
make[2]: Entering directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 1%] Building C object libpng/CMakeFiles/png_bundled.dir/png.c.o
Traceback (most recent call last):
File "/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/retracer/retrace.py", line 8, in
import specs.gles12api as gles12api
File "/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/retracer/../specs/gles12api.py", line 36, in
tree = ET.parse(os.path.join(script_dir, '../../../thirdparty/opengl-registry/xml/gl.xml'))
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/home/paullee/ls/patrace-master/patrace/src/specs/../../../thirdparty/opengl-registry/xml/gl.xml'
Traceback (most recent call last):
File "/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/common/call_parser.py", line 7, in
import specs.gles12api as gles12api
File "/home/paullee/ls/patrace-master/patrace/project/cmake/../../src/common/../specs/gles12api.py", line 36, in
tree = ET.parse(os.path.join(script_dir, '../../../thirdparty/opengl-registry/xml/gl.xml'))
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/home/paullee/ls/patrace-master/patrace/src/specs/../../../thirdparty/opengl-registry/xml/gl.xml'
CMakeFiles/retrace_gles_auto_src_generation.dir/build.make:63: recipe for target 'CMakeFiles/retrace_gles_auto_src_generation' failed
make[2]: *** [CMakeFiles/retrace_gles_auto_src_generation] Error 1
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/retrace_gles_auto_src_generation.dir/all' failed
make[1]: *** [CMakeFiles/retrace_gles_auto_src_generation.dir/all] Error 2
CMakeFiles/call_parser_src_generation.dir/build.make:66: recipe for target '/home/paullee/ls/patrace-master/patrace/src/common/call_parser.cpp' failed
make[2]: *** [/home/paullee/ls/patrace-master/patrace/src/common/call_parser.cpp] Error 1
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/call_parser_src_generation.dir/all' failed
make[1]: *** [CMakeFiles/call_parser_src_generation.dir/all] Error 2
[ 1%] Building C object libpng/CMakeFiles/png_bundled.dir/pngerror.c.o
[ 1%] Building C object libpng/CMakeFiles/png_bundled.dir/pngget.c.o
[ 1%] Building C object zlib/CMakeFiles/z_bundled.dir/compress.c.o
[ 2%] Building C object zlib/CMakeFiles/z_bundled.dir/deflate.c.o
[ 2%] Building C object zlib/CMakeFiles/z_bundled.dir/crc32.c.o
[ 2%] Linking C static library libmd5.a
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 2%] Built target md5
[ 2%] Building C object zlib/CMakeFiles/z_bundled.dir/gzclose.c.o
[ 2%] Building C object libpng/CMakeFiles/png_bundled.dir/pngmem.c.o
[ 2%] Building C object zlib/CMakeFiles/z_bundled.dir/gzlib.c.o
[ 2%] Building C object libpng/CMakeFiles/png_bundled.dir/pngpread.c.o
[ 3%] Building C object libpng/CMakeFiles/png_bundled.dir/pngread.c.o
[ 3%] Building C object libpng/CMakeFiles/png_bundled.dir/pngrio.c.o
[ 3%] Building C object zlib/CMakeFiles/z_bundled.dir/gzread.c.o
[ 3%] Building C object libpng/CMakeFiles/png_bundled.dir/pngrtran.c.o
[ 4%] Building CXX object snappy/CMakeFiles/snappy_bundled.dir/snappy-c.cc.o
[ 4%] Building C object libpng/CMakeFiles/png_bundled.dir/pngrutil.c.o
[ 5%] Building C object zlib/CMakeFiles/z_bundled.dir/gzwrite.c.o
[ 6%] Building C object libpng/CMakeFiles/png_bundled.dir/pngset.c.o
[ 6%] Building C object zlib/CMakeFiles/z_bundled.dir/inflate.c.o
[ 6%] Building C object libpng/CMakeFiles/png_bundled.dir/pngtrans.c.o
[ 6%] Building C object libpng/CMakeFiles/png_bundled.dir/pngwio.c.o
[ 6%] Linking CXX static library libsnappy_bundled.a
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 6%] Building C object libpng/CMakeFiles/png_bundled.dir/pngwrite.c.o
[ 6%] Built target snappy_bundled
[ 7%] Building C object libpng/CMakeFiles/png_bundled.dir/pngwtran.c.o
[ 7%] Building C object libpng/CMakeFiles/png_bundled.dir/pngwutil.c.o
[ 7%] Building C object zlib/CMakeFiles/z_bundled.dir/infback.c.o
[ 7%] Building C object zlib/CMakeFiles/z_bundled.dir/inftrees.c.o
[ 8%] Building C object zlib/CMakeFiles/z_bundled.dir/inffast.c.o
[ 8%] Building C object zlib/CMakeFiles/z_bundled.dir/trees.c.o
[ 8%] Building C object zlib/CMakeFiles/z_bundled.dir/uncompr.c.o
[ 8%] Building C object zlib/CMakeFiles/z_bundled.dir/zutil.c.o
[ 8%] Linking C static library libpng_bundled.a
[ 9%] Linking C static library libz_bundled.a
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 9%] Built target png_bundled
make[2]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
[ 9%] Built target z_bundled
make[1]: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release'
The following command failed with error code 2:
make install -j8 -C "/home/paullee/ls/patrace-master/builds/patrace/x11_x64/release"

Android build issue : make: *** No targets specified and no makefile found. Stop.

xinhua.zhang@tj02759lab276u:~/Downloads/patrace/patrace$ ./scripts/build.py patrace android release
Using ndk-build: /home/xinhua.zhang/Downloads/android-ndk-r13b
Command : cmake -DSRC_ROOT=/home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=2 -DPATRACE_VERSION_MINOR=13 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY= -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/cmake/egltrace/config.cmake

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : cmake -DSRC_ROOT=/home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=2 -DPATRACE_VERSION_MINOR=13 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY= -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/cmake/egltrace/config.cmake

Command : sed -i -e "s/(<string name="version">).*(</string>)/\1r2p13 unofficial dev\2/g" /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : sed -i -e "s/(<string name="version">).*(</string>)/\1r2p13 unofficial dev\2/g" /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Command : sed -i -e "s/(android:versionCode=")[0-9]*/\12130/g" /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : sed -i -e "s/(android:versionCode=")[0-9]*/\12130/g" /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Command : android update project --name android_assets --target android-23 --path /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : android update project --name android_assets --target android-23 --path /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets

Updated and renamed default.properties to project.properties
Updated local.properties
Added file /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets/build.xml
Added file /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets/proguard-project.txt
Command : android update project --name eglretrace --target android-23 --path /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : android update project --name eglretrace --target android-23 --path /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace

Updated and renamed default.properties to project.properties
Updated local.properties
Added file /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace/build.xml
Added file /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/eglretrace/proguard-project.txt
Command : android update project --name template --target android-23 --path /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/integration_tests/template

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : android update project --name template --target android-23 --path /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/integration_tests/template

Updated and renamed default.properties to project.properties
Updated local.properties
Added file /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/integration_tests/template/build.xml
Added file /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/integration_tests/template/proguard-project.txt


Building patrace/egltrace


Command : make -j8 -C /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/egltrace

Current directory : /home/xinhua.zhang/Downloads/patrace/patrace
Command : make -j8 -C /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/egltrace

make: Entering directory '/home/xinhua.zhang/Downloads/patrace/patrace/patrace/project/android/egltrace'
make: *** No targets specified and no makefile found. Stop.
make: Leaving directory '/home/xinhua.zhang/Downloads/patrace/patrace/patrace/project/android/egltrace'
The following command failed with error code 2:
make -j8 -C /home/xinhua.zhang/Downloads/patrace/patrace/scripts/../patrace/project/android/egltrace

Needs typo fix

File path: patrace / patrace / python / patracetools / patracetools / trace_editor_ui.py

Typo fix

from patrce import InputFile -> from patrace import InputFile
in MainWindow(QMainWindow) init

Tracing on Nexus 6 (Adreno GPU)

I want to trace an app on Nexus 6 (Adreno GPU). I have followed the instructions in the manual to build the libraries and install fakedriver and interceptor. But after I ran and closed the app, no "Close trace file" showed up in logcat and no trace file was created.

I had tried setting FlushTraceFileEveryFrame to true in tracerparams.cfg, but still nothing was created.

I noticed that in /project/android/egltrace/ there is an README which says "After reboot, the interceptor will be enabled", but when I reboot Nexus was stuck on Google logo at start up and I had to flash it..

So I think maybe PATrace does not support for Adreno GPU? (since the implementation of Interceptor is related to Mali drivers?) If I want to use PATrace, is mobiles with Mail GPU a better choice?

Import/Export

What would be needed to make an export to / import from a RenderDoc or ApiTrace file?

Trace on dimensity 9000+

I install the fakedriver and interceptor on a machine with MTK Dimensity 9000+ chip。 Before that , I have succeed to trace on a machine with MTK Dimensity 9000 chip.(Both on Android 12)

When I used adb logcat | grep -i "patrace", "9000+" didn't log anything. It seems that PaTrace didn't not capture the process name that configed in appList.cfg。For example, Genshin Impact and Honor of Kings, etc.

Does anything I can do to trace on MTK Dimensity 9000+ machine?

no xdg shell support as weston11 has remove the wl_shell

`
root@host:~/# paretrace -debugfull bin.trace.1.pat

in_file_mt.cpp,103: ### .pat file format Version 4 ###

trace_executor.cpp,500: [c4294967295,f0] Failed to obtain the shell, compositor and/or output interface

trace_executor.cpp,688: Results written to results.json

Aborted

root@host:~/# cat results.json

{
   "error" : [ "TRACE_ERROR_GENERIC" ],
   "error_description" : [
      "[c4294967295,f0] Failed to obtain the shell, compositor and/or output interface"
   ]
}
`

Android build issue

Hello, I am trying to build the eglretrace-release.apk howver facing build issue at start.

harsh@harsh-ubuntu:~/Documents/patrace$ android list targets
Available Android targets:
----------
id: 1 or "android-20"
     Name: Android 4.4W
     Type: Platform
     API level: 20
     Revision: 1
     Skins: WXGA720, HVGA, WQVGA400, WSVGA, WVGA854, WXGA800, WVGA800 (default), QVGA, WQVGA432, WXGA800-7in
 Tag/ABIs : no ABIs.

harsh@harsh-ubuntu:~/Documents/patrace$ echo $PATH
/home/harsh/Downloads/**android-ndk-r13b**:/home/harsh/Downloads/adt-bundle-linux-x86_64-20140702/sdk/tools:/home/harsh/Downloads/**adt-bundle-linux-x86_64-2014070**2/sdk/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/harsh/bin:/usr/java/jdk1.8.0_73/bin
harsh@harsh-ubuntu:~/Documents/patrace$ ./scripts/build.py patrace android release
Using ndk-build: /home/harsh/Downloads/android-ndk-r13b
Command : cmake -DSRC_ROOT=/home/harsh/Documents/patrace/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=2 -DPATRACE_VERSION_MINOR=12 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY= -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/harsh/Documents/patrace/scripts/../patrace/project/cmake/egltrace/config.cmake

Current directory : /home/harsh/Documents/patrace
Command : cmake -DSRC_ROOT=/home/harsh/Documents/patrace/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=2 -DPATRACE_VERSION_MINOR=12 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY= -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/harsh/Documents/patrace/scripts/../patrace/project/cmake/egltrace/config.cmake

Command : sed -i -e "s/\(<string name=\"version\">\).*\(<\/string>\)/\1r2p12 unofficial dev\2/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Current directory : /home/harsh/Documents/patrace
Command : sed -i -e "s/\(<string name=\"version\">\).*\(<\/string>\)/\1r2p12 unofficial dev\2/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Command : sed -i -e "s/\(android:versionCode=\"\)[0-9]*/\12120/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Current directory : /home/harsh/Documents/patrace
Command : sed -i -e "s/\(android:versionCode=\"\)[0-9]*/\12120/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Command : android update project --name android_assets --target android-23 --path /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets

Current directory : /home/harsh/Documents/patrace
Command : android update project --name android_assets --target android-23 --path /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets

Error: Target id 'android-23' is not valid. Use 'android list targets' to get the target ids.
The following command failed with error code 1:
android update project --name android_assets --target android-23 --path /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets
harsh@harsh-ubuntu:~/Documents/patrace$ vim scripts/build_all.py
harsh@harsh-ubuntu:~/Documents/patrace$ ./scripts/build.py patrace android release
Using ndk-build: /home/harsh/Downloads/android-ndk-r13b
Command : cmake -DSRC_ROOT=/home/harsh/Documents/patrace/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=2 -DPATRACE_VERSION_MINOR=12 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY= -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/harsh/Documents/patrace/scripts/../patrace/project/cmake/egltrace/config.cmake

Current directory : /home/harsh/Documents/patrace
Command : cmake -DSRC_ROOT=/home/harsh/Documents/patrace/scripts/../patrace/src -DPATRACE_VERSION_MAJOR=2 -DPATRACE_VERSION_MINOR=12 -DPATRACE_VERSION_PATCH=0 -DPATRACE_REVISION=unofficial -DPATRACE_VERSION_TYPE=dev -DTEST_LIBRARY= -DCMAKE_VERBOSE_MAKEFILE=TRUE -P /home/harsh/Documents/patrace/scripts/../patrace/project/cmake/egltrace/config.cmake

Command : sed -i -e "s/\(<string name=\"version\">\).*\(<\/string>\)/\1r2p12 unofficial dev\2/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Current directory : /home/harsh/Documents/patrace
Command : sed -i -e "s/\(<string name=\"version\">\).*\(<\/string>\)/\1r2p12 unofficial dev\2/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/res/values/strings.xml

Command : sed -i -e "s/\(android:versionCode=\"\)[0-9]*/\12120/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Current directory : /home/harsh/Documents/patrace
Command : sed -i -e "s/\(android:versionCode=\"\)[0-9]*/\12120/g" /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/AndroidManifest.xml

Command : android update project --name android_assets --target android-20 --path /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets

Current directory : /home/harsh/Documents/patrace
Command : android update project --name android_assets --target android-20 --path /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets

Updated and renamed default.properties to project.properties
Updated local.properties
Added file /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets/build.xml
Added file /home/harsh/Documents/patrace/scripts/../thirdparty/libcollector/android/gradle/collector_android/android_assets/proguard-project.txt
Command : android update project --name template --target android-20 --path /home/harsh/Documents/patrace/scripts/../patrace/project/android/integration_tests/template

Current directory : /home/harsh/Documents/patrace
Command : android update project --name template --target android-20 --path /home/harsh/Documents/patrace/scripts/../patrace/project/android/integration_tests/template

Updated and renamed default.properties to project.properties
Updated local.properties
Added file /home/harsh/Documents/patrace/scripts/../patrace/project/android/integration_tests/template/build.xml
Added file /home/harsh/Documents/patrace/scripts/../patrace/project/android/integration_tests/template/proguard-project.txt
Command : android update project --name eglretrace --target android-20 --path /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace

Current directory : /home/harsh/Documents/patrace
Command : android update project --name eglretrace --target android-20 --path /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace

Updated and renamed default.properties to project.properties
Updated local.properties
Added file /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/build.xml
Added file /home/harsh/Documents/patrace/scripts/../patrace/project/android/eglretrace/proguard-project.txt
**********************************************************************
Building patrace/egltrace
**********************************************************************
Command : make -j8 -C /home/harsh/Documents/patrace/scripts/../patrace/project/android/egltrace

Current directory : /home/harsh/Documents/patrace
Command : make -j8 -C /home/harsh/Documents/patrace/scripts/../patrace/project/android/egltrace

make: Entering directory '/home/harsh/Documents/patrace/patrace/project/android/egltrace'
make: *** No targets specified and no makefile found. Stop.
make: Leaving directory '/home/harsh/Documents/patrace/patrace/project/android/egltrace'
The following command failed with error code 2:
make -j8 -C /home/harsh/Documents/patrace/scripts/../patrace/project/android/egltrace

Can you please let me know what are the steps I am missing ?

Regards,

Tracing 64-bit apps on Galaxy S10

I want to trace a 64-bit app on Galaxy S10 (ARM GPU). I have followed the instructions to build the libraries. Also, I installed the fake driver with:

adb push libGLES_wrapper_arm64.so /vendor/lib64/egl/
mv /vendor/lib64/egl/libGLES_mali.so /vendor/lib64/egl/lib_mali.so
chmod 755 /vendor/lib64/egl/libGLES_wrapper_arm64.so

/vendor/lib64/egl # ls
appList.cfg
libGLES_wrapper_arm64.so
libinterceptor_patrace_arm64.so
interceptor.cfg lib_mali.so

But when I run the app, it says:

couldn't find an OpenGL ES implementation, make sure you set ro.hardware.egl or ro.board.platform
Aborted

Is there anything missing in my setup? lib_mali.so is renamed from libGLES_mali.so. If I revert this (rename lib_mali.so back to libGLES_mali.so) everything works.

high performance snapshot

Hi,
I found that when capturing GLES calls , there is a significant drop of frame rate from 60fps to 30fps. Is that normal? Any solution to get around such performance issue if I need to capture losslessly?

Thx.

Android Studio build instructions unclear, getting errors on attempts

Hello, thank you for this great project.

The "Building for Android with Gradle (since r3p1)" headed section of the README is unclear on which steps apply to building with command line vs with Android Studio. I have been unable to guess correctly so far. Which steps apply for Studio, and can we better separate the instructions for Studio vs CLI in that section?

compile error with gcc 12.2.0

[ 50%] Building CXX object common/CMakeFiles/common.dir/home/pls/work/source/patrace/patrace/src/common/gl_utility.cpp.o
/home/pls/work/source/patrace/patrace/src/common/in_file.cpp: In member function ‘const bool common::InFileBase::isFFTrace() const’:
/home/pls/work/source/patrace/patrace/src/common/in_file.cpp:168:21: error: loop variable ‘c’ creates a copy from type ‘const Json::Value’ [-Werror=range-loop-construct]
168 | for (const auto c : conv) if (c["tool"].asString() == "fastforward") { DBG_LOG("Is a fastforward trace\n"); return true; }
| ^
/home/pls/work/source/patrace/patrace/src/common/in_file.cpp:168:21: note: use reference type to prevent copying
168 | for (const auto c : conv) if (c["tool"].asString() == "fastforward") { DBG_LOG("Is a fastforward trace\n"); return true; }
| ^
| &
/home/pls/work/source/patrace/patrace/src/common/in_file.cpp:169:21: error: loop variable ‘c’ creates a copy from type ‘const Json::Value’ [-Werror=range-loop-construct]
169 | for (const auto c : conv) if (c.isMember("fastforwardInfo")) { DBG_LOG("Is a fastforward trace\n"); return true; }
| ^
/home/pls/work/source/patrace/patrace/src/common/in_file.cpp:169:21: note: use reference type to prevent copying
169 | for (const auto c : conv) if (c.isMember("fastforwardInfo")) { DBG_LOG("Is a fastforward trace\n"); return true; }
| ^
| &
cc1plus: all warnings being treated as errors
make[2]: *** [common/CMakeFiles/common.dir/build.make:142: common/CMakeFiles/common.dir/home/pls/work/source/patrace/patrace/src/common/in_file.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

glReadBuffer with GL_BACK on offscreen rendering

Hi. While trying to use patrace, when I capture a trace file which contian glReadBuffer with GL_BACK and replay it with the offscreen option, it leads invalid API error.

So it's better to add a conditional branch on creating retrace_gles_auto.cpp.

        if func.name in ['glReadBuffer']:
            print '    RetraceOptions& opt = gRetracer.mOptions;'
            print '    if(opt.mForceOffscreen)'
            print '    {'
            print '         if(src == GL_BACK)'
            print '             src = GL_COLOR_ATTACHMENT0;'
            print '    }'

How to trace and retrace on Android 10

After build the project on Linux, I start to use it to trace game on Android fowllowing the manual. The game package name is "com.tencent.tmgp.sgame".

  1. However, when I run this game and stop it through Android UI and kill it, nothing showed in the "/data/apitrace/com.tencent.tmgp.sgame".
    2)When I install the apk "/install/patrace/android/release/eglretrace/eglretrace-release.apk", there is no button to select a trace file or start to retarace.
    Screenshot_20210617_152124

Could anyone share you whole steps to trace and retrace?

Here is my whole steps to trace this game:

STEP 1: install fakedriver
adb push /install/patrace/android/release/fakedriver/libGLES_wrapper_arm.so /sdcard/
adb shell
mount -o rw,remount /vendor

cp /sdcard/libGLES_wrapper_arm.so /vendor/lib/egl/
rm /sdcard/libGLES_wrapper_arm.so
chmod 755 /vendor/lib/egl/libGLES_wrapper_arm.so
mount -o ro,remount /vendor

STEP 2: installing interceptor
adb push install/patrace/android/release/egltrace/libinterceptor_patrace_arm.so /sdcard/
adb push install/patrace/android/release/egltrace/libinterceptor_patrace_arm64.so /sdcard/
adb shell
mount -o rw,remount /vendor

cp /sdcard/libinterceptor_patrace_arm.so /vendor/lib/egl/libinterceptor_patrace_arm.so
cp /sdcard/libinterceptor_patrace_arm64.so /vendor/lib64/egl/libinterceptor_patrace_arm64.so

chmod 755 /vendor/lib/egl/libinterceptor_patrace_arm.so
chmod 755 /vendor/lib64/egl/libinterceptor_patrace_arm64.so

echo "/vendor/lib/egl/libinterceptor_patrace_arm.so" > /vendor/lib/egl/interceptor.cfg
echo "/vendor/lib64/egl/libinterceptor_patrace_arm64.so" > /vendor/lib64/egl/interceptor.cfg

chmod 644 /vendor/lib/egl/interceptor.cfg
chmod 644 /vendor/lib64/egl/interceptor.cfg

mkdir /data/apitrace
chmod 777 /data/apitrace

STEP 3: enable GLES Layer
adb push /install/patrace/android/release/gleslayer/libGLES_layer_arm64.so /data/local/debug/gles
adb push /install/patrace/android/release/gleslayer/libGLES_layer_arm.so /data/local/debug/gles

adb shell settings put global enable_gpu_debug_layers 1
adb shell settings put global gpu_debug_layers_gles libGLES_layer_arm64.so
adb shell settings put global gpu_debug_app com.tencent.tmgp.sgame

STEP 4: set the game pakeage ub applist
adb shell
echo com.tencent.tmgp.sgame >> /system/lib/egl/appList.cfg
chmod 644 /system/lib/egl/appList.cfg
mkdir -p /data/apitrace/com.tencent.tmgp.sgame
chmod 777 /data/apitrace/com.tencent.tmgp.sgame

STEP 5:
run the game for about 2 mintues and then back to home page and kill the game through Android UI.

Retracing fails on Android

Device: OnePlus Nord 2 (MediaTek Dimensity 1200, Mali-G77 MC9)
App traced: multiple (with the same error), using Google Chrome as example

I paretrace64: DynamicLibrary.cpp,16: Open file /system/lib64/libui.so successfully, libHandle = 0x797420c4d0
I paretrace64: DynamicLibrary.cpp,30: Open function _ZN7android13GraphicBufferC1Ejjij failed: undefined symbol: _ZN7android13GraphicBufferC1Ejjij
I paretrace64: DynamicLibrary.cpp,34: Open function _ZN7android13GraphicBufferC1EjjijNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE successfully, ret = 0x78d98b9bb8
I paretrace64: DynamicLibrary.cpp,34: Open function _ZN7android13GraphicBufferD1Ev successfully, ret = 0x78d98ba0fc
I paretrace64: DynamicLibrary.cpp,34: Open function _ZNK7android13GraphicBuffer15getNativeBufferEv successfully, ret = 0x78d98ba334
I paretrace64: DynamicLibrary.cpp,30: Open function _ZN7android13GraphicBuffer4lockEjPPv failed: undefined symbol: _ZN7android13GraphicBuffer4lockEjPPv
I paretrace64: DynamicLibrary.cpp,34: Open function _ZN7android13GraphicBuffer4lockEjPPvPiS3_ successfully, ret = 0x78d98ba514
I paretrace64: DynamicLibrary.cpp,34: Open function _ZN7android13GraphicBuffer6unlockEv successfully, ret = 0x78d98ba738
I paretrace64: DynamicLibrary.cpp,34: Open function _ZNK7android13GraphicBuffer9initCheckEv successfully, ret = 0x78d98ba324
I paretrace64: DynamicLibrary.cpp,34: Open function _ZN7android13GraphicBuffer9lockYCbCrEjP13android_ycbcr successfully, ret = 0x78d98ba630
I paretrace64: trace_executor.cpp,128: Frame string: 1-9999999
I paretrace64: trace_executor.cpp,284: Thread: -1 - override: No (-1, -1)
I paretrace64: in_file_mt.cpp,103: ### .pat file format Version 4 ###
I paretrace64: retracer.cpp,536: Error: Invalid glesVersion parameter
I paretrace64: in_file.cpp,156: Could not find thread id 0 in json value
I paretrace64: retracer.cpp,509: No stored EGL config for this tid: 0
I paretrace64: library.cpp,41: Loaded /system/lib64/libGLESv2.so from /system/lib64/libGLESv2.so
I paretrace64: library.cpp,41: Loaded /system/lib64/libEGL.so from /system/lib64/libEGL.so
I paretrace64: glws_egl.cpp,319: eglInitialize 1.4
I paretrace64: glws_egl.cpp,386: EGL Configurations:
I paretrace64: Specified EGL configuration:
I paretrace64: EGL_RED_SIZE:       0
I paretrace64: EGL_GREEN_SIZE:     0
I paretrace64: EGL_BLUE_SIZE:      0
I paretrace64: EGL_ALPHA_SIZE:     0
I paretrace64: EGL_DEPTH_SIZE:     0
I paretrace64: EGL_STENCIL_SIZE:   0
I paretrace64: EGL_SAMPLES:        -1
I paretrace64: EGL_SAMPLE_BUFFERS: 0
I paretrace64:
I paretrace64: Selected EGL configuration:
I paretrace64: EGL_RED_SIZE:       5
I paretrace64: EGL_GREEN_SIZE:     6
I paretrace64: EGL_BLUE_SIZE:      5
I paretrace64: EGL_ALPHA_SIZE:     0
I paretrace64: EGL_DEPTH_SIZE:     24
I paretrace64: EGL_STENCIL_SIZE:   8
I paretrace64: EGL_SAMPLES:        4
I paretrace64: EGL_SAMPLE_BUFFERS: 1
I paretrace64:
I paretrace64:
I paretrace64: glws_egl.cpp,401: Checking sane EGL config.
F paretrace64: [c0,f0] Failed EGL sanity check
I paretrace64: trace_executor.cpp,609: Results written to /sdcard/results.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.