From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbbDLOpi (ORCPT ); Sun, 12 Apr 2015 10:45:38 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:36268 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbbDLOpf convert rfc822-to-8bit (ORCPT ); Sun, 12 Apr 2015 10:45:35 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: [PATCH 2/2] perf tools: Add a option 'remove' to perf-config and features which get or set a config variable. From: Taewoong Song In-Reply-To: <20150410093136.GB31326@krava.brq.redhat.com> Date: Sun, 12 Apr 2015 23:45:30 +0900 Cc: Arnaldo Carvalho de Melo , "linux-kernel@vger.kernel.org" , namhyung@kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <44902470-673C-4FFA-9724-1C1B48640775@gmail.com> References: <1428589591-22838-1-git-send-email-treeze.taeung@gmail.com> <1428589591-22838-2-git-send-email-treeze.taeung@gmail.com> <20150410093136.GB31326@krava.brq.redhat.com> To: Jiri Olsa X-Mailer: Apple Mail (2.2070.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, jirka > On Apr 10, 2015, at 6:31 PM, Jiri Olsa wrote: > > On Thu, Apr 09, 2015 at 11:26:31PM +0900, Taeung Song wrote: >> This patch consists of adding functions >> which get, set or remove a specific config variable. >> For the syntax examples, >> >> perf config [options] [section.subkey[=value]] >> >> display all perf config with default values >> # perf config >> or >> # perf config -a | --all > > so this is ^^^ what the previous patch does right? > >> >> display a specific key(section.subkey) and value >> # perf config report.queue >> >> set a specific key and value >> # perf config report.queue=100M >> >> remove a specific key >> # perf config -r | --remove report.queue > > haven't checked the code but: > > [jolsa@krava perf]$ ./perf config krava=true > The config variable does not contain a section: krava=true[jolsa@krava perf]$ > > missing '\n' > > we can set anything now: > [jolsa@krava perf]$ ./perf config krava.krava=true > > the restriction for only known keys would need similar stuff like > for the '-a' option I asked in the previous email right? > Thanks for your review. I sent a couple of patch again. 1. I modified a commit message of second patch to remove comment about ‘-a’, ‘—all’ option. 2. I added ‘\n’ character when printing some error messages. 3. I added ‘Error: Unknown argument’ message. But I thought that displaying current config with all possible keys and their default values, and the restriction for only known keys depending on information of all perf configuration can be included in next patch. Would you mind ? Thanks, Taeung