Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752608AbcDBRIb (ORCPT ); Sat, 2 Apr 2016 13:08:31 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35605 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbcDBRIa (ORCPT ); Sat, 2 Apr 2016 13:08:30 -0400 From: Taeung Song To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Namhyung Kim , Ingo Molnar , Peter Zijlstra , Taeung Song Subject: [PATCH v5 0/4] Infrastructure code for perf-config Date: Sun, 3 Apr 2016 02:08:20 +0900 Message-Id: <1459616904-1682-1-git-send-email-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2088 Lines: 61 Hi, We can use the config files (i.e user wide ~/.perfconfig and system wide $(sysconfdir)/perfconfig) to configure perf tools. perf-config help user manage the config files, not manually look into or edit them. Introduce new infrastructure code for config management features of perf-config subcommand. This pathset contains basic code for various purposes of configuration management showing current configs, in the near future, showing all configs with default value, getting current configs from the config files or writing configs that user type on the config files, etc. IMHO, I think this infrastructure code is needed to add new funcationalities for config management of perf-config. If anyone reviews this, I'd appreciate it. Thanks, Taeung v5: - departmentalize perf_config_set__delete() (Arnaldo) - remove confusing find_config() (Arnaldo) - use pr_debug() instead of pr_err() (Arnaldo) - use zfree() instead of free() (Arnaldo) - more compact in perf_config_set__new() (Arnaldo) - rename variables 'perf_configs', 'config_items', etc. (Arnaldo) v4: - fill perf_config_set__delete() in collect_config() for state of error - fill the code setting is_custom value in add_config_item() (Namhyung) v3: - use the section list that contains configs each section instead of the single config list (Namhyung) - exclude a patch for '--list-all' option from this patchset v2: - remove perf_config_kind (user, system or both config files) and needless at this time, etc. (Namhyung) - separate this patch as several patches (Namhyung) - fix typing errors, etc. Taeung Song (4): perf config: Introduce perf_config_set class perf config: Let show_config() work with perf_config_set perf config: Prepare all default configs perf config: Initialize perf_config_set with all default configs tools/perf/builtin-config.c | 38 +++++- tools/perf/util/config.c | 309 ++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/config.h | 91 +++++++++++++ 3 files changed, 431 insertions(+), 7 deletions(-) create mode 100644 tools/perf/util/config.h -- 2.5.0