Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753069AbdGJGRK (ORCPT ); Mon, 10 Jul 2017 02:17:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44883 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbdGJGRI (ORCPT ); Mon, 10 Jul 2017 02:17:08 -0400 Subject: Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in different mount namespace To: Krister Johansen , Arnaldo Carvalho de Melo Cc: Brendan Gregg , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , linux-kernel@vger.kernel.org References: <20170705204511.GD29683@templeofstupid.com> <1499305693-1599-1-git-send-email-kjlx@templeofstupid.com> <1499305693-1599-2-git-send-email-kjlx@templeofstupid.com> <20170706194130.GM27350@kernel.org> <20170707193640.GA2554@templeofstupid.com> From: Thomas-Mich Richter Organization: IBM LTC Date: Mon, 10 Jul 2017 08:17:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170707193640.GA2554@templeofstupid.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-IE Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 17071006-0008-0000-0000-0000047C30DE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071006-0009-0000-0000-00001E06CBDD Message-Id: <381cf00c-c540-8c20-7182-ecdd94f2d81c@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-10_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1707100111 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1597 Lines: 34 On 07/07/2017 09:36 PM, Krister Johansen wrote: > On Thu, Jul 06, 2017 at 04:41:30PM -0300, Arnaldo Carvalho de Melo wrote: >> Em Wed, Jul 05, 2017 at 06:48:08PM -0700, Krister Johansen escreveu: >>> Teach perf how to resolve symbols from binaries that are in a different >>> mount namespace from the tool. This allows perf to generate meaningful >>> stack traces even if the binary resides in a different mount namespace >>> from the tool. >> >> I was trying to find a way to test after applying each of the patches in >> this series, when it ocurred to me that if a process that appears on a >> perf.data file has exit, how can we access /proc/%ITS_PID/something? > > You're correct. We can't access /proc//whatever once the process > has exited. That was the impeteus for patches 4 and 6, which allow us > to capture the binary (and debuginfo, if it exists) into the buildid > cache so that if we do have a trace that exists after a process or > container exists, we'll still be able to resolve some of the symbols. > > -K > Any ideas on how to extend this to be able to resolve symbols after the process/container exited? I believe it boils down on how to interpret the mnt inode number in the PERF_RECORD_NAMESPACE record... Can this be done post-mortem? Maybe the PERF_RECORD_NAMESPACE record has to contain more data than just the inode number? -- Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294