This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No dump from streamline lwi script combo

Hello,


I am trying to profile a Unity game on Android. Have followed the Unity specific steps for dev and built the apk.

Then I try to run the lwi script with these params -

python3 lwi_me.py --lwi-mode=capture --lwi-fps-threshold=20 -v --daemon ../../../streamline/bin/arm64/gatord --lwi-out-dir= /mnt/data/Documents/armmobilestudio/frames

I see my debug app and then Select it.

I then go onto starting Streamline for capture. In the meanwhile I check with adb shell "ps -A | grep gator" and it shows the package location where gatord has started -

# ps -A | grep gator                                                                                                                                                                                    
u0_a34       11672  3102   23184   5784 SyS_epoll_wait 754df30660 S gatord

# ps -o COMMAND | grep gator

/data/data/com.company.name/gatord


When Streamline starts I choose midguard (config) as have a T860 on the SoC. It asks me that gatord is running on the system so what do you want to do... I click on advanced and choose the device visible on the screen.

Start Capture

No Data :(

In the meanwhile on the device I see another gatord running -

adb shell "ps -A | grep gator"
u0_a34       26172  3102   25232   5816 SyS_epoll_wait 7cb9572660 S gatord
u0_a34       26374 26172   25168   4348 0          7cb9573188 R gatord


Streamline is unable to capture any data, the app does not automatically start and no dump comes out. Following the procedure from here - https://youtu.be/9_mdAzAx39w

When I press enter on the lwi command window I get this -

Trying to pull LWI local capture from device if there is one
Traceback (most recent call last):
  File "lwi_me.py", line 160, in pull_capture
    adb_stdout = device.adb("shell", "run-as", package, "ls", "meerkat")
  File "/mnt/data/Documents/arm/Arm_Mobile_Studio_2021.2/performance_advisor/lwi/helpers/gator_me.py", line 244, in adb
    rep = sp.run(commands, check=True, shell=shell, stdout=sp.PIPE,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['adb', '-s', 'ADBNAME', 'shell', 'run-as', 'com.company.name', 'ls', 'meerkat']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "lwi_me.py", line 655, in <module>
    sys.exit(main())
  File "lwi_me.py", line 633, in main
    if not pull_capture(device, lwiOutDir, package):
  File "lwi_me.py", line 161, in pull_capture
    except CalledProcessError:
NameError: name 'CalledProcessError' is not defined

I am using this as a reference - developer.arm.com/.../Run-the-script-and-capture-a-Streamline-profile


PS - I can run Streamline standalone and capture data from the device but I wanted to run PA on the captured data

Parents
  • Hey Peter,

    Appreciate you reaching out to me with a solution. The reset trick worked and am able to capture SL data. But LWI was giving an exception -

    *********************************************************************************** exception starts

    Trying to pull LWI local capture from device if there is one
    package -
    Traceback (most recent call last):
      File "lwi_me.py", line 163, in pull_capture
        adb_stdout = device.adb("shell", "run-as", package, "ls", "meerkat")
      File "/mnt/yash/data/Documents/arm/Arm_Mobile_Studio_2021.2/performance_advisor/lwi/helpers/gator_me.py", line 244, in adb
        rep = sp.run(commands, check=True, shell=shell, stdout=sp.PIPE,
      File "/usr/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['adb', '-s', 'devname', 'shell', 'run-as', 'com.agingtest.yash', 'ls', 'meerkat']' returned non-zero exit status 1.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "lwi_me.py", line 664, in <module>
        sys.exit(main())
      File "lwi_me.py", line 642, in main
        if not pull_capture(device, lwiOutDir, package):
      File "lwi_me.py", line 165, in pull_capture
        except CalledProcessError:
    NameError: name 'CalledProcessError' is not defined

    *********************************************************************************** exception ends

    So I dug through the python script. Copied the libs into the app folder on the device and created a meerkat directory as well. But unfortunately the piping is still not understood by me as the frame dump was supposed to come in meerkat and then once the capture is done it needs to be pushed to the host but the meerkat directory is always empty. But the exception is gone.

    My end goal was to give the data captured by the lwi and SL to PA for analysis. But PA is complaining that - ERROR: Cannot find any frames. Please refer to the user guide for methods of providing frame data to Performance Advisor.

    Apologies as the site was under maintenance and hence could not answer yesterday.

    I also have an issue of running GA over a very heavy game (to be debugged) but the game does not go beyond the splash screen. Tried some tricks like changing the jvm in the ini file. But will give details of that in another bug coming your way :)

    Regards

    Yash

Reply
  • Hey Peter,

    Appreciate you reaching out to me with a solution. The reset trick worked and am able to capture SL data. But LWI was giving an exception -

    *********************************************************************************** exception starts

    Trying to pull LWI local capture from device if there is one
    package -
    Traceback (most recent call last):
      File "lwi_me.py", line 163, in pull_capture
        adb_stdout = device.adb("shell", "run-as", package, "ls", "meerkat")
      File "/mnt/yash/data/Documents/arm/Arm_Mobile_Studio_2021.2/performance_advisor/lwi/helpers/gator_me.py", line 244, in adb
        rep = sp.run(commands, check=True, shell=shell, stdout=sp.PIPE,
      File "/usr/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['adb', '-s', 'devname', 'shell', 'run-as', 'com.agingtest.yash', 'ls', 'meerkat']' returned non-zero exit status 1.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "lwi_me.py", line 664, in <module>
        sys.exit(main())
      File "lwi_me.py", line 642, in main
        if not pull_capture(device, lwiOutDir, package):
      File "lwi_me.py", line 165, in pull_capture
        except CalledProcessError:
    NameError: name 'CalledProcessError' is not defined

    *********************************************************************************** exception ends

    So I dug through the python script. Copied the libs into the app folder on the device and created a meerkat directory as well. But unfortunately the piping is still not understood by me as the frame dump was supposed to come in meerkat and then once the capture is done it needs to be pushed to the host but the meerkat directory is always empty. But the exception is gone.

    My end goal was to give the data captured by the lwi and SL to PA for analysis. But PA is complaining that - ERROR: Cannot find any frames. Please refer to the user guide for methods of providing frame data to Performance Advisor.

    Apologies as the site was under maintenance and hence could not answer yesterday.

    I also have an issue of running GA over a very heavy game (to be debugged) but the game does not go beyond the splash screen. Tried some tricks like changing the jvm in the ini file. But will give details of that in another bug coming your way :)

    Regards

    Yash

Children
No data