[Genivi-ipc] CommonAPI DBus build size

Andersson, Gunnar gunnar.x.andersson at volvocars.com
Fri Jun 10 03:21:54 EDT 2016


Johnny

> -----Original Message-----
> From: genivi-ipc-bounces at lists.genivi.org [mailto:genivi-ipc-bounces at lists.genivi.org] On Behalf Of Karlsson, Johnny
> Sent: den 10 juni 2016 08:18
> To: genivi-ipc at lists.genivi.org
> Subject: [Genivi-ipc] CommonAPI DBus build size
>
> 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:

Great stuff.  In judging if this is small or big, one question is really if
you increase the number of methods then does the binary grow much or is
mostly a flat cost per component...  I think your test only instantiates
the service but does not do any ping-pong test usage?

I guess a service doing the same but linked against libdbus would need to
be measured.  Personally I think 68K is still pretty small but it would be
interesting to confirm if the same function using only libdbus is similar.

(Not that libdbus programming and CommonAPI are comparable in terms of
 abstraction, reusability and so on - i.e. the perceived advantages of
 "Common API".)

Hmm, what if you multiply the size of the interface 2, 4, 8 and so on?

I attached 2x, 4x ... up to 32x versions of the interface if you want
to try them out.  (If the attachment is scrubbed, there should be a
link I think)

Could you dump your code somewhere (e.g. github) or provide it in another
way?

Best Regards
-Gunnar


[ trimmed fidl]

>
> 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
>
>
>
> _______________________________________________
> genivi-ipc mailing list
> genivi-ipc at lists.genivi.org
> https://lists.genivi.org/mailman/listinfo/genivi-ipc
>
>

-----Original Message-----
From: genivi-ipc-bounces at lists.genivi.org [mailto:genivi-ipc-bounces at lists.genivi.org] On Behalf Of Karlsson, Johnny
Sent: den 10 juni 2016 08:18
To: genivi-ipc at lists.genivi.org
Subject: [Genivi-ipc] CommonAPI DBus build size

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


 
_______________________________________________
genivi-ipc mailing list
genivi-ipc at lists.genivi.org
https://lists.genivi.org/mailman/listinfo/genivi-ipc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: capiTest.fidl.zip
Type: application/x-zip-compressed
Size: 2398 bytes
Desc: capiTest.fidl.zip
URL: <http://lists.genivi.org/pipermail/genivi-ipc_lists.genivi.org/attachments/20160610/1c5710c6/attachment.zip>


More information about the genivi-ipc mailing list