mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Huacai Chen <chenhuacai@kernel.org>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 8/8] LoongArch: Add ORC stack unwinder support
Date: Thu, 7 Dec 2023 15:43:04 +0800	[thread overview]
Message-ID: <c172bf73-1e4e-9d4a-4b82-6aeb0f6f4ff8@loongson.cn> (raw)
In-Reply-To: <e860c6d42dc67e2c662c732ce56309874456f21b.camel@xry111.site>



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


  reply	other threads:[~2023-12-07  7:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 13:06 [PATCH v5 0/8] Add objtool and orc support for LoongArch Tiezhu Yang
2023-11-29 13:06 ` [PATCH v5 1/8] objtool/LoongArch: Enable objtool to be built Tiezhu Yang
2023-11-29 13:06 ` [PATCH v5 2/8] objtool/LoongArch: Implement instruction decoder Tiezhu Yang
2023-11-29 13:06 ` [PATCH v5 3/8] objtool/x86: Separate arch-specific and generic parts Tiezhu Yang
2023-11-29 13:06 ` [PATCH v5 4/8] objtool/LoongArch: Enable orc to be built Tiezhu Yang
2023-11-29 13:06 ` [PATCH v5 5/8] objtool: Check local label about sibling call Tiezhu Yang
2023-11-29 13:06 ` [PATCH v5 6/8] objtool: Check local label in add_dead_ends() Tiezhu Yang
2023-11-29 13:07 ` [PATCH v5 7/8] objtool: Check local label in read_unwind_hints() Tiezhu Yang
2023-11-29 13:07 ` [PATCH v5 8/8] LoongArch: Add ORC stack unwinder support Tiezhu Yang
2023-12-02 13:45   ` Huacai Chen
2023-12-07  7:08     ` Tiezhu Yang
2023-12-03 12:42   ` Huacai Chen
2023-12-07  7:23     ` Tiezhu Yang
2023-12-03 13:20   ` Xi Ruoyao
2023-12-07  7:43     ` Tiezhu Yang [this message]
2023-12-02 13:52 ` [PATCH v5 0/8] Add objtool and orc support for LoongArch Huacai Chen
2023-12-07  7:14   ` Tiezhu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c172bf73-1e4e-9d4a-4b82-6aeb0f6f4ff8@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®