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


Groups > linux.kernel > #1225405 > unrolled thread

Re: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus symbol resolutions

Started byJan Kiszka <jan.kiszka@siemens.com>
First post2015-09-15 18:40 +0200
Last post2015-09-15 19:20 +0200
Articles 3 — 2 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] trace-cmd: Leave out absolute addresses to fix bogus  symbol resolutions Jan Kiszka <jan.kiszka@siemens.com> - 2015-09-15 18:40 +0200
    Re: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus  symbol resolutions Steven Rostedt <rostedt@goodmis.org> - 2015-09-15 19:10 +0200
      Re: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus  symbol resolutions Steven Rostedt <rostedt@goodmis.org> - 2015-09-15 19:20 +0200

#1225405 — Re: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus symbol resolutions

FromJan Kiszka <jan.kiszka@siemens.com>
Date2015-09-15 18:40 +0200
SubjectRe: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus symbol resolutions
Message-ID<q91qX-1Tn-49@gated-at.bofh.it>
On 2015-07-31 16:04, Jan Kiszka wrote:
> On x86, page_fault_* tracepoints report userspace address via kernel
> symbols because all the per-cpu variable offsets are in kallsyms,
> occupying the lower address space. Fix this by skipping over absolute
> addresses while processing kallsyms.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  trace-util.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/trace-util.c b/trace-util.c
> index 8a81dd0..da20e4c 100644
> --- a/trace-util.c
> +++ b/trace-util.c
> @@ -434,8 +434,12 @@ void parse_proc_kallsyms(struct pevent *pevent,
>  		if (mod)
>  			mod[strlen(mod) - 1] = 0;
>  
> -		/* Hack for arm arch that adds a lot of bogus '$a' functions */
> -		if (func[0] != '$')
> +		/*
> +		 * Hacks for
> +		 *  - arm arch that adds a lot of bogus '$a' functions
> +		 *  - x86-64 that reports per-cpu variable offsets as absolute
> +		 */
> +		if (func[0] != '$' && ch != 'A')
>  			pevent_register_function(pevent, func, addr, mod);
>  		free(func);
>  		free(mod);
> 

Ping.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1225449

FromSteven Rostedt <rostedt@goodmis.org>
Date2015-09-15 19:10 +0200
Message-ID<q91TX-2GF-3@gated-at.bofh.it>
In reply to#1225405
On Tue, 15 Sep 2015 18:30:22 +0200
Jan Kiszka <jan.kiszka@siemens.com> wrote:

> On 2015-07-31 16:04, Jan Kiszka wrote:
> > On x86, page_fault_* tracepoints report userspace address via kernel
> > symbols because all the per-cpu variable offsets are in kallsyms,
> > occupying the lower address space. Fix this by skipping over absolute
> > addresses while processing kallsyms.
> > 
> > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > ---
> >  trace-util.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/trace-util.c b/trace-util.c
> > index 8a81dd0..da20e4c 100644
> > --- a/trace-util.c
> > +++ b/trace-util.c
> > @@ -434,8 +434,12 @@ void parse_proc_kallsyms(struct pevent *pevent,
> >  		if (mod)
> >  			mod[strlen(mod) - 1] = 0;
> >  
> > -		/* Hack for arm arch that adds a lot of bogus '$a' functions */
> > -		if (func[0] != '$')
> > +		/*
> > +		 * Hacks for
> > +		 *  - arm arch that adds a lot of bogus '$a' functions
> > +		 *  - x86-64 that reports per-cpu variable offsets as absolute
> > +		 */
> > +		if (func[0] != '$' && ch != 'A')
> >  			pevent_register_function(pevent, func, addr, mod);
> >  		free(func);
> >  		free(mod);
> > 
> 
> Ping.

Thanks for the reminder ping.

Hmm, I don't see anything marked 'A' in my kallsyms. Have a config I
can test to see what you are seeing?

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1225454

FromSteven Rostedt <rostedt@goodmis.org>
Date2015-09-15 19:20 +0200
Message-ID<q923D-2S5-1@gated-at.bofh.it>
In reply to#1225449
On Tue, 15 Sep 2015 19:06:36 +0200
Jan Kiszka <jan.kiszka@siemens.com> wrote:

> Huh? Your /proc/kallsyms doesn't start like this?
> 
> 0000000000000000 A irq_stack_union
> 0000000000000000 A __per_cpu_start
> ...
> 
> That's from a stock distro SUSE kernel I'm running (config attached).

Nevermind, I was looking at an older kernel which didn't have that. I
booted a newer kernel and I now see it.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web