lkml.org 
[lkml]   [2015]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus symbol resolutions
From
Date
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


\
 
 \ /
  Last update: 2015-09-15 18:41    [W:0.054 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site