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

'gator driver' Complie error when enabling the GPU profiling option

Note: This was originally posted on 18th September 2012 at http://forums.arm.com

Hi. developers.
Thank you in advance for your attention.


I am trying to profile the android device using ARM Streamline Performance Analyzer.
The target device is Odroid-A4 which is already tested by ARM Streamline team members (I see the YouTube video clips).
According to the ARM Streamline Menual, I compiled both gator daemon (gatord) and module driver (gator.ko)without errors and they works well.

However, I am in trouble when enabling the GPU profiling option.
According to the menual, the following two lines should be added into the gator driver make file.

=======================================================================
KCFLAGS="-IMali_driver_source_location/src/devicedrv/mali"
GATOR_WITH_MALI_SUPPORT=MALI_400
=======================================================================

So I modified the make file like that since the mali driver source code is located in that path.

=======================================================================
KCFLAGS="-I../../../mail400_driver/driver/src/devicedrv/mali"
GATOR_WITH_MALI_SUPPORT=MALI_400
=======================================================================


However, the complie error occurs since 'mali_linux_trace.h' file can't be found in path. 

=======================================================================
make: Entering directory `/home/again4you/git_work/odroid_a4_mail/kernel'
  CHK     gator_events.h
  CC [M]  /home/again4you/git_work/odroid_a4_mail/gator/driver-src/gator-driver/gator_main.o
In file included from /home/again4you/git_work/odroid_a4_mail/gator/driver-src/gator-driver/gator_main.c:151:
/home/again4you/git_work/odroid_a4_mail/gator/driver-src/gator-driver/gator_trace_gpu.c:17: fatal error: linux/mali_linux_trace.h: No such file or directory
compilation terminated.
make[1]: *** [/home/again4you/git_work/odroid_a4_mail/gator/driver-src/gator-driver/gator_main.o] Error 1
make: *** [_module_/home/again4you/git_work/odroid_a4_mail/gator/driver-src/gator-driver] Error 2
make: Leaving directory `/home/again4you/git_work/odroid_a4_mail/kernel'
=======================================================================


But as I mention before, the 'mali_linux_trace.h' file existsin KCFLAGS path.

=======================================================================
again4you@again4you-x86:~/git_work/odroid_a4_mail/gator/driver-src/gator-driver$ ls ../../../mail400_driver/driver/src/devicedrv/mali/linux/mali_linux_trace.h
../../../mail400_driver/driver/src/devicedrv/mali/linux/mali_linux_trace.h
=======================================================================


Should I recompile the mali gpu drivers?
Or are there any solutions to solve this problems??


Thank you for paying attentions.
Sangjung Woo.
  • Note: This was originally posted on 18th September 2012 at http://forums.arm.com


    So I modified the make file like that since the mali driver source code is located in that path.

    =======================================================================
    KCFLAGS="-I../../../mail400_driver/driver/src/devicedrv/mali"
    GATOR_WITH_MALI_SUPPORT=MALI_400
    =======================================================================



    Hello Sangjung Woo,
    The make command for gator-driver is changing the 'current directory' to the kernel directory with the -C option.
    This means that the include path you are setting may be not valid in that context.

    Could you try to set KCFLAGS with an absolute path?
    It's likely going to be '~/git_work/odroid_a4_mail/mail400_driver/driver/src/devicedrv/mali', please check it.

    Best regards,
    Lorenzo
  • Note: This was originally posted on 18th September 2012 at http://forums.arm.com

    Dear Lorenzo.

    Firstly, thank you for your reply.

    After I did as you mentions,
    unfortunately, it doesn't work.(The complie error occurs like before.)

    However, given your hint,
    I found the main reason why the directory path is changed
    when I build the kernel module.

    Instead of fixing the error perfectly,
    I simply copied the 'mali_linux_trace.h' into gator-driver folder
    and modified the gator-driver source code
    since the 'mali_linux_trace.h' is linked when building.

    After modification, the compile error is disappeared.
    However, I didn't check whether it works or not with DS-5.

    I will let you the results.
    Anyway, thank you Lorenzo.

    Sangjung Woo.
  • Note: This was originally posted on 18th September 2012 at http://forums.arm.com



    Instead of fixing the error perfectly,
    I simply copied the 'mali_linux_trace.h' into gator-driver folder
    and modified the gator-driver source code
    since the 'mali_linux_trace.h' is linked when building.



    Dear [font=arial, sans-serif][size=2]Sangjung Woo,[/size][/font]
    [font=arial, sans-serif][size=2]
    [/size][/font]
    [font=arial, sans-serif][size=2]that is also a solution. I'm looking forward to know if it works with DS-5 successfully.[/size][/font]
    [font=arial, sans-serif][size=2]
    [/size][/font]
    [font=arial, sans-serif][size=2]Thanks,[/size][/font]
    [font=arial, sans-serif][size=2]Lorenzo[/size][/font]
  • Hey Sanjung,

    I'm running into the same problem as you, but I have many files that are not found. After I move the mali_linux_trace.h like you did, another file was shown as not found.

    I am wondering, did you move all the required files to your driver directory? Did you end up getting this working with DS-5 Streamline?

    Thanks!