From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752097AbcGSAKE (ORCPT ); Mon, 18 Jul 2016 20:10:04 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:57741 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751991AbcGSAKB (ORCPT ); Mon, 18 Jul 2016 20:10:01 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Tue, 19 Jul 2016 09:08:01 +0900 From: Byungchul Park To: Josh Poimboeuf Cc: Frederic Weisbecker , Ingo Molnar , peterz@infradead.org, linux-kernel@vger.kernel.org, walken@google.com, Peter Zijlstra Subject: Re: [PATCH 1/2] x86/dumpstack: Optimize save_stack_trace Message-ID: <20160719000801.GS2279@X58A-UD3R> References: <1467628075-7289-1-git-send-email-byungchul.park@lge.com> <20160707101740.GF2279@X58A-UD3R> <20160708100819.GA17300@gmail.com> <20160708142929.lvxgapbxfv5wfbk2@treble> <20160708150231.GH30200@lerouge> <20160708152246.hgoisxhhtzeehrht@treble> <20160718031422.GN2279@X58A-UD3R> <20160718130910.vmyvadh5arurxptv@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160718130910.vmyvadh5arurxptv@treble> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 18, 2016 at 08:09:10AM -0500, Josh Poimboeuf wrote: > > > > There are several different users of save_stack_trace() in the kernel, we can't > > > > be sure that all of them are interested in dropping those guesses. > > > > > > > > So I'd rather advocate in favour of a new seperate helper. > > > > > > So how about we change save_stack_trace() to use print_context_stack() > > > for CONFIG_FRAME_POINTER=n and print_context_stack_bp() for > > > CONFIG_FRAME_POINTER=y? That would preserve the existing behavior, no? > > > > Even if CONFIG_FRAME_POINTER=y, someone may want to guess, doesn't they? > > For CONFIG_FRAME_POINTER=y, the guesses are ignored by > __save_stack_address() and only the reliable addresses are saved. Indeed. I was confused. > We shouldn't change that behavior, unless you actually know of a caller > who wants the guesses. And even then the "guess" variation should be > named accordingly to make it clear that it's not a "reliable" stack > trace, even though frame pointers are enabled. My question was caused by being confused. I agree with you. > > -- > Josh