0

I get the frame information of a running application through dumpsys SurfaceFlinger --latency SurfaceView.

Now, I want to get the same information in a piece of code I have written for kernel. How could I access the information provided by dumpsys or dumpsys SurfaceFlinger in kernel? I have read that it is not a good idea to make system calls from within the kernel. What are the other options I have?

Matt
  • 796
  • 12
  • 25
  • What is it you're trying to do? – fadden Aug 08 '15 at 03:58
  • I'd like to calculate the fps for the running application, so I count the number of frames through the aforementioned command. I want to count the number of frames in a code written for kernel and not from the bash. – Matt Aug 08 '15 at 17:08
  • This won't work in all cases. The display is updated when anything visible changes, which could be from the current app or from the notification bar. I'm still not clear on why you feel you need this to be part of the operating system and not just a user-level command that talks to SurfaceFlinger. Perhaps you should create a small daemon that talks to SurfaceFlinger and sends the results to /dev/yourdevice? – fadden Aug 08 '15 at 17:30
  • I'm trying to write a governor that takes into account the frame refresh rate. I want to find the refresh rate of `SurfaceView` whenever an app is using it to display graphics. I do not consider notification bar or navigation bar to select the target frequencies. – Matt Aug 08 '15 at 18:22
  • where does `dumpsys SurfaceFlinger --latency SurfaceView` collect its information from? do I have access to it from kernel? – Matt Aug 09 '15 at 00:51
  • @fadden do you have any suggestions about how to do this? – Matt Aug 10 '15 at 02:30

0 Answers0