Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1487347rdb; Wed, 6 Dec 2023 23:43:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL/zyZoBiQqUu9T4WplXI+2x0mX3ONawHH3LgwoGlpwlqvIXVlUehqdpOSNdU6vmtXGAPu X-Received: by 2002:a05:6a20:7486:b0:18c:f9a7:6f75 with SMTP id p6-20020a056a20748600b0018cf9a76f75mr1850247pzd.3.1701935014671; Wed, 06 Dec 2023 23:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701935014; cv=none; d=google.com; s=arc-20160816; b=qDlj/Qjj2/0LGSZIAFWKqKtcMNca4ixg7pDIxU394URQy3YzZaRhml7wa4Qop6yv6L 9w2k8EJLVKKq8rotAzFLC5teIIHXTACYbdOvzLv/B8fmAOigz98/afL4HrrAGF3IUpIn rD2INhow8f+keJ8RG3rBCDqUFOzzEG9oVvHCmLAQ8DF0O9jBuyLFn7ngQ/7TvIHMisX/ uq+wqYVoAq2OHuvn8XJCYBQNmupYZor+h+sk3yhVwnKN6t2hGZ1Vgo7z9JGvfmIxnb67 28luKi3K4uERAK21b4DAliegCsMruRw1R2k3IP7YfxGI3idWTgUr00xjY8OCG0Nddm5b vSdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=d5zDdrIJpTZlfzPHo/DPwR7cu1H8FmbbwX1/6FdK1Nw=; fh=T0q8mVmmzVmvfxT6XtinH4lqnsXQ+1IatJYKSB+B8zc=; b=bK8K/580mucLGvEagoffqaDYZZ0gyeUO9eYQ92qw+eFy8FnGTThg5RhNU6w/MS0hTp estp6nU4y6f+mi+qDgxca7PM+sW2cCc5ThStshBxLsiVu6unoLihp8jjd9TqFOorV3Y7 evRRkvELE0AGiMdEG4rm46fLB6dIhYrtJwN4yA+Vnv+5ZcZXsPTtHRomz0vIG7FU+I53 SIWgrQ2hk6qoaMnQCmbNkSwhuBuwuxjQkxXmLrPbIFUHqkfk1BRH5jYwxQ/Mw6qxgMk7 beMZ4Qgwt2mqNYO7jL6N9b1ogJZVzyzqQcYhtegL6MGKnB5f34Z7ywTIXMzhOk5HwinV /FMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id qj11-20020a17090b28cb00b002888396d22esi656340pjb.6.2023.12.06.23.43.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 23:43:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5865B84E98A6; Wed, 6 Dec 2023 23:43:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377989AbjLGHnE (ORCPT + 99 others); Thu, 7 Dec 2023 02:43:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377638AbjLGHnC (ORCPT ); Thu, 7 Dec 2023 02:43:02 -0500 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D2A80137 for ; Wed, 6 Dec 2023 23:43:07 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8DxRvGKd3FltJA_AA--.61466S3; Thu, 07 Dec 2023 15:43:06 +0800 (CST) Received: from [10.130.0.149] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxbNyId3FlwktXAA--.62372S3; Thu, 07 Dec 2023 15:43:04 +0800 (CST) Subject: Re: [PATCH v5 8/8] LoongArch: Add ORC stack unwinder support To: Xi Ruoyao , Josh Poimboeuf , Peter Zijlstra , Huacai Chen References: <20231129130701.27744-1-yangtiezhu@loongson.cn> <20231129130701.27744-9-yangtiezhu@loongson.cn> Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org From: Tiezhu Yang Message-ID: Date: Thu, 7 Dec 2023 15:43:04 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8BxbNyId3FlwktXAA--.62372S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7Kr4kKw4ruw13GrWrGFW7trc_yoW8GF4rpa ykGr4qkr4kXF4kXr17Aw4rJ39aqanrGrs8Xw42gayUCwsIqrsIgr4IkF45Ca47GrsFkFnF vFs3t3ZYv3W5C3cCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9Sb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07 AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C2 67AKxVWUtVW8ZwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI 8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWU CwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r 1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBI daVFxhVjvjDU0xZFpf9x07jYSoJUUUUU= X-Spam-Status: No, score=-4.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 23:43:32 -0800 (PST) On 12/03/2023 09:20 PM, Xi Ruoyao wrote: > On Wed, 2023-11-29 at 21:07 +0800, Tiezhu Yang wrote: >> +KBUILD_AFLAGS += $(call cc-option,-mthin-add-sub) $(call cc-option,-Wa$(comma)-mthin-add-sub) >> +KBUILD_CFLAGS += $(call cc-option,-mthin-add-sub) $(call cc-option,-Wa$(comma)-mthin-add-sub) >> + >> +ifdef CONFIG_OBJTOOL >> +KBUILD_CFLAGS += -fno-optimize-sibling-calls -fno-jump-tables -falign-functions=4 -falign-labels=4 >> +endif > > I still hate regressing the optimization with a passion. Yes, I agree in general. > > And -falign-labels=4 implies -falign-functions=4 so at least we can > remove -falign-functions=4. Thanks. > > And in GCC >= 14 the defaults are -falign-labels=16 and -falign- > functions=32. These values are determined by benchmarking on LA464 so > I'd suggest using them (maybe unless CONFIG_CC_OPTIMIZE_FOR_SIZE). > The initial aim to add "-falign-functions=4 -falign-labels=4" is to avoid generating nop instructions in .o file with -mrelax option by default, otherwise the orc info can not match the symbol address in vmlinux. I want to add -mno-relax option and remove the extra option "-falign-functions=4 -falign-labels=4", then the offsets in each .o file and vmlinux are same, and it is not necessary to do the special handling about local labels, I think it will make life easier. Thanks, Tiezhu