Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1320239 > unrolled thread

Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

Started byBalbir Singh <bsingharora@gmail.com>
First post2016-01-28 03:50 +0100
Last post2016-01-28 12:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Balbir Singh <bsingharora@gmail.com> - 2016-01-28 03:50 +0100
    Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Michael Ellerman <mpe@ellerman.id.au> - 2016-01-28 04:40 +0100
      Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-28 12:20 +0100

#1320239 — Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

FromBalbir Singh <bsingharora@gmail.com>
Date2016-01-28 03:50 +0100
SubjectRe: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)
Message-ID<qVKOK-4TF-11@gated-at.bofh.it>
On Wed, 27 Jan 2016 13:19:04 +0100
Torsten Duwe <duwe@lst.de> wrote:

> Thanks! Make sure you use a compiler that can disable -mprofile-kernel with "notrace".

gcc-6? I have gcc-5.2.1

Balbir Singh.

[toc] | [next] | [standalone]


#1320270

FromMichael Ellerman <mpe@ellerman.id.au>
Date2016-01-28 04:40 +0100
Message-ID<qVLB7-5Fa-3@gated-at.bofh.it>
In reply to#1320239
On Thu, 2016-01-28 at 13:41 +1100, Balbir Singh wrote:
> On Wed, 27 Jan 2016 13:19:04 +0100
> Torsten Duwe <duwe@lst.de> wrote:
>
> > Thanks! Make sure you use a compiler that can disable -mprofile-kernel with "notrace".
> 
> gcc-6? I have gcc-5.2.1

That should work.

But that's a good point.

We need to have some Makefile logic to only enable -mprofile-kernel when it's
known to work, ie. for versions where the notrace fix is in.

Looking at GCC history it looks like the fix is in 4.9.0 and anything later.

But a version check doesn't work with patched distro/vendor toolchains. So we
probably need some sort of runtime check.

cheers

[toc] | [prev] | [next] | [standalone]


#1320567

FromTorsten Duwe <duwe@lst.de>
Date2016-01-28 12:20 +0100
Message-ID<qVSMi-2B1-19@gated-at.bofh.it>
In reply to#1320270
On Thu, Jan 28, 2016 at 02:31:58PM +1100, Michael Ellerman wrote:
> 
> Looking at GCC history it looks like the fix is in 4.9.0 and anything later.

Good. But 4.8.5 has a buggy -mprofile-kernel, and there will be no 4.8.6, Bad.

> But a version check doesn't work with patched distro/vendor toolchains. So we
> probably need some sort of runtime check.

Agreed.

/bin/echo -e '#include <linux/compiler.h>\nnotrace int func() { return 0; }' |
 gcc -D__KERNEL__ -Iinclude -p -mprofile-kernel -x c -O2 - -S -o - | grep mcount

should be empty. If it yields "bl _mcount" your compiler is buggy.
I haven't looked at the kernel's "autoconf" yet, but it's probably capable
of testing this.

	Torsten

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web