From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778AbbLNPvO (ORCPT ); Mon, 14 Dec 2015 10:51:14 -0500 Received: from mail.kernel.org ([198.145.29.136]:41427 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbbLNPvL (ORCPT ); Mon, 14 Dec 2015 10:51:11 -0500 Date: Mon, 14 Dec 2015 12:51:07 -0300 From: Arnaldo Carvalho de Melo To: Josh Poimboeuf Cc: Jiri Olsa , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Namhyung Kim Subject: Re: [PATCH v3 15/17] perf: Finalize subcmd independence Message-ID: <20151214155107.GP6843@kernel.org> References: <20151214103220.GB9449@krava.brq.redhat.com> <20151214141359.GD30746@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151214141359.GD30746@treble.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Dec 14, 2015 at 08:13:59AM -0600, Josh Poimboeuf escreveu: > On Mon, Dec 14, 2015 at 11:32:20AM +0100, Jiri Olsa wrote: > > On Sun, Dec 13, 2015 at 10:18:15PM -0600, Josh Poimboeuf wrote: > > > For the files that will be moved to the subcmd library, remove all their > > > perf-specific includes and duplicate any needed functionality. > > > > > > Signed-off-by: Josh Poimboeuf > > > --- > > > tools/perf/util/exec_cmd.c | 75 +++++++++++++++++++++++++++++++++++++---- > > > tools/perf/util/help.c | 47 +++++++++++++++++++++++--- > > > tools/perf/util/help.h | 4 ++- > > > tools/perf/util/pager.c | 7 +++- > > > tools/perf/util/parse-options.c | 68 +++++++++++++++++++++++-------------- > > > tools/perf/util/parse-options.h | 2 +- > > > tools/perf/util/run-command.c | 16 ++++++--- > > > tools/perf/util/run-command.h | 2 ++ > > > tools/perf/util/sigchain.c | 3 +- > > > tools/perf/util/subcmd-util.h | 67 ++++++++++++++++++++++++++++++++++++ > > > tools/perf/util/util.h | 14 -------- > > > 11 files changed, 247 insertions(+), 58 deletions(-) > > > > this duplicates functions that we have already in perf, > > I think we better move them into lib first.. > > strlcpy, die, xrealloc, ALLOC_GROW Some stuff should move to other, non-subcmd libraries that will then be used by both subcmd, tools/perf/, etc, while some we take the oportunity to kill, like die() and perhaps strbuf :-) > > and probably some others... > > The duplication was an intentional decision we made in the v2 discussion > in order to keep the library's scope focused on 'subcmd'. Ok, I merged a good chunk now, will push soon. - Arnaldo