From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 4 Sep 2014 22:18:04 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Peter Zijlstra , Ingo Molnar , Paul Mackerras , Namhyung Kim , LKML , Jiri Olsa , David Ahern , Adrian Hunter , Andi Kleen , Stephane Eranian , stable@vger.kernel.org Subject: Re: [PATCH] perf tools: Fix build-id matching on vmlinux Message-ID: <20140905011804.GC30520@kernel.org> References: <1409035119-24357-1-git-send-email-namhyung@kernel.org> <20140904141845.GD2997@kernel.org> <87a96f9bci.fsf@sejong.aot.lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a96f9bci.fsf@sejong.aot.lge.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: Em Fri, Sep 05, 2014 at 09:09:49AM +0900, Namhyung Kim escreveu: > >> Before: > >> $ perf record -a usleep 1 > >> $ perf buildid-list > >> 00d5ff078efe1d30b8492854f259215fd877ce30 /lib/modules/3.16.0-rc2+/build/vmlinux > >> 78186287bba77069a056a5ccbeb14b7fd2ca3a4b /usr/lib64/libc-2.17.so > >> $ perf buildid-list -H > >> 0000000000000000000000000000000000000000 [kernel.kallsyms] > >> 78186287bba77069a056a5ccbeb14b7fd2ca3a4b /usr/lib64/libc-2.17.so > >> After: > >> $ perf record -a usleep 1 > >> $ perf buildid-list > >> 00d5ff078efe1d30b8492854f259215fd877ce30 [kernel.kallsyms] > > We are losing information, namely the pathname for the kernel used, that > > may be useful in analysis. > Right. That's a problem. > > Why not make sure that if there is a build-id in the perf.data header, > > then we completely refusing anything that doesn't match the build-id? > > I.e. the name is irrelevant for this purpose, the contents, as keyed by > > the build-id, is what matters. > The perf report rebuilds machine states from the event records only. In > this case, the kernel map was recorded in the name of [kernel.kallsyms] > so it couldn't find the build-id from the table. Ok, but then we can special case this one, no? Somehow mark in the buildid table that that entry is the one for the kernel and hook it up to the synthesized event that has the [kernel.kallsyms].ref_reloc_sym entry. - Arnaldo