Announcement

Collapse
No announcement yet.

Step by step guide to gpu/cpu profiling

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [GEAR VR] Step by step guide to gpu/cpu profiling

    Calling out anyone that has a streamlined workflow for debugging and profiling GearVR apps.
    So far I have tried and failed a lot:
    1) running the stat openglrhi command thru the console while running the app in developer mode on my s7 displays the stats but they are too small to read (on the device)
    I even tried recording the device screen output but text still unreadable

    2) tried using Adreno to connect to the app but that did not work either ( adb found your device but no adreno enable app found / please install sdb (Samsung debug bridge) - warnings

    I would like to take my scene and figure out what the bottlenecks are.
    The only thing I've actually been able to get running is the Oculus Remote Monitor (see screenshot) and the UE4 GPU Profiler (see screenshot) but I have no clue how we are supposed to see the bottlenecks there.

    Click image for larger version

Name:	Screen Shot 2016-05-28 at 23.38.24.png
Views:	1
Size:	107.5 KB
ID:	1185052
    Click image for larger version

Name:	Screen Shot 2016-05-28 at 23.39.12.png
Views:	1
Size:	488.8 KB
ID:	1185053

    Any help or small walkthru is much appreciated.
    Last edited by Sunchaser; 05-28-2016, 03:39 PM.

    #2
    I'll try to keep this thread updated with things I find that could help anyone else.

    To display fps when device plugged into GearVR (readable this time):
    - open level blueprint
    - add ad Execute Console Command - node
    - input "stat fps" in the Command-inputfield
    - connect EventBeginPlay to the ExecuteConsoleCommand (the EventBeginPlay will enable itself now)

    edit : might as well add another ExecuteConsoleCommand node with "stat units" (see screenshot to chain them)

    Click image for larger version

Name:	Screen Shot 2016-05-29 at 21.42.56.png
Views:	1
Size:	70.6 KB
ID:	1107309
    Last edited by Sunchaser; 05-30-2016, 05:59 AM.

    Comment


      #3
      You can also find some really good debug tips using the following document.

      https://docs.unrealengine.com/latest...ing/index.html

      Comment


        #4
        Originally posted by Sam Deiter View Post
        You can also find some really good debug tips using the following document.

        https://docs.unrealengine.com/latest...ing/index.html
        Thanks for the input.
        I've read that document.
        While it's a good manual to setup debugging it does not really shift to the practical side of things other than seeing triangle count and finding out which scene assets are causing the framerate to drop. (which specific material / texture / mesh is causing a delay in CPU or GPU processing.)

        For example - after reading the doc I still have no clue how to read the Oculus Remote Monitor logs ... and how to fix the Vsync warnings that show up. Attached is a screenshot of a part of the Remote Monitor output.

        Click image for larger version

Name:	Screen Shot 2016-06-01 at 19.20.31.png
Views:	1
Size:	153.6 KB
ID:	1107515

        Comment


          #5
          This would be a really helpfull thread for GearVR developers I hope
          [MENTION=868]Sam Deiter[/MENTION] - Couple of questions:

          - With the GearVR we can't just plug&play like Oculus/Vive, but we have to build the app and plug the phone into the GearVR and check the results from there....is it possible to set UE4 to have the same performance/limitations as if I was developing for the GearVR? ( unless there is already something like that )

          - As Sunchaser pointed out, sometimes is difficult to see what shader/texture/mesh is causing a fps drop, and to be able to easily check what is the root of the issue will be essential to develop projects efficiently.

          - Some sample scenes would be wonderfull!!!! also to better understand the balance of polycount, shaders, MIC usage and textures.
          ENTER REALITY

          VR Solutions

          Contact us for more informations

          Comment


            #6
            I have a strange problem where the window showing results for Stat Unit or Stat Rendering is partially drawn off screen where I can't read it.
            Will this command dump the results to a log on the device itself?
            UE4Editor.exe -silent LOG=MyLog.txt

            Comment


              #7
              Originally posted by Sunchaser View Post
              For example - after reading the doc I still have no clue how to read the Oculus Remote Monitor logs ... and how to fix the Vsync warnings that show up. Attached is a screenshot of a part of the Remote Monitor output.
              That's something you should be asking Oculus on their dev forums, since it's their app.

              Comment


                #8
                Hey There,

                I'm bumping up this thread as I'm currently trying to figure out a proper workflow to profile CPU/GPU performance on GearVR.
                Specifically, I am trying to find something as simple as getting the draw call number and triangle count on device, and unfortunately the stat scenerendering and stat engine are pretty much unreadable on device.

                I am able to recover from the device then chunk into session frontend, the profiling file obtained from stat startfile/stat stoptfile. But that only give the time spent inside the top-level profiled functions, so that doesn't help me with the actual data like draw calls, number of element instantiated, or trying to figure out which specific shader is actually taking to much time.

                So if anyone has some idea to share in that regards, that would be much appreciated.

                Cheers.

                Comment

                Working...
                X