From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753045AbbIOQa3 (ORCPT ); Tue, 15 Sep 2015 12:30:29 -0400 Received: from thoth.sbs.de ([192.35.17.2]:50012 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbbIOQa1 (ORCPT ); Tue, 15 Sep 2015 12:30:27 -0400 Subject: Re: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus symbol resolutions To: Steven Rostedt , Linux Kernel Mailing List References: <55BB8086.9080602@siemens.com> From: Jan Kiszka Message-ID: <55F8479E.9030008@siemens.com> Date: Tue, 15 Sep 2015 18:30:22 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <55BB8086.9080602@siemens.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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