Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935029AbcJQLdF (ORCPT ); Mon, 17 Oct 2016 07:33:05 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:35242 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933887AbcJQLc5 (ORCPT ); Mon, 17 Oct 2016 07:32:57 -0400 MIME-Version: 1.0 In-Reply-To: References: <20161017065131.GA27863@angband.pl> <20161017175951.31d8f4b7@roar.ozlabs.ibm.com> <20161017100130.GA16013@angband.pl> From: Alexey Dobriyan Date: Mon, 17 Oct 2016 14:32:54 +0300 Message-ID: Subject: Re: [GIT PULL] kbuild changes for v4.9-rc1 To: Geert Uytterhoeven Cc: Adam Borowski , Nicholas Piggin , Omar Sandoval , Michal Marek , Linus Torvalds , Stephen Rothwell , Al Viro , linux-kbuild , Linux Kernel , Linux-Arch Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1834 Lines: 55 On Mon, Oct 17, 2016 at 2:17 PM, Geert Uytterhoeven wrote: > Hi Alexey, > > On Mon, Oct 17, 2016 at 1:12 PM, Alexey Dobriyan wrote: >> On Mon, Oct 17, 2016 at 1:01 PM, Adam Borowski wrote: >>> On Mon, Oct 17, 2016 at 05:59:51PM +1100, Nicholas Piggin wrote: >>>> On Mon, 17 Oct 2016 08:51:31 +0200 >>>> Adam Borowski wrote: >> >>> --- /dev/null >>> +++ b/include/asm-generic/asm-prototypes.h >>> @@ -0,0 +1,7 @@ >>> +#include >>> +extern void *__memset(void *, int, __kernel_size_t); >>> +extern void *__memcpy(void *, const void *, __kernel_size_t); >>> +extern void *__memmove(void *, const void *, __kernel_size_t); >>> +extern void *memset(void *, int, __kernel_size_t); >>> +extern void *memcpy(void *, const void *, __kernel_size_t); >>> +extern void *memmove(void *, const void *, __kernel_size_t); >> >> Before too late, those extern keywords aren't needed and >> only slowdown compilation. > > Do you have any profiling data backing this? It is easy to obtain. Here is top 10 with runtime bigger than 0.50%: _int_malloc ht_lookup_with_hash _cpp_lex_direct cpp_get_token_1 ggc_internal_alloc_statm _int_free malloc_consolidate lex_identifier enter_macro_context c_lex_with_flags bitmap_set_bit malloc grokdeclarator htab_find_slot_with_hash c_lex_one_token _cpp_lex_token pop_scopev c_parser_declspecs Imagine you're a compiler. Those extern's are tokens. They need to be parsed (byte-by-byte), allocated, and, in case of "extern" with prototype, thrown away. They make line longer forcing people to dance around with splitting per 80 characters and generally making everything somewhat slower. Might as well don't new ones. bitops.h is wrong header as well. Why do you need bitops for bunch of function prototypes?