Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1334473
| From | Torsten Duwe <duwe@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables |
| Date | 2016-02-15 15:10 +0100 |
| Message-ID | <r2s0F-24e-1@gated-at.bofh.it> (permalink) |
| References | <r0H3P-5r5-3@gated-at.bofh.it> <r0H3R-5r5-21@gated-at.bofh.it> <r0UaJ-5Io-3@gated-at.bofh.it> <r0V6O-6jl-23@gated-at.bofh.it> <r2ozL-824-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 15, 2016 at 09:27:15PM +1100, Michael Ellerman wrote: > > There is explicit code in gcc to check whether the TOC setup is needed and only That's undestood. The claim here is: that check is incomplete, at least. > emit it when it's required. One case where it's *not* required is when the > function does not TOC accesses. (See rs6000_global_entry_point_needed_p()). n.b. I cannot find this symbol in the 4.9.3 tree, but I know what you mean. The point here is: If you profile using "-pg", gcc perfectly recognises that it is generating a call to "_mcount", which may be non-local, and loads the TOC. If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the TOC load, for a similar assembler calling sequence. Looking at the code I can _understand_ why this is so, but my GCC knowledge is not that deep that I could easily _fix_ this reliably. [...] > Secondly it means the ftrace trampoline needs to cope with being called with r2 > containing something other than the kernel TOC (ie. a module's TOC pointer). > But I think that's solvable also? That was the alternative I asked about; but given that the _mcount / ftrace_caller trampoline hardly differs from a normal trampoline (so far), loading R2 would be the general case, or an excessive special case handling would result. I'd rather see gcc getting fixed than to have workarounds in all projects that use it, and others agreed. Torsten
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 0/8] ftrace with regs + live patching for ppc64 LE (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-02-10 18:50 +0100
[PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Torsten Duwe <duwe@lst.de> - 2016-02-10 18:50 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Balbir Singh <bsingharora@gmail.com> - 2016-02-11 08:50 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> - 2016-02-11 09:50 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Balbir Singh <bsingharora@gmail.com> - 2016-02-11 10:40 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Murali Sampath <MSampath@alphion.com> - 2016-02-11 14:10 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Murali Sampath <MSampath@alphion.com> - 2016-02-11 14:10 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Torsten Duwe <duwe@lst.de> - 2016-02-11 09:50 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Balbir Singh <bsingharora@gmail.com> - 2016-02-11 10:40 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Michael Ellerman <mpe@ellerman.id.au> - 2016-02-15 11:30 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Jiri Kosina <jikos@kernel.org> - 2016-02-15 14:00 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Torsten Duwe <duwe@lst.de> - 2016-02-15 15:10 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Torsten Duwe <duwe@lst.de> - 2016-02-15 23:30 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Balbir Singh <bsingharora@gmail.com> - 2016-02-16 06:00 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Michael Ellerman <mpe@ellerman.id.au> - 2016-02-16 11:20 +0100
Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Torsten Duwe <duwe@lst.de> - 2016-02-16 11:40 +0100
[PATCH v8 3/8] ppc use ftrace_modify_all_code default Torsten Duwe <duwe@lst.de> - 2016-02-10 18:50 +0100
[PATCH v8 1/8] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe <duwe@lst.de> - 2016-02-10 18:50 +0100
Re: [PATCH v8 1/8] ppc64 (le): prepare for -mprofile-kernel Michael Ellerman <mpe@ellerman.id.au> - 2016-02-17 12:00 +0100
Re: [PATCH v8 1/8] ppc64 (le): prepare for -mprofile-kernel Michael Ellerman <mpe@ellerman.id.au> - 2016-02-17 12:40 +0100
Re: [PATCH v8 1/8] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe <duwe@lst.de> - 2016-02-17 12:40 +0100
[PATCH v8 6/8] Implement kernel live patching for ppc64le (ABIv2) Torsten Duwe <duwe@lst.de> - 2016-02-10 18:50 +0100
Re: [PATCH v8 6/8] Implement kernel live patching for ppc64le (ABIv2) Miroslav Benes <mbenes@suse.cz> - 2016-02-11 10:10 +0100
Re: [PATCH v8 0/8] ftrace with regs + live patching for ppc64 LE (ABI v2) Balbir Singh <bsingharora@gmail.com> - 2016-02-11 07:20 +0100
Re: [PATCH v8 0/8] ftrace with regs + live patching for ppc64 LE (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-02-11 09:40 +0100
csiph-web