Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405909
| Path | csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Taeung Song <treeze.taeung@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [RFC][PATCH v2 0/5] perf config: Reimplement perf_config() using perf_config_set__inter() |
| Date | Tue, 24 May 2016 09:20:02 +0200 |
| Message-ID | <rCeNb-dQ-9@gated-at.bofh.it> (permalink) |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=dPVKwcp41V7Lgax9yFrk1+Qnfap6XKhWCUs0IkbN8oQ=; b=KYAmth/GaSMZcY30D0MSJy2Rpj7L6EaiWlkRP5GBcTraSNyOtpsHmwTAywNLMgs+A5 XcEq5ea9F4x4OZTpzZ8FO+u8xLTl2hmjuiKDUnGoKeniOcvwIrpWAf/kMHjd4IY55Sq4 C2AbyHRwmTmh7OO0893LN/rvJVqELQSawZFe4aZ8ABYy23kalGWACq0AJCit0LroIT9J RHIMeF7h7tj7l/D0eYsDkgbD1mHcv4Xy0/jMxM1TEBctOeZNFbdZ5uRRiSMplPEBsp4e OnE+yW13iMxzmR3OU+fqpOI4qBQ0AD0qqpHQZbPYDaFLAXlmBd/IutgAj0zFNuViYM0h YQvA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dPVKwcp41V7Lgax9yFrk1+Qnfap6XKhWCUs0IkbN8oQ=; b=WaeMatIPh3Aem45xJbkT5lpzPKtldarbO6/2eejPuKH8RweXAlEv+9iSvtLnGOvbSM q716V8baOflh6MQymZHkCuqxQoZSwhRnLrdR2P8u61lWRnvd5JRPziGEX/mFMjc7rnmB 2EgxsExqlXhTKeUspZukA0Trqz0HCUfMILKy5mP5MagugA3o86gJrx7hQmaBQ9x5IZ/B TlV/Gi1PYz6UBt/slqgvF4zQOmvp7FqEZhlqRz6bV8851RAXI3PBg7OOKV0sMJRyHvc7 nIxniggM5VuKZfHTaYkpmlWd1Y4LJcTSeiPTGunO0JOwfrOPAirmryTAXQZDZFFK3GKb 2aYw== |
| X-Gm-Message-State | ALyK8tLto9awgil5OkYYUdaVIbE8Q5j2W/6PjtJT1NykUGiUus3hnoXTpHWVUOLttkU73A== |
| X-Received | by 10.66.126.11 with SMTP id mu11mr4560004pab.18.1464074257833; Tue, 24 May 2016 00:17:37 -0700 (PDT) |
| X-Mailer | git-send-email 2.5.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Masami Hiramatsu <mhiramat@kernel.org>, Taeung Song <treeze.taeung@gmail.com> |
| X-Original-Date | Tue, 24 May 2016 16:17:27 +0900 |
| X-Original-Message-ID | <1464074252-21991-1-git-send-email-treeze.taeung@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1405909 |
Show key headers only | View raw
Everytime perf_config() is called, perf_config() always read config files.
(i.e. user config '~/.perfconfig' and system config '$(sysconfdir)/perfconfig')
But we need to use 'struct perf_config_set config_set' variable
that already contains all config key-value pairs
to avoid this repetitive work in perf_config().
In other words, if new perf_config() is called,
only first time 'config_set' is initialized
collecting all configs from config files and it work with perf_config_set__iter().
If we do, what old perf_config() handle is the same as new perf_config() work
without the repetitive work that read config files.
IMHO, I think this patchset is needed because not only the repetitive work
should be avoided but also in near future, it would be smooth to manage perf configs.
If you give me any feedback, I'd apprecicated it. :)
Thanks,
Taeung
v2:
- split a patch into several patches
- reimplement show_config() using new perf_config()
- modify perf_config_set__delete using global variable 'config_set'
- reset config set when only 'config' sub-commaned work
because of options for config file location
Taeung Song (5):
perf config: Use new perf_config_set__init() to initialize config set
perf config: Reimplement perf_config() using perf_config_set__iter()
perf config: Modify perf_config_set__delete() using global variable
'config_set'
perf config: Reimplement show_config() using perf_config()
perf config: Reset config set at only 'config' sub-command
tools/perf/builtin-config.c | 43 ++++--------
tools/perf/util/config.c | 156 +++++++++++++++++++++++++++++---------------
tools/perf/util/config.h | 2 +-
3 files changed, 117 insertions(+), 84 deletions(-)
--
2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[RFC][PATCH v2 0/5] perf config: Reimplement perf_config() using perf_config_set__inter() Taeung Song <treeze.taeung@gmail.com> - 2016-05-24 09:20 +0200
csiph-web