Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752810AbbLKC1p (ORCPT ); Thu, 10 Dec 2015 21:27:45 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:33583 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbbLKC1o (ORCPT ); Thu, 10 Dec 2015 21:27:44 -0500 Date: Fri, 11 Dec 2015 11:27:03 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Frederic Weisbecker , Andi Kleen , Stephane Eranian , Adrian Hunter Subject: Re: [PATCH/RFC 02/16] perf top: Fix and cleanup perf_top__record_precise_ip() Message-ID: <20151211022703.GA30661@danjae.kornet> References: <1449734015-9148-1-git-send-email-namhyung@kernel.org> <1449734015-9148-3-git-send-email-namhyung@kernel.org> <20151210190417.GI17996@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151210190417.GI17996@kernel.org> 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: 1526 Lines: 44 Hi Arnaldo, On Thu, Dec 10, 2015 at 04:04:17PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Dec 10, 2015 at 04:53:21PM +0900, Namhyung Kim escreveu: > > At first, it has duplicate ui__has_annotation() and 'sort__has_sym' > > and 'use_browser' check. In fact, the ui__has_annotation() should be > > removed as it needs to annotate on --stdio as well. And the > > top->sym_filter_entry is used only for stdio mode, so make it clear on > > the condition too. > > So this is doing more than one thing and changes decisions about > non-trivial operations, can you please break it down into smaller > patches? Sure. > > > Also the check will be simplifed if it sets sym before the check. And > > omit check for 'he' since its caller (hist_iter__top_callback) only > > gets called when iter->he is not NULL. > > > > Secondly, it converts the 'ip' argument using map__unmap_ip() before > > the call and then reverts it using map__map_ip(). This seems > > meaningless and strange since only one of them checks the 'map'. > > For isntance: the following change has value and should be on a separate > patch. Will do! Thanks, Namhyung > > > Finally, access the he->hists->lock only if there's an error. > > > > Signed-off-by: Namhyung Kim > > --- -- 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/