From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751125AbdEaWY6 (ORCPT ); Wed, 31 May 2017 18:24:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43884 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbdEaWY5 (ORCPT ); Wed, 31 May 2017 18:24:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0EC7715552 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0EC7715552 Date: Thu, 1 Jun 2017 00:24:52 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , kernel-team@lge.com, David Ahern , Andi Kleen Subject: Re: [PATCH 1/3] perf tools: Set proper module name when build-id event found Message-ID: <20170531222452.GA1714@krava> References: <20170531120105.21731-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170531120105.21731-1-namhyung@kernel.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 31 May 2017 22:24:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 31, 2017 at 09:01:03PM +0900, Namhyung Kim wrote: > When perf processes build-id event, it creates DSOs with the build-id. > But it didn't set the module short name (like '[module-name]') so when > processing a kernel mmap event of the module, it cannot found the DSO as > it only checks the short names. > > That leads for perf to create a same DSO without the build-id info and > it'll lookup the system path even if the DSO is already in the build-id > cache. After kernel was updated, perf cannot find the DSO and cannot show > symbols in it anymore. > > You can see this if you have an old data file (w/ old kernel version): > > $ perf report -i perf.data.old -v |& grep scsi_mod > build id event received for /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz : cafe1ce6ca13a98a5d9ed3425cde249e57a27fc1 > Failed to open /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz, continuing without symbols > ... > > The second message didn't show the build-id. With this patch: > > $ perf report -i perf.data.old -v |& grep scsi_mod > build id event received for /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz: cafe1ce6ca13a98a5d9ed3425cde249e57a27fc1 > /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz with build id cafe1ce6ca13a98a5d9ed3425cde249e57a27fc1 not found, continuing without symbols > ... > > Now it shows the build-id but still cannot load the symbol table. This > is a different problem which will be fixed in the next patch. > > Signed-off-by: Namhyung Kim for all 3: Acked-by: Jiri Olsa thanks, jirka