[Genivi-ipc] CommonAPI DBus build size

Karlsson, Johnny johnny.karlsson.2 at volvocars.com
Fri Jun 10 02:17:34 EDT 2016


Hi!

I was discussing the size of generated commonAPI services with some colleges of mine, we were concerned that even for very simple services you get pretty large binaries. To test this I created a service from the following FIDL file:

package org.test 
    interface capiTest {
        version {
            major 1 minor 0
    }

    method setAge {
        in {
            String name
            UInt32 age
        }
        out {
            UInt32 newAge
        }
    }

    attribute UInt32 currentAge
    
    broadcast newAge {
        out {
            UInt32 age
        }
    }
}

When building a stub with the DBus backend using using no optimization you get a binary of  171K.
Adding the -Os flag the binary increases to 179K which is very strange.
Adding linker time optimization (-flto) the binary shrinks to 123K
And finally with all the flags above plus stripping the binary ( -Os -s -flto ) the binary comes in at 68K. I kept the optimization flags cause in combination with 
the other flags you do get a smaller binary.

This still feel like quite a lot for such a simple service, so I was just wondering what other people on the list feels about this? Have you had better results than this?

Best Regards

Johnny Karlsson


 



More information about the genivi-ipc mailing list