Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756288AbbHZOoE (ORCPT ); Wed, 26 Aug 2015 10:44:04 -0400 Received: from mail.kernel.org ([198.145.29.136]:56792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbbHZOoC (ORCPT ); Wed, 26 Aug 2015 10:44:02 -0400 Date: Wed, 26 Aug 2015 11:27:58 -0300 From: Arnaldo Carvalho de Melo To: =?iso-8859-1?Q?Rapha=EBl?= Beamonte Cc: Jiri Olsa , Namhyung Kim , Matt Fleming , Peter Zijlstra , Ingo Molnar , David Ahern , lkml Subject: Re: [PATCH 03/11] perf tools: Do not change lib/api/fs/debugfs directly Message-ID: <20150826142758.GE18596@kernel.org> References: <1440596813-12844-1-git-send-email-jolsa@kernel.org> <1440596813-12844-4-git-send-email-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Content-Length: 1893 Lines: 50 Em Wed, Aug 26, 2015 at 10:06:45AM -0400, Rapha?l Beamonte escreveu: > On Aug 26, 2015 9:47 AM, "Jiri Olsa" wrote: > > > > The tracing_events_path is the variable we want to change > > via --debugfs-dir option, not the debugfs_mountpoint. > > > > > perf_debugfs_set_path(cmd + > strlen(CMD_DEBUGFS_DIR)); > > - fprintf(stderr, "dir: %s\n", debugfs_mountpoint); > > + fprintf(stderr, "dir: %s\n", tracing_path); > > if (envchanged) > > *envchanged = 1; > > } else if (!strcmp(cmd, "--list-cmds")) { > > diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c > > index d33c34196a5a..7acafb3c5592 100644 > > --- a/tools/perf/util/util.c > > +++ b/tools/perf/util/util.c > > @@ -439,7 +439,6 @@ const char *perf_debugfs_mount(const char *mountpoint) > > > > void perf_debugfs_set_path(const char *mntpt) > > { > > - snprintf(debugfs_mountpoint, strlen(debugfs_mountpoint), "%s", > mntpt); > > set_tracing_events_path("tracing/", mntpt) ; > > } > > Why keep a function name with debugfs in it here if we're not touching > debugfs anymore? Right > Shouldn't we call directly set_tracing_events_path if that's what we > want to do? Also, the option name --debugfs-dir is not entirely > relevant anymore? Yeah, probably that was a really bad name to start with, i.e. it should've been named perhaps --event-definitions-dir or something to that degree. "debugfs", "tracefs" and the next thing to come in this area are just implementation details :-) - Arnaldo -- 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/