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.ko fails to build #23

Closed jasvinderkhurana closed 3 years ago

jasvinderkhurana commented 3 years ago

I am trying to build gator kernel module(DS-5 v5.29.2), but when I build using 5.4.0 kernel version it fails to build with below error. Can you please guide how can I build the gator.ko for 5.4.0 kernel.

In file included from /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c:270: /scratch/Work/Gator/SOM/gator_29/driver/gator_backtrace.c: In function ‘arm_backtrace_eabi’: /scratch/Work/Gator/SOM/gator_29/driver/gator_backtrace.c:260:74: error: macro "access_ok" passed 3 arguments, but takes just 2 260 if (!access_ok(VERIFY_READ, curr, sizeof(struct stack_frame_eabi)) ^ In file included from ./include/linux/uaccess.h:11, from ./include/linux/highmem.h:9, from /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c:21: ./arch/arm64/include/asm/uaccess.h:90: note: macro "access_ok" defined here 90 #define access_ok(addr, size) __range_ok(addr, size)

In file included from /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c:270: /scratch/Work/Gator/SOM/gator_29/driver/gator_backtrace.c:260:14: error: ‘access_ok’ undeclared (first use in this function) 260 | if (!access_ok(VERIFY_READ, curr, sizeof(struct stack_frame_eabi)) || | ^~~~~ /scratch/Work/Gator/SOM/gator_29/driver/gator_backtrace.c:260:14: note: each undeclared identifier is reported only once for each function it appears in /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c: In function ‘gator_summary’: /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c:804:5: error: implicit declaration of function ‘get_monotonic_boottime’ [-Werror=implicit-function-declaration] 804 | get_monotonic_boottime(&ts); | ^~~~~~ /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c: In function ‘gator_new_tracepoint_module’: /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c:1396:41: error: initialization of ‘struct tracepoint const’ from incompatible pointer type ‘const tracepoint_ptr_t ’ {aka ‘const int ’} [-Werror=incompatible-pointer-types] 1396 | struct tracepoint const begin = tp_mod->mod->tracepoints_ptrs; | ^~ /scratch/Work/Gator/SOM/gator_29/driver/gator_main.c:1397:39: error: initialization of ‘struct tracepoint const’ from incompatible pointer type ‘const tracepoint_ptr_t ’ {aka ‘const int ’} [-Werror=incompatible-pointer-types] 1397 | struct tracepoint const end = tp_mod->mod->tracepoints_ptrs + tp_mod->mod->num_tracepoints;

Also I see that now the driver source is also not provided in the github repo, and neither with latest ARM developmen Studio 2020.1

Please guide

bengaineyarm commented 3 years ago

Hi

gator.ko has been deprecated since 2019.1 and removed since 2020.0. It is not required; instead you can use gatord on its own.

DS5 5.29.2 contains Streamline 6.7 which was released in July-2018, whereas kernel 5.4 was released on 24-Nov-2019. The later is not expected to support the former.

Our recomendation is to update to the most recent version of DS, but if for some reason that is not possible, you may be able to resolve this issue yourself by:

Regards Ben

jasvinderkhurana commented 3 years ago

Thanks for your quick reply Ben. I switched to the latest version of ARM Development Studio and I used the gatard demon to get the profiling data.

I am able to connect using this daemon, but I am not getting any vertex and Fragment processor information in the graph. How Can I enable to get vertex and fragment processor information to debug Mali 400 Graphics applications?

image

bengaineyarm commented 3 years ago

Ah, i see. If you are using Mali 400, you will need to stick with gator.ko. We don't support such old GPU in recent versions of Streamline. In this case, the best option is to use DS 2019.1, available here https://developer.arm.com/tools-and-software/embedded/arm-development-studio/downloads and being the last version to support gator.ko and therefore Mali 400.