Re: [RFC] ARC: initial ftrace support

2020-05-14 Thread Eugeniy Paltsev
stedt; Ingo Molnar; >linux-snps-arc@lists.infradead.org; Eugeniy Paltsev; Vineet Gupta >Subject: RE: [RFC] ARC: initial ftrace support > > Hi Claus, > >> -Original Message- >> From: linux-snps-arc On Behalf >> Of Claudiu Zissulescu >> Ianculescu >

Re: [RFC] ARC: initial ftrace support

2020-04-02 Thread Steven Rostedt
On Thu, 2 Apr 2020 01:17:01 + Vineet Gupta wrote: > +CC Claudiu > > On 3/27/20 10:10 AM, Steven Rostedt wrote: > > On Fri, 27 Mar 2020 18:53:55 +0300 > > Eugeniy Paltsev wrote: > > Maybe add a comment that gcc does the heavy lifting: I have following in glibc > > +/* this is very

RE: [RFC] ARC: initial ftrace support

2020-04-02 Thread Alexey Brodkin
Molnar ; > linux-snps-arc@lists.infradead.org; Eugeniy > Paltsev > Subject: Re: [RFC] ARC: initial ftrace support > > Hi, > > ARC-gcc has two modes to call the mcount routines. When using elf32 > configuration, the toolchain is set to use newlib mcount. When > configured for linux, gcc

Re: [RFC] ARC: initial ftrace support

2020-04-02 Thread Claudiu Zissulescu Ianculescu
Hi, ARC-gcc has two modes to call the mcount routines. When using elf32 configuration, the toolchain is set to use newlib mcount. When configured for linux, gcc toolchain is using a library call to _mcall (single underscore) having blink as input argument. So, using the proper linux toolchain,

Re: [RFC] ARC: initial ftrace support

2020-04-01 Thread Vineet Gupta
+CC Claudiu On 3/27/20 10:10 AM, Steven Rostedt wrote: > On Fri, 27 Mar 2020 18:53:55 +0300 > Eugeniy Paltsev wrote: Maybe add a comment that gcc does the heavy lifting: I have following in glibc +/* this is very simple as gcc does all the heavy lifting at _mcount call site + * - sets up

Re: [RFC] ARC: initial ftrace support

2020-03-27 Thread Steven Rostedt
On Fri, 27 Mar 2020 18:53:55 +0300 Eugeniy Paltsev wrote: > + > +noinline void _mcount(unsigned long parent_ip) > +{ > + unsigned long ip = (unsigned long)__builtin_return_address(0); > + > + if (unlikely(ftrace_trace_function != ftrace_stub)) > + ftrace_trace_function(ip -

[RFC] ARC: initial ftrace support

2020-03-27 Thread Eugeniy Paltsev
Add initial ftrace support for ARCv2. We add support only for function tracer (the simplest, not dynamic one), however it is prerequisite for dynamic function tracer and other complex ones. Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig | 1 + arch/arc/include/asm/Kbuild |