Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752568AbbKXHev (ORCPT ); Tue, 24 Nov 2015 02:34:51 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:32829 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbbKXHeu (ORCPT ); Tue, 24 Nov 2015 02:34:50 -0500 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 165.244.98.150 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org Date: Tue, 24 Nov 2015 16:34:35 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo CC: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Frederic Weisbecker , Masami Hiramatsu Subject: Re: [RFC/PATCH] perf tools: Introduce perf_thread for backtrace Message-ID: <20151124073435.GD2636@sejong> References: <1447999383-15456-1-git-send-email-namhyung@kernel.org> <20151123213936.GF10315@kernel.org> MIME-Version: 1.0 In-Reply-To: <20151123213936.GF10315@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2015/11/24 16:34:36, Serialize by Router on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2015/11/24 16:34:36, Serialize complete at 2015/11/24 16:34:36 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1647 Lines: 37 On Mon, Nov 23, 2015 at 06:39:36PM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Nov 20, 2015 at 03:03:03PM +0900, Namhyung Kim escreveu: > > Backtrace is a crucial info for debugging. And upcoming refcnt > > tracking facility also wants to use it. > > > > So instead of relying on glibc's backtrace_symbols[_fd] which misses > > some (static) functions , use our own symbol searching mechanism. To > > do that, add perf_thread global variable to keep its maps and symbols. > > > > The backtrace output from TUI is changed like below. (I made a key > > action to generate a segfault for testing): > > This is a really nice use of what we have, I guess we could simplify > things further, not having to create a struct machine, as we have just > one thread, and we're not interested in kernel addresses, so no need for > kmaps, etc. Yes, I thought about it. But as adding the perf thread to an existing machine can affect other thread(s), I didn't do it. Maybe we can set the perf threads' machine pointer in a hacky way without adding the thread into the machine, but I'd rather not doing that too because it's fragile and current code is simple enough IMHO. > > But as-is it already looks better than what we were using :-) > > I'll try testing it further and will probably switch to using it if > nobody voices any problem we haven't realised with such approach. Thank you! 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/