From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753430AbdK1TPd (ORCPT ); Tue, 28 Nov 2017 14:15:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:54188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278AbdK1TPb (ORCPT ); Tue, 28 Nov 2017 14:15:31 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF6602148C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Tue, 28 Nov 2017 14:15:29 -0500 From: Steven Rostedt To: Vladislav Valtchev Cc: linux-kernel@vger.kernel.org, y.karadz@gmail.com Subject: Re: [PATCH 04/11] trace-cmd: Extract parse_record_options() from trace_record() Message-ID: <20171128141529.4e6ce05e@gandalf.local.home> In-Reply-To: <1511895433.1754.39.camel@gmail.com> References: <20171123163335.19078-1-vladislav.valtchev@gmail.com> <20171123163335.19078-5-vladislav.valtchev@gmail.com> <20171128114822.0f80ed1e@gandalf.local.home> <1511893066.1754.8.camel@gmail.com> <20171128133024.4f3b06e4@gandalf.local.home> <1511895433.1754.39.camel@gmail.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Nov 2017 20:57:13 +0200 Vladislav Valtchev wrote: > On Tue, 2017-11-28 at 13:30 -0500, Steven Rostedt wrote: > > On Tue, 28 Nov 2017 20:17:46 +0200 > > Vladislav Valtchev wrote: > > > > > Since that code was profile-specific, I put it in trace_profile(), > > > without 'if' statements, clearly. > > > > This is all about balancing. You were able to remove one if statement, > > but required two function calls by all others. > > > > I totally agree that is all about balancing. > I wrote exactly the same thing as part of my previous e-mail (before reading this message). > > Are you concerned by the cost the of function calls or by the "verbosity" in calling them? No the cost is negligible. More about the complexity. Adding "paired" calls can sometimes be more confusing than if logic. > > Otherwise, I believe that having those function calls that way just makes the code simpler > for new contributors. Functions, among everything else, are also "labels" for pieces of code. > Having two different labels there (init context and parse options) makes sense to me. > But, again, I understand that is a trade-off based on my subjective value system and > way of thinking, of course. > > Do you have a strong opinion? Yes ;-) I'll reply why in the other email. -- Steve