Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396967
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Taeung Song <treeze.taeung@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 0/4] perf config: Introduce default config key-value pairs arrays |
| Date | Mon, 09 May 2016 13:50:02 +0200 |
| Message-ID | <rwRRf-4H5-5@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=NcxEhYDyWsezVImbjPigDkHH0CR2cQCMvnvPEVoBTMw=; b=fwqRA+fvLHqWOt8dkW4bo0JUb+evXEaG8tto+/P5XYWZyw0h90cfv5MebEZKykeQBs NrqQikalg09T/KCHRX4fwNbz7ryTgZsZDZ3YClYhURTv4oEm0Z1e6ZKx7Mt34FmufxTK Vtg1luriKBpsPCC5D8eL5OwkxCqxY448HwSkHxFztyNb1yxtwN5sx1+a8pvB6Uqv+dVp l8e/6NDDimEhnRqfiy7oIHSmQh50Fhqw6ZDVIbhdMPHHgoU+JWV+cISpjA0ymC09i6TB ehCRGQNcsatpBd6IM35HXHO2vLU0cDHwggEVbfNpJD+NkSiEH14SCDdFfsaQODg4omu9 oIgQ== |
| 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=NcxEhYDyWsezVImbjPigDkHH0CR2cQCMvnvPEVoBTMw=; b=GjA6kKiBINXvXRA0wLT7Q+hLK0HemciiJndpYr/NXca8D5HDwtsqrV9MbrVRzkX1AY qAWNnrMsOzMTOn6bNu//KHMiXARXVOOKByieGZqw0RIBX1Gjucw3i25XV3FTRrIE8+pZ oFeno0fcX/1eisyeKFcRikSnFVpUjb58jZf/70+o9ovDmJFRqXGl8Rr7T4p69NIajouD XPehqqQ4uI/b+2CXtgBz7WKwfPQYJcbIwifqiIv1KBont5XHK9kt3VR9HiX4lkZtjSVy s3hDuRbbbKhC/Iq/2GDn5L2+vfy5WnKlxGnPrGjLiwoB4Yn4c+4amGSpwYDT4jk0DWpS DUPw== |
| X-Gm-Message-State | AOPr4FXU5B0NhPItxcUtBz/AvZw/5JVS1iTzBZoCHgTCq0qy2Yvv1WwPHAxJxFQ2Z7x0XQ== |
| X-Received | by 10.66.172.10 with SMTP id ay10mr49820116pac.36.1462794114369; Mon, 09 May 2016 04:41:54 -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 | 62 |
| 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>, Taeung Song <treeze.taeung@gmail.com> |
| X-Original-Date | Mon, 9 May 2016 20:41:45 +0900 |
| X-Original-Message-ID | <1462794109-14652-1-git-send-email-treeze.taeung@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1396967 |
Show key headers only | View raw
We currently use values of actual type(int, bool, char *, etc.)
when initializing default perf config values.
For example,
If there isn't user config value at ~/.perfconfig for 'annotate.use_offset' config variable,
default value for it is 'true' bool type value in perf like below.
At ui/browsers/annoate.c
static struct annotate_browser_opt {
bool hide_src_code,
use_offset,
jump_arrows,
show_linenr,
show_nr_jumps,
show_total_period;
} annotate_browser__opts = {
.use_offset = true,
.jump_arrows = true,
};
But I suggest using new config arrays that have all default config key-value pairs
and then initializing default config values with them.
Because if we do, we can manage default perf config values at one spot (like util/config.c)
and It can be easy and simple to modify default config values or add new configs.
For example,
If we use new default config arrays and there isn't user config value for 'annoate.use_offset'
default value for it will be set as annotate_config_items[CONFIG_ANNOATE_USE_OFFSET].value
instead of actual boolean type value 'true'.
IMHO, I think it should be needed to use new default config arrays
to manage default perf config values more effectively.
And this pathset contains patchs for only 'colors' and 'annoate' section
because waiting for other opinions.
If you review this patchset, I'd appreciate it :-)
Thanks,
Taeung
Taeung Song (4):
perf config: Introduce default_config_item for all default config
key-value pairs
perf tools: Separate out code setting ground colors from
ui_browser__color_config
perf config: Initialize ui_browser__colorsets with default config
items
perf config: Initialize annotate_browser__opts with default config
items
tools/perf/ui/browser.c | 89 ++++++++++++++--------
tools/perf/ui/browser.h | 1 +
tools/perf/ui/browsers/annotate.c | 12 ++-
tools/perf/ui/tui/setup.c | 1 +
tools/perf/util/cache.h | 1 +
tools/perf/util/config.c | 150 +++++++++++++++++++++++++++++++++++++-
tools/perf/util/config.h | 74 ++++++++++++++++++-
7 files changed, 291 insertions(+), 37 deletions(-)
--
2.5.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 0/4] perf config: Introduce default config key-value pairs arrays Taeung Song <treeze.taeung@gmail.com> - 2016-05-09 13:50 +0200 [PATCH 4/4] perf config: Initialize annotate_browser__opts with default config items Taeung Song <treeze.taeung@gmail.com> - 2016-05-09 13:50 +0200
csiph-web