Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754812AbbLDNPx (ORCPT ); Fri, 4 Dec 2015 08:15:53 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:33931 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752534AbbLDNPv (ORCPT ); Fri, 4 Dec 2015 08:15:51 -0500 Date: Fri, 4 Dec 2015 22:15:16 +0900 From: Namhyung Kim To: =?utf-8?B?5bmz5p2+6ZuF5bezIC8gSElSQU1BVFXvvIxNQVNBTUk=?= Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Frederic Weisbecker Subject: Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace Message-ID: <20151204131516.GE22102@danjae.kornet> References: <20151202081605.GB26308@krava.brq.redhat.com> <1449070420-32401-1-git-send-email-namhyung@kernel.org> <50399556C9727B4D88A595C8584AAB375263F8A9@GSjpTKYDCembx32.service.hitachi.net> <20151203011556.GB4554@sejong> <50399556C9727B4D88A595C8584AAB375264001D@GSjpTKYDCembx32.service.hitachi.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <50399556C9727B4D88A595C8584AAB375264001D@GSjpTKYDCembx32.service.hitachi.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2559 Lines: 56 Hi Masami, On Thu, Dec 03, 2015 at 07:13:15AM +0000, 平松雅巳 / HIRAMATU,MASAMI wrote: > From: Namhyung Kim [mailto:namhyung@kernel.org] > > > >On Thu, Dec 03, 2015 at 12:15:12AM +0000, 平松雅巳 / HIRAMATU,MASAMI wrote: > >> >From: Namhyung Kim [mailto:namhyung@gmail.com] On Behalf Of Namhyung Kim > >> > > >> >Backtrace is a crucial info for debugging. And upcoming refcnt > >> >tracking facility also wants to use it. > >> > >> Note that the refcnt backtrace symbol resolution will work at > >> exit. This means that it can not depend on the feature in perf > >> tools itself. (and of course, since the refcnt tries to find unused > >> objects in perf tools at exit, if we use perf_thread, it will > >> detect the objects related to the perf_thread are leaked) > > > >Hmm.. right. > > > >I think we can leave the perf_thread outside of refcnt infrastructure. > >IOW it should be created before refcnt debugging is activated and > >released after refcnt is done. What do you think? > > Would you mean we don't debug the objects related to a perf_thread? > It will mean that you don't debug anything, since perf_thread involves > most of refcnt using objects, like dso, map, map_groups etc. And some > bugs are actually found at where those objects are handled. > > I would not like to care about the output quality of the backtrace_symbols. > I only need the top 2-3 addresses of the backtrace buffer, because I have > (eu-)addr2line command to find the actual source code lines from those > addresses :). If you need, I can also provide an address decoder awk/shell > script for that. > > Instead, I prefer to avoid complexity on the "debugging feature"(because > it can introduce new bugs,) and make it more robust (e.g. if we failed to > get symbol, just shows the raw address) > > BTW, the robustness is a key point for debugging. Please consider the case > that you hit an error on the objects in the perf_thread, it could cause > double fault(segv again) on the same object. That is what I actually don't > want. I understand your point. If you object, I won't insist it strongly. It's possible there's a bug in perf_thread symbol resolution. But it's pretty straightforward and simple use case so if there's a bug in that code, it should be found beforehand IMHO. Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/