Re: [PATCH 16/28] ktap: add runtime/amalg.c

From: Jovi Zhangwei
Date: Sat Mar 29 2014 - 03:38:58 EST


Hi,

On Sat, Mar 29, 2014 at 2:52 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> Jovi Zhangwei <jovi.zhangwei@xxxxxxxxx> writes:
>
>> Use amalgamation build make ktapvm.ko much smaller.
>>
>> No amalgamation build in x86_64:
>> ktapvm.ko: 2.4M
>>
>> amalgamation build in x86_64:
>> ktapvm.ko: 1.1M
>>
>> User can set use amalgamation build or not in Makefile.
>
> This seems dubious. Is that due to debug information?
>
> [if yes new enough toolchain can fix that]
>
> If it's due to code something is seriously wrong,
> perhaps in your inlines.
>

Change: The kernel module size without amalgamation build is: 3.1M

I guess it's not because of debug info.

Amalgamation build is a kind of simple 'LTO', it compiles the ktapvm as
one huge C file and allows GCC to generate faster and shorter code.

But I also surprised by the size gap, will spend some time to investigate it.

Thanks.

Jovi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/