ARM-software / gator

Sources for Arm Streamline's gator daemon, part of Arm Mobile Studio suite of performance analysis tools
https://www.arm.com/products/development-tools/graphics/arm-mobile-studio
133 stars 70 forks source link

gator: Fix value size does not match register size #16

Closed LeptonWu closed 4 years ago

LeptonWu commented 4 years ago

This fix such errors when compiling with clang: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths]

Signed-off-by: Lepton Wu ytht.net@gmail.com

bengaineyarm commented 4 years ago

Thanks for these Lepton. I'll merge them in for anyone who is interested, but I'm very shortly about to merge in the next release of the product, which fully removes gator.ko anyway.

LeptonWu commented 4 years ago

Hi Ben,

Thanks, just curious, what do you mean by "removes gator.ko", does that mean streamline can work without gator kernel module? does it require a special kernel or version of the kernel?

On Wed, Mar 11, 2020 at 1:59 AM Ben Gainey notifications@github.com wrote:

Thanks for these Lepton. I'll merge them in for anyone who is interested, but I'm very shortly about to merge in the next release of the product, which fully removes gator.ko anyway.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ARM-software/gator/pull/16?email_source=notifications&email_token=AGUJ4RZFYW5HSXIQRRPJG33RG5HF3A5CNFSM4LFJ3D32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOOWEAQ#issuecomment-597516802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUJ4RY3U5VIZMCGD653TXDRG5HF3ANCNFSM4LFJ3D3Q .

bengaineyarm commented 4 years ago

Yes; gator.ko is not required (and has been optional for a while now).

So long as you have usual general prerequisites available in kernel (such as support for perf, ftrace etc) then you can use gatord on its own to collect counters (similar to 'perf record'). The prerequisite kernel options are generally the same as you would require to run 'perf record' (or simpleperf on Android), and for many desktop-like distros and many kernel def_configs, are on by default.

If you wish to continue to capture the performance of the whole system (such as would be the case if you are used to using gator.ko) then you will continue to launch gatord as root user, but no need to load or even build gator.ko.

You can also (as non-root user) capture individual processes with something like:

gatord -A <some-command> <arg1> <arg2>...

In this case, the application will be started when you start the capture (and you can have gatord either terminate the app when you disconnect, or disconnect when the app terminates).

LeptonWu commented 4 years ago

On Wed, Mar 11, 2020 at 11:18 AM Ben Gainey notifications@github.com wrote:

Yes; gator.ko is not required (and has been optional for a while now).

Just want to confirm, I mostly like to collect performance data of GPU (mali), will this be supported without any kernel model? I need something to help understand the load of GPU.

So long as you have usual general prerequisites available in kernel (such as support for perf, ftrace etc) then you can use gatord on its own to collect counters (similar to 'perf record'). The prerequisite kernel options are generally the same as you would require to run 'perf record' (or simpleperf on Android), and for many desktop-like distros and many kernel def_configs, are on by default.

If you wish to continue to capture the performance of the whole system (such as would be the case if you are used to using gator.ko) then you will continue to launch gatord as root user, but no need to load or even build gator.ko.

You can also (as non-root user) capture individual processes with something like:

gatord -A ...

In this case, the application will be started when you start the capture (and you can have gatord either terminate the app when you disconnect, or disconnect when the app terminates).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ARM-software/gator/pull/16#issuecomment-597790509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUJ4R2PX2UPYFY64TDAWVDRG7IXJANCNFSM4LFJ3D3Q .

bengaineyarm commented 4 years ago

Yes; so long as you have a ~5yrs old or newer Mali Txxx or Gxx GPU with the Arm Mali kernel module (i.e. not Panfrost) it is expected to work (specifically since driver version mr12p0). Gatord will talk directly to /dev/mali0_ to read the performance counters.

You can see the code within gatord for this in _daemon/maliuserspace/ .

LeptonWu commented 4 years ago

On Wed, Mar 11, 2020 at 2:49 PM Ben Gainey notifications@github.com wrote:

Yes; so long as you have a ~5yrs old or newer Mali Txxx or Gxx GPU with the Arm Mali kernel module (i.e. not Panfrost) it is expected to work (specifically since driver version m_r12p0). Gatord will talk directly to

Then what's the minimal version requirement for Bifrost kernel driver? Thanks

/dev/mali0 to read the performance counters.

You can see the code within gatord for this in daemon/mali_userspace/ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ARM-software/gator/pull/16#issuecomment-597895105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUJ4RYFM4SADKXBVDKP3VLRHABOPANCNFSM4LFJ3D3Q .

LeptonWu commented 4 years ago

I did a quick test with DS 7.1 streamline, it seems the output of GPU load is quite different when I have gator.ko loaded. And from my felling, the result from gator.ko looks like more reasonable. Not sure if this is a known bug.

On Wed, Mar 11, 2020 at 2:49 PM Ben Gainey notifications@github.com wrote:

Yes; so long as you have a ~5yrs old or newer Mali Txxx or Gxx GPU with the Arm Mali kernel module (i.e. not Panfrost) it is expected to work (specifically since driver version m_r12p0). Gatord will talk directly to /dev/mali0 to read the performance counters.

You can see the code within gatord for this in daemon/mali_userspace/ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ARM-software/gator/pull/16#issuecomment-597895105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUJ4RYFM4SADKXBVDKP3VLRHABOPANCNFSM4LFJ3D3Q .

bengaineyarm commented 4 years ago

There is no minimum for Bifrost; al versions are supported.

Regarding the load charts, are you referring to Vertex/Frag Activity bar charts? I'm not aware of any issue. Can you raise an issue in github (or if you/your employer has arm support contract for DS via that) with more details, ideally reproducer and/or capture, target device, driver version, etc.