google / agi

Android GPU Inspector
https://gpuinspector.dev
Apache License 2.0
927 stars 135 forks source link

Cannot replay on an android device #929

Closed ZhangYi19860922 closed 2 years ago

ZhangYi19860922 commented 2 years ago

Hi AGI team, Replay the draw calls on the host device is well worked, but the android device cannot replay normally either from an existing gfxtrace file or after a capturing. How to make it work when I want to replay the draw calls on the android devices, or replay on android devices only through the command-line so as to get rid of the GUI.

pmuetschard commented 2 years ago

When you say "it doesn't work", what does that mean? AGI crashes? the replay doesn't look correct? the replay crashes? If you see crashes/errors in the log, please share them. What device are you using? Would you be willing to share the APK/trace files?

ZhangYi19860922 commented 2 years ago

Hi Pascal, I captured a frame from an OpenGL ES game through ANGLE. After the capture, it triggered the replay both on PC and Android. The replay performed well on PC, but occurred black screen on Android device. My android device is Oppo find X3 based on Android version S (12). The mail attachments contain 3 log files, of which gapid-apk.log is the logcat file of the android device. In addition, I wonder how to replay a gfxtrace file only through the command line (GAPIT), without AGI/GAPIC. Thank you for your answer.

Kind regards, Henry

发件人: Pascal Muetschard @.> 发送时间: 2021年9月23日 2:15 收件人: google/agi @.> 抄送: 张一(henry) @.>; Author @.> 主题: Re: [google/agi] Cannot replay on an android device (#929)

When you say "it doesn't work", what does that mean? AGI crashes? the replay doesn't look correct? the replay crashes? If you see crashes/errors in the log, please share them. What device are you using? Would you be willing to share the APK/trace files?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgoogle%2Fagi%2Fissues%2F929%23issuecomment-925168571&data=04%7C01%7Czhangyi123%40oppo.com%7Cb34f44e9ec5840ffeb8408d97df4f43e%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637679313291419249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gfnXRkIoP%2BoAIY5G7qscSeTq6SlDxqWuOAmgSYjr%2BTY%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUVO3TAASIYU2DRYUZPUDO3UDIMLZANCNFSM5EQJPNGQ&data=04%7C01%7Czhangyi123%40oppo.com%7Cb34f44e9ec5840ffeb8408d97df4f43e%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637679313291429250%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1ZoH6Z4m3gkL3kk9IVowinrJLJ6j3Aq3vttqEN%2BrYWs%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Czhangyi123%40oppo.com%7Cb34f44e9ec5840ffeb8408d97df4f43e%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637679313291429250%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EqL90Xwgix5MNpexe56IxMnGF8NjcoPRPDpNXrMoMa4%3D&reserved=0 or Androidhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Czhangyi123%40oppo.com%7Cb34f44e9ec5840ffeb8408d97df4f43e%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637679313291439240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eGBifHKbw6bo48g0ftwGH36lbccVQcbiwb2EnipKCYc%3D&reserved=0.


OPPO

本电子邮件及其附件含有OPPO公司的保密信息,仅限于邮件指明的收件人使用(包含个人及群组)。禁止任何人在未经授权的情况下以任何形式使用。如果您错收了本邮件,请立即以电子邮件通知发件人并删除本邮件及其附件。

This e-mail and its attachments contain confidential information from OPPO, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

pmuetschard commented 2 years ago

After the capture, it triggered the replay both on PC and Android. The replay performed well on PC, but occurred black screen on Android device.

AGI does not replay Android traces on the host. Android traces are replayed on the Android device. When you say it works on the PC, but you have a black screen on the device, do you mean you can see the framebuffer images correctly in the UI, but the Android device screen is black? If so, thats working as intended. The replays on the device are done off-screen.

The mail attachments contain 3 log files

Your attachments didn't make it through. You probably need to attach them to this report via the GitHub UI.

In addition, I wonder how to replay a gfxtrace file only through the command line (GAPIT)

gapit screenshot does replays. Look at the help output for all the flags.

ZhangYi19860922 commented 2 years ago

I replayed a trace file followed the CLI reference, the Android device still displayed a black screen.

E:\Projects\GraphicProfiler\bazel-bin\pkg>gapit.exe screenshot org.cocos2dx.cpp_tests_angle_20210924_1116.gfxtrace 06:27:07.948 I: Exec: E:\Projects\GraphicProfiler\bazel-bin\pkg\gapis.exe --enable-local-files --idle-timeout 1m --log-level Info --log-style brief --gapis-auth-token Ly1CdEpJ 06:27:08.618 I: 06:27:08.618 I: Adding new device 06:27:08.618 I: 06:27:08.618 I: New scheduler for device: 1a780690e5559318f0145ecd09cb97b589723c84 06:27:08.618 I: 06:27:08.618 I: New trace scheduler for device: 1a780690e5559318f0145ecd09cb97b589723c84 P80325561 06:27:08.626 I: 06:27:08.626 I: Bound on port '59270' 06:27:08.626 I: 06:27:08.626 I: Starting grpc server 06:27:09.038 I: Loaded capture; id: a290cb9bd2c5b3c0c44b777ee48ac2eed5a668b1 14:27:09.255 I: Dependency Graph Stats: 14:27:09.255 I: NumCmdNodes: 4676 NumObsNodes: 4590 14:27:09.255 I: Accesses: 14:27:09.255 I: NumFragReads: 273302 UniqueFragReads: 4692 14:27:09.255 I: NumFragWrites: 20549 UniqueFragWrites: 157 14:27:09.255 I: NumMemReads: 7233 UniqueMemReads: 4684 14:27:09.255 I: NumMemWrites: 277 UniqueMemWrites: 4692 14:27:09.255 I: NumForwardDepOpens: 16 NumForwardDepCloses: 16 NumForwardDepDrops: 1 14:27:09.255 I: Deps: 14:27:09.255 I: NumDeps: 9316 UniqueDeps: 13909 14:27:09.255 I: NumFragDeps: 4692 NumCompleteFragDeps: 0 NumMemDeps: 4608 14:27:11.685 I: [Try ABI: arm64-v8a⇒gapidapk.EnsureInstalled] Examining gapid.apk on host... 14:27:11.691 I: [Try ABI: arm64-v8a⇒gapidapk.EnsureInstalled] Looking for gapid.apk... 14:27:12.413 I: [Try ABI: arm64-v8a⇒gapidapk.EnsureInstalled] Found gapid package... 14:27:13.891 I: Using GPU profiling libraries from developer driver package: com.qualcomm.qti.gpudrivers.kona.api30. 14:27:19.104 I: [launch producer] I: Trying libgpudataproducer.so 14:27:19.109 I: [launch producer] I: Calling start at 0x77bc0c2c9c 14:27:19.109 I: [launch producer] QPerfettoCountersDataPro QProfilerInterface: Initializing (v2020.6, built Aug 19 @.***:05:30)... 14:27:19.174 I: [launch producer] QPerfettoCountersDataPro gpu.counters: Starting tracing thread 14:27:19.177 I: [launch producer] perfetto.cc:39641 Producer connected 14:27:19.255 I: [launch producer] QPerfettoCountersDataPro Start counter trace returned 0 14:27:20.104 I: [startDevInfoService] Attempt to start service: com.google.android.gapid.DeviceInfoService 14:27:26.266 I: Adding new device 14:27:26.266 I: Adding new device 14:27:26.266 I: New trace scheduler for device: 756eeb0cdf405b26a85da20f3b0f98b750142f75 OPPO PDEM10 14:27:26.266 I: New scheduler for device: 756eeb0cdf405b26a85da20f3b0f98b750142f75 06:27:26.268 I: Selected device (by serial, or name if serial is empty): 1a51f97e 14:27:26.477 I: Replay for 1 requests 14:27:26.477 I: Unlocking device screen 14:27:26.902 I: Checking gapid.apk is installed... 14:27:26.902 I: [gapidapk.EnsureInstalled] Examining gapid.apk on host... 14:27:26.907 I: [gapidapk.EnsureInstalled] Looking for gapid.apk... 14:27:27.584 I: [gapidapk.EnsureInstalled] Found gapid package... 14:27:27.584 I: Launching GAPIR... 14:27:28.673 I: Using GPU profiling libraries from developer driver package: com.qualcomm.qti.gpudrivers.kona.api30. 14:27:31.669 I: Setting up port forwarding... 14:27:33.021 I: Gapir socket: '/data/user/0/com.google.android.gapid.armeabiv7a/files/gapir-socket' is opened now 14:27:33.371 I: Waiting for connection to GAPIR... 14:27:33.676 I: Heartbeat connection setup done 14:27:33.886 I: [Oppo][executor.go][Execute] call executor.execute() 14:27:33.886 I: Replaying 8904fd61ff8fc9ddc47844c5896ea51201c3dd09 14:27:33.886 I: Beginning replay 8904fd61ff8fc9ddc47844c5896ea51201c3dd09 14:27:33.886 I: [Starting replay on gapir device] Sending begin request 14:27:35.538 I: [HandleReplayCommunication] Finished replay 8904fd61ff8fc9ddc47844c5896ea51201c3dd09

发件人: Pascal Muetschard @.> 发送时间: 2021年9月24日 1:33 收件人: google/agi @.> 抄送: 张一(henry) @.>; Author @.> 主题: Re: [google/agi] Cannot replay on an android device (#929)

After the capture, it triggered the replay both on PC and Android. The replay performed well on PC, but occurred black screen on Android device.

AGI does not replay Android traces on the host. Android traces are replayed on the Android device. When you say it works on the PC, but you have a black screen on the device, do you mean you can see the framebuffer images correctly in the UI, but the Android device screen is black? If so, thats working as intended. The replays on the device are done off-screen.

The mail attachments contain 3 log files

Your attachments didn't make it through. You probably need to attach them to this report via the GitHub UI.

In addition, I wonder how to replay a gfxtrace file only through the command line (GAPIT)

gapit screenshot does replays. Look at the help output for all the flags.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgoogle%2Fagi%2Fissues%2F929%23issuecomment-926016406&data=04%7C01%7Czhangyi123%40oppo.com%7Cb999e3c139ac4e53934708d97eb83464%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637680151892334605%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NNTzpwyzr3sSY8mayq1LkjjDAwLXAdcNZhC4jhGTuXU%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUVO3TD7HE5KUBC6SXNCHHLUDNQFBANCNFSM5EQJPNGQ&data=04%7C01%7Czhangyi123%40oppo.com%7Cb999e3c139ac4e53934708d97eb83464%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637680151892344600%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Rv%2B3aLY7RJG5PLBHW%2FF3tRtR4ldjm6tuaLEfLccUEmI%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Czhangyi123%40oppo.com%7Cb999e3c139ac4e53934708d97eb83464%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637680151892354590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=t9ySTrKrXVRLcw4RDotXTuW%2BGjvDoEN9eQxCTmbu%2F6k%3D&reserved=0 or Androidhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Czhangyi123%40oppo.com%7Cb999e3c139ac4e53934708d97eb83464%7Cf1905eb1c35341c5951662b4a54b5ee6%7C0%7C0%7C637680151892354590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=VvNM5OswCXZODev7fHuNJ4oPwiWDAj4k18AVajly5tM%3D&reserved=0.


OPPO

本电子邮件及其附件含有OPPO公司的保密信息,仅限于邮件指明的收件人使用(包含个人及群组)。禁止任何人在未经授权的情况下以任何形式使用。如果您错收了本邮件,请立即以电子邮件通知发件人并删除本邮件及其附件。

This e-mail and its attachments contain confidential information from OPPO, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

ttanatb commented 2 years ago

Closing this issue due to staleness -- please re-open if you're still running into issues with replaying.