From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751770AbdJCKlY (ORCPT ); Tue, 3 Oct 2017 06:41:24 -0400 Received: from mga04.intel.com ([192.55.52.120]:50957 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001AbdJCKlX (ORCPT ); Tue, 3 Oct 2017 06:41:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,474,1500966000"; d="scan'208";a="906192030" Subject: Re: perf script : wrong symoff in callchain To: Matthieu CASTET , linux-kernel@vger.kernel.org Cc: Arnaldo Carvalho de Melo References: <20171003121922.7d818faa@perruche.parrot.biz> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <42f1fb90-246c-782f-a8d7-2d126968f4b0@intel.com> Date: Tue, 3 Oct 2017 13:34:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171003121922.7d818faa@perruche.parrot.biz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/10/17 13:19, Matthieu CASTET wrote: > Hi, > > while using perf on x86_64, I saw strange output for symoff. > > $ perf record -g -- sleep 1 > $ perf script -F comm,tid,pid,time,ip,sym,dso,symoff > > [...] > sleep 11656/11656 1045318.546436: > 7fff9542e5b5 __d_lookup_rcu+0x80006ae02035 ([kernel.kallsyms]) > 7fff9541e132 lookup_fast+0x80006ae02052 ([kernel.kallsyms]) > 7fff9541eae8 walk_component+0x80006ae02048 ([kernel.kallsyms]) > 7fff9541efa2 link_path_walk+0x80006ae021b2 ([kernel.kallsyms]) > 7fff9541c92d path_init+0x80006ae021bd ([kernel.kallsyms]) > 7fff9542100b path_openat+0x80006ae020fb ([kernel.kallsyms]) > 7fff953c14fe handle_mm_fault+0x80006ae020ee ([kernel.kallsyms]) > 7fff95423669 do_filp_open+0x80006ae02099 ([kernel.kallsyms]) > 7fff95433414 __alloc_fd+0x80006ae02044 ([kernel.kallsyms]) > 7fff9540ff6e do_sys_open+0x80006ae0212e ([kernel.kallsyms]) > 7fff9540ff6e do_sys_open+0x80006ae0212e ([kernel.kallsyms]) > 7fff95850abb system_call_fast_compare_end+0x80006ae0200c ([kernel.kallsyms]) > 2aecf _nl_load_locale_from_archive+0xffff014b5a92841f (/lib/x86_64-linux-gnu/libc-2.24.so) > > > I tried to revert a4eb24a49566db77ee999b46603f602a0302f481 and I got > good result : > [...] > sleep 11656/11656 1045318.546436: > 7fff9542e5b5 __d_lookup_rcu+0x35 ([kernel.kallsyms]) > 7fff9541e132 lookup_fast+0x52 ([kernel.kallsyms]) > 7fff9541eae8 walk_component+0x48 ([kernel.kallsyms]) > 7fff9541efa2 link_path_walk+0x1b2 ([kernel.kallsyms]) > 7fff9541c92d path_init+0x1bd ([kernel.kallsyms]) > 7fff9542100b path_openat+0xfb ([kernel.kallsyms]) > 7fff953c14fe handle_mm_fault+0xee ([kernel.kallsyms]) > 7fff95423669 do_filp_open+0x99 ([kernel.kallsyms]) > 7fff95433414 __alloc_fd+0x44 ([kernel.kallsyms]) > 7fff9540ff6e do_sys_open+0x12e ([kernel.kallsyms]) > 7fff9540ff6e do_sys_open+0x12e ([kernel.kallsyms]) > 7fff95850abb system_call_fast_compare_end+0xc ([kernel.kallsyms]) > 2aecf _nl_load_locale_from_archive+0x41f (/lib/x86_64-linux-gnu/libc-2.24.so) > > > Any idea ? It could be the problem with add_callchain_ip() described here: https://www.spinics.net/lists/linux-perf-users/msg03172.html