[PATCH v11 13/24] perf config: Document 'man.viewer' variable in man page

2015-11-17 Thread Taeung Song
Explain 'man.viewer' variable. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-config.txt ind

[PATCH v11 11/24] perf config: Document variables for 'report' section in man page

2015-11-17 Thread Taeung Song
Explain 'report' section's variables. 'percent-limit', 'queue-size' and 'children'. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 17 + 1 file changed, 17 insertions(+

[PATCH v11 09/24] perf config: Document 'ui.show-headers' variable in man page

2015-11-17 Thread Taeung Song
Explain 'ui.show-headers' variable. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-config

[PATCH v11 05/24] perf config: Document 'buildid.dir' variable in man page

2015-11-17 Thread Taeung Song
Explain 'buildid.dir' variable. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-

[PATCH v11 03/24] perf config: Document variables for 'color' section in man page

2015-11-17 Thread Taeung Song
Explain 'color' section and its variables. 'top', 'medium', 'normal', 'selected', 'code', 'addr' and 'root'. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.t

[PATCH v11 02/24] perf tools: Add perf-config document

2015-11-17 Thread Taeung Song
Add perf-config document to describe the perf configuration and a subcommand 'list'. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 103 +++ 1 file changed, 103 insertions(+) create mode 100644

[PATCH v9 0/9] perf tools: Add 'perf-config' command

2015-11-02 Thread Taeung Song
ggest this patchset of the perf-config command which can list, get, set, remove perf configs or list with default config values as below. Taeung Song (9): [PATCH v9 1/9] perf tools: Add 'perf-config' command [PATCH v9 2/9] perf config: Add '--system' and &#

[PATCH v9 1/9] perf tools: Add 'perf-config' command

2015-11-02 Thread Taeung Song
x27;perf-config' command with '--list' option and a document for it. perf config [options] display current perf config variables. # perf config or # perf config -l | --list Signed-off-by: Taeung Song --- tools/perf/Build | 1 +

[PATCH v9 9/9] perf config: Add a option 'remove' to perf-config

2015-11-02 Thread Taeung Song
A option 'remove' is to remove specific config variables. For the syntax examples, # perf config [] -r | --remove [section.name ...] Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 6 + tools/perf/builtin-config.c

[PATCH v9 4/9] perf config: Add comparing name treating '_' and '-' as being the same thing.

2015-11-02 Thread Taeung Song
The comparing name functionality is that two config name are compared treating '-' or '_' as being the same thing. For example, both 'print_percent' and 'print-percent' in 'call-graph' section are regarded as the same thing. Signed-off-by:

[PATCH v9 7/9] perf config: Add 'set' feature

2015-11-02 Thread Taeung Song
This patch consists of functions which can set specific config variables. For the syntax examples, perf config [] [options] [section.name[=value] ...] set specific config variables # perf config report.queue-size=100M report.children=true Signed-off-by: Taeung Song --- tools/perf

[PATCH v9 8/9] perf config: normalize a value depending on default type of it

2015-11-02 Thread Taeung Song
ff-by: Taeung Song --- tools/perf/builtin-config.c | 54 - 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 6ac28af..04884fd 100644 --- a/tools/perf/builtin-config.c +++ b/tools

[PATCH v9 2/9] perf config: Add '--system' and '--user' options to select which config file is used

2015-11-02 Thread Taeung Song
config --user | --system or both user and system config file. # perf config Signed-off-by: Taeung Song --- tools/perf/Documentation/perf-config.txt | 14 +- tools/perf/builtin-config.c | 18 +- tools/perf/util/cache.h | 3 +++

[PATCH v9 6/9] perf config: Add 'get' functionaliy

2015-11-02 Thread Taeung Song
This patch consists of functions which can get specific config variables. For the syntax examples, perf config [] [section.name ...] display key-value pairs of specific config variables # perf config report.queue-size report.children Signed-off-by: Taeung Song --- tools/perf

[PATCH v9 5/9] perf config: Add a option 'list-all' to perf-config

2015-11-02 Thread Taeung Song
A option 'list-all' is to display both current config variables and all possible config variables with default values. The syntax examples are like below perf config [] [options] display all perf config with default values. # perf config -a | --list-all Signed-off-by: T

[PATCH v9 3/9] perf config: Collect configs to handle config variables

2015-11-02 Thread Taeung Song
collected configs list. Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 148 ++-- tools/perf/util/cache.h | 13 2 files changed, 156 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-conf

Re: [PATCH] perf tools: Create for_each_event{_system, _file} macros for tracepoints iteration

2017-01-30 Thread Taeung Song
On 01/30/2017 09:38 PM, Jiri Olsa wrote: On Mon, Jan 30, 2017 at 07:32:03PM +0900, Taeung Song wrote: SNIP looks almost the same as for_each_event_system macro, what's the difference other than 'ftrace' check? Little thing. In parse-events.c for_each_event macro contains

[PATCH v2 2/4] perf ftrace: Add ftrace.tracer config option

2017-01-31 Thread Taeung Song
284231: finish_task_switch <-__schedule <...>-14450 [002] 10089.284232: finish_wait <-pipe_wait <...>-14450 [002] 10089.284232: mutex_lock <-pipe_wait <...>-14450 [002] 10089.284232: _cond_resched <-mutex_lock Cc: Jiri Olsa Cc: Namhyung

[PATCH v2 0/4] Add ftrace config and refactor several parts

2017-01-31 Thread Taeung Song
Hi, :) Lately I sent several patches. But they need to be modified so I send v2 packing them. v2: - Check the return of perf_config() and warn the user with config error message (Arnaldo) - Change commit messages (Jiri) - Add only one macro instead of two macros (Jiri) Taeung Song (4

[PATCH v2 4/4] perf tools: Increase index if perf_evsel__new_idx() succeeded

2017-01-31 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/parse-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 87a3e5a..ac47c12 100644 --- a/tools/perf/util/parse-events.c

[PATCH v2 1/4] perf tools: Create for_each_event macro for tracepoints iteration

2017-01-31 Thread Taeung Song
Such as for_each_subsystem and for_each_event in util/parse-events.c, add new macros 'for_each_event' for easy iteration over the tracepoints in order to be more compact and readable. Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: T

[PATCH v2 3/4] perf tools: Check NULL after zalloc() and Use zfree() instead of free() in parse-events.c

2017-01-31 Thread Taeung Song
Currently there are several parts not checking NULL after allocating with zalloc() or asigning NULL value to a pointer variable after doing free(). So I fill in code checking NULL and use zfree() instead of free(). Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util

Re: [PATCH v2 1/4] perf tools: Create for_each_event macro for tracepoints iteration

2017-01-31 Thread Taeung Song
Hi, Arnaldo :) On 01/31/2017 09:21 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jan 31, 2017 at 08:38:28PM +0900, Taeung Song escreveu: Such as for_each_subsystem and for_each_event in util/parse-events.c, add new macros 'for_each_event' for easy iteration over the tracepoints in o

Re: [PATCH v2 2/4] perf ftrace: Add ftrace.tracer config option

2017-01-31 Thread Taeung Song
On 01/31/2017 10:15 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jan 31, 2017 at 09:46:28AM -0300, Arnaldo Carvalho de Melo escreveu: Also you are silently ignoring any unknown variable in this section, so if someone has this: cat ~/.perfconfig [ftrace] trace = function I.e. forget

Re: [PATCH v2 3/4] perf tools: Check NULL after zalloc() and Use zfree() instead of free() in parse-events.c

2017-02-01 Thread Taeung Song
Sorry I'm late.. I got it! I'll send v3 with changed patches !! Thanks, Taeung On 01/31/2017 10:23 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jan 31, 2017 at 08:38:30PM +0900, Taeung Song escreveu: Currently there are several parts not checking NULL after allocating with zalloc() o

Re: [PATCH v2 4/4] perf tools: Increase index if perf_evsel__new_idx() succeeded

2017-02-01 Thread Taeung Song
On 01/31/2017 10:25 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jan 31, 2017 at 08:38:31PM +0900, Taeung Song escreveu: Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song The title of this patch is misleading, ambiguous. It leads one to have doubt if we were not incrementing that

[PATCH v3 0/4] Fill in lacking parts and Refactor several parts

2017-02-01 Thread Taeung Song
- Add only one macro instead of two macros (Jiri) Taeung Song (4): perf tools: Only increase index if perf_evsel__new_idx() succeeds perf tools: Fill in a lacking part no checking NULL after zalloc() in parse-events.c perf tools: Use zfree() instead of free() and assigning NULL to the

[PATCH v3 4/4] perf tools: Use zfree() to be more safe in parse-events.c

2017-02-01 Thread Taeung Song
Signed-off-by: Taeung Song --- tools/perf/util/parse-events.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 316f054..ac47c12 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util

[PATCH v3 2/4] perf tools: Fill in a lacking part no checking NULL after zalloc() in parse-events.c

2017-02-01 Thread Taeung Song
Signed-off-by: Taeung Song --- tools/perf/util/parse-events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 5d90fe7..0c3b81a 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -211,6

[PATCH v3 1/4] perf tools: Only increase index if perf_evsel__new_idx() succeeds

2017-02-01 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/parse-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 3c876b8..5d90fe7 100644 --- a/tools/perf/util/parse-events.c

[PATCH v3 3/4] perf tools: Use zfree() instead of free() and assigning NULL to the pointer

2017-02-01 Thread Taeung Song
Signed-off-by: Taeung Song --- tools/perf/util/parse-events.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 0c3b81a..316f054 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse

[PATCH 3/3] perf ftrace: Handle NULL at write_tracing_file()

2017-01-26 Thread Taeung Song
If a value for tracing file is NULL, segment fault error can occur using strlen(). Of course, currently the function don't be given NULL value. But write_tracing_file() can be generally used. So add the if statement. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools

[PATCH 2/3] perf ftrace: Add ftrace.tracer config option

2017-01-26 Thread Taeung Song
2] 10089.284233: generic_pipe_buf_confirm <-pipe_read Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-ftrace.c | 20 1 file changed, 20 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 4144

[PATCH 1/3] perf ftrace: Remove needless code setting default tracer

2017-01-26 Thread Taeung Song
Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-ftrace.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index d05658d..41d 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-

Re: [PATCH 2/3] perf ftrace: Add ftrace.tracer config option

2017-01-26 Thread Taeung Song
Hi, Arnaldo :) On 01/27/2017 03:58 AM, Arnaldo Carvalho de Melo wrote: Em Thu, Jan 26, 2017 at 06:35:38PM +0900, Taeung Song escreveu: Currently perf ftrace command will select 'function_graph' or 'function'. So add ftrace.tracer config option to select tracer

[PATCH] perf ftrace: Add ftrace.tracer config option

2017-01-26 Thread Taeung Song
2] 10089.284233: generic_pipe_buf_confirm <-pipe_read Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-ftrace.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c inde

Re: [PATCH 2/3] perf ftrace: Add ftrace.tracer config option

2017-01-26 Thread Taeung Song
On 01/27/2017 03:58 AM, Arnaldo Carvalho de Melo wrote: Em Thu, Jan 26, 2017 at 06:35:38PM +0900, Taeung Song escreveu: Currently perf ftrace command will select 'function_graph' or 'function'. So add ftrace.tracer config option to select tracer # cat ~/.pe

[PATCH 1/2] perf tools: Use zfree() instead of free() in parse-events.c

2017-01-29 Thread Taeung Song
Currently there are several parts not checking NULL after allocating with zalloc() or asigning NULL value to a pointer variable after doing free(). So I fill in code checking NULL and use zfree() instead of free(). Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util

[PATCH 2/2] perf evsel: Check for NULL before perf_evsel__is_bpf_output()

2017-01-29 Thread Taeung Song
If 'evsel' is NULL, in perf_evsel__is_bpf_output() NULL pointer error can happen so check it. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/evsel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/evsel.c b/

[PATCH] perf tools: Create for_each_event{_system, _file} macros for tracepoints iteration

2017-01-30 Thread Taeung Song
sa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/trace-event-info.c | 45 -- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c index ceb0e27..27beaff 100644 -

Re: [PATCH] perf tools: Create for_each_event{_system, _file} macros for tracepoints iteration

2017-01-30 Thread Taeung Song
On 01/30/2017 06:08 PM, Jiri Olsa wrote: On Mon, Jan 30, 2017 at 05:35:28PM +0900, Taeung Song wrote: SNIP +#define for_each_event_system(dir, dent, tps) \ + while ((dent = readdir(dir))) \ + if (dent->d_type == DT_

Re: [PATCH 2/2] perf evsel: Check for NULL before perf_evsel__is_bpf_output()

2017-01-30 Thread Taeung Song
Hi, jirka :) Thank you! Taeung On 01/30/2017 05:55 PM, Jiri Olsa wrote: On Mon, Jan 30, 2017 at 02:23:39PM +0900, Taeung Song wrote: If 'evsel' is NULL, in perf_evsel__is_bpf_output() NULL pointer error can happen so check it. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: T

Re: [PATCH 1/2] perf tools: Use zfree() instead of free() in parse-events.c

2017-01-30 Thread Taeung Song
On 01/30/2017 06:01 PM, Jiri Olsa wrote: On Mon, Jan 30, 2017 at 02:23:38PM +0900, Taeung Song wrote: Currently there are several parts not checking NULL after allocating with zalloc() or asigning NULL value to a pointer variable after doing free(). So I fill in code checking NULL and use

[PATCH v10 2/3] perf config: Reimplement perf_config() introducing new perf_config_init() and perf_config_finish()

2016-06-23 Thread Taeung Song
perf_config() # eliminate allocated config set perf_config_finish() # destroy existing config set and initialize a new config set. perf_config_refresh() Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexander Shi

[PATCH v10 0/3] perf config: Reimplement perf_config()

2016-06-23 Thread Taeung Song
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 (3): perf config: Bring declarations about config from util/cache.h to util/config.h perf config: Reimplement p

[PATCH v10 3/3] perf config: Reimplement show_config() using config_set__for_each

2016-06-23 Thread Taeung Song
Lately config_set__for_each is added. In order to let show_config() be short and clear, remake this function using config_set__for_each macro Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c

[PATCH v10 1/3] perf config: Bring declarations about config from util/cache.h to util/config.h

2016-06-23 Thread Taeung Song
included previous cache.h need only config.h, remove including cache.h. Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-help.c | 2 +- tools/perf/builtin-kmem.c | 2 +- tools/perf

Re: [PATCH v10 2/3] perf config: Reimplement perf_config() introducing new perf_config_init() and perf_config_finish()

2016-06-23 Thread Taeung Song
Hi, Arnaldo :) On 06/23/2016 08:56 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 23, 2016 at 05:55:18PM +0900, Taeung Song escreveu: Many sub-commands use perf_config() but everytime perf_config() is called, perf_config() always read config files. (i.e. user config '~/.perfconfig'

Re: [PATCH v10 1/3] perf config: Bring declarations about config from util/cache.h to util/config.h

2016-06-23 Thread Taeung Song
Thank you !! :-D On 06/23/2016 08:57 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 23, 2016 at 05:55:17PM +0900, Taeung Song escreveu: Lately util/config.h has been added but util/cache.h has declarations of functions and a global variable for config features. To manage codes about

[PATCH v11 0/3] perf config: Reimplement perf_config()

2016-06-23 Thread Taeung Song
using global variable 'config_set' - reset config set when only 'config' sub-commaned work because of options for config file location Taeung Song (3): perf config: Bring declarations about config from util/cache.h to util/config.h perf config: Reimplement perf_con

[PATCH v11 1/3] perf config: Bring declarations about config from util/cache.h to util/config.h

2016-06-23 Thread Taeung Song
included previous cache.h need only config.h, remove including cache.h. Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-help.c | 2 +- tools/perf/builtin-kmem.c | 2 +- tools/perf

[PATCH v11 3/3] perf config: Reimplement show_config() using config_set__for_each

2016-06-23 Thread Taeung Song
Lately config_set__for_each is added. In order to let show_config() be short and clear, remake this function using config_set__for_each macro Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c

[PATCH v11 2/3] perf config: Reimplement perf_config() introducing new perf_config__init() and perf_config__finish()

2016-06-23 Thread Taeung Song
g set perf_config() # eliminate allocated config set perf_config__finish() # destroy existing config set and initialize a new config set. perf_config__refresh() Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexande

[PATCH v12 0/3] perf config: Reimplement perf_config()

2016-06-23 Thread Taeung Song
plement 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 (3): perf config: Bring declarations about config fro

[PATCH v12fg 3/3] perf config: Reimplement show_config() using config_set__for_each

2016-06-23 Thread Taeung Song
Lately config_set__for_each is added. In order to let show_config() be short and clear, remake this function using config_set__for_each macro Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c

[PATCH v12 1/3] perf config: Bring declarations about config from util/cache.h to util/config.h

2016-06-23 Thread Taeung Song
included previous cache.h need only config.h, remove including cache.h. Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-help.c | 2 +- tools/perf/builtin-kmem.c | 2 +- tools/perf

[PATCH v12 2/3] perf config: Reimplement perf_config() introducing new perf_config__init() and perf_config__finish()

2016-06-23 Thread Taeung Song
g set perf_config() # eliminate allocated config set perf_config__finish() # destroy existing config set and initialize a new config set. perf_config__refresh() Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexande

Re: [PATCH v11 2/3] perf config: Reimplement perf_config() introducing new perf_config__init() and perf_config__finish()

2016-06-23 Thread Taeung Song
On 06/23/2016 10:38 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 23, 2016 at 10:03:39PM +0900, Taeung Song escreveu: +/** + * perf_config_sections__for_each - iterate thru all the sections + * @list: list_head instance to iterate + * @section: struct perf_config_section iterator

Re: [PATCH v11 2/3] perf config: Reimplement perf_config() introducing new perf_config__init() and perf_config__finish()

2016-06-23 Thread Taeung Song
On 06/23/2016 11:30 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 23, 2016 at 11:15:49PM +0900, Taeung Song escreveu: On 06/23/2016 10:38 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 23, 2016 at 10:03:39PM +0900, Taeung Song escreveu: +/** + * perf_config_sections__for_each - iterate

[BUGFIX][PATCH v8 1/5] perf config: Handle the error about NULL at perf_config_set__delete()

2016-06-08 Thread Taeung Song
an Signed-off-by: Taeung Song --- tools/perf/util/config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c index 8749eca..31e09a4 100644 --- a/tools/perf/util/config.c +++ b/tools/perf/util/config.c @@ -742,6 +742,9 @@ s

[PATCH v8 3/5] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-06-08 Thread Taeung Song
Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 4 +++ tools/perf/perf.c | 1 + tools/perf/util/config.c| 87 ++---

[PATCH v8 2/5] perf config: Bring declarations about config from util/cache.h to util/config.h

2016-06-08 Thread Taeung Song
Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/util/cache.h | 13 + tools/perf/util/config.h | 12 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 0d814bb..cd8cd4d

[PATCH v8 5/5] perf config: Reimplement show_config() using perf_config_set__iter()

2016-06-08 Thread Taeung Song
: Alexander Shishkin Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 29 +++-- tools/perf/util/config.c| 2 +- tools/perf/util/config.h| 1 + 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/tools/perf/builtin-config.c b

[PATCH v8 4/5] perf config: Use zfree() instead of free() at perf_config_set__delete()

2016-06-08 Thread Taeung Song
#x27;struct perf_config_set *'. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- tools/perf/perf.c | 2 +- tools/perf/util/config.c| 10 +- tools/perf/util

[RFC][PATCH v8 0/5] perf config: Reimplement perf_config() using perf_config_set__inter()

2016-06-08 Thread Taeung Song
_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: Handle the error about NULL at perf_config_set__delete() perf

Re: [PATCH v7 3/7] perf config: Add global variable 'config_set'

2016-06-08 Thread Taeung Song
, IMHO we need to use 'config_set' as a global variable. Anyway I sent v8 recasting this patchset with other way. (But 'config_set' is still a global variable.) Please, reconsider it again. Thanks, Taeung On 06/08/2016 12:14 AM, Taeung Song wrote: Good afternoon :) On 06/07/20

Re: [PATCH v8 2/5] perf config: Bring declarations about config from util/cache.h to util/config.h

2016-06-09 Thread Taeung Song
Hi, Arnaldo :) Thank you for your review. On 06/09/2016 10:29 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 08, 2016 at 09:36:50PM +0900, Taeung Song escreveu: Lately util/config.h has been added but util/cache.h has declarations of functions and extern variable for config features. To

Re: [PATCH v8 3/5] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-06-10 Thread Taeung Song
On 06/09/2016 10:34 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 08, 2016 at 09:36:51PM +0900, Taeung Song escreveu: Many sub-commands use perf_config() so everytime perf_config() is called, perf_config() always read config files. (i.e. user config '~/.perfconfig' and sys

Re: [PATCH v8 4/5] perf config: Use zfree() instead of free() at perf_config_set__delete()

2016-06-10 Thread Taeung Song
On 06/09/2016 10:37 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 08, 2016 at 09:36:52PM +0900, Taeung Song escreveu: perf_config_set__delete() delete allocated the config set but the global variable 'config_set' is used all around. So purge and zfree by an address of the globa

Re: [PATCH v8 3/5] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-06-10 Thread Taeung Song
On 06/09/2016 10:41 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 08, 2016 at 09:36:51PM +0900, Taeung Song escreveu: Many sub-commands use perf_config() so everytime perf_config() is called, perf_config() always read config files. (i.e. user config '~/.perfconfig' and sys

[PATCH v5 1/7] perf config: Introduce default_config_section and default_config_item for default config key-value pairs

2016-07-05 Thread Taeung Song
values at one spot (i.e. util/config.c) with default config arrays and it could be easy and simple to modify default config values or add new configs. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Ta

[RFC PATCH v5 0/7] perf config: Introduce default config key-value pairs arrays

2016-07-05 Thread Taeung Song
nit() that call all default_*_config_init() for each config section v2: - rename 'ui_browser__config_gcolors' to 'ui_browser__config_colors' (Arnaldo) - change 'ground colors' to '{back, fore}ground colors' (Arnaldo) - use strtok + ltrim instead of strchr and while (isspace

[PATCH v5 3/7] perf config: Add 'colors' section default configs arrrays

2016-07-05 Thread Taeung Song
ll be used on ui/browser.c because of setting default actual variable for 'colors' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c | 15 +++ tools/perf/util/config.h | 16 +

[PATCH v5 4/7] perf config: Use combined {fore,back}ground colors value instead of each two color

2016-07-05 Thread Taeung Song
by 'colors_config_items' array that have default values at util/config.c because both actual variable and config item of 'colors_config_items' are equal in the number of values (as just one). Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishk

[PATCH v5 6/7] perf config: Add 'annotate' section default configs arrrays

2016-07-05 Thread Taeung Song
e.c because of setting default actual variable for 'annotate' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c | 11 +++ tools/perf/util/config.h | 11 +++ 2 files

[PATCH v5 7/7] perf config: Initialize annotate_browser__opts with default config items

2016-07-05 Thread Taeung Song
Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 16 tools/perf/util/config.h | 6 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tools/perf

[PATCH v5 5/7] perf config: Initialize ui_browser__colorsets with default config items

2016-07-05 Thread Taeung Song
iri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 53 + 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c i

[PATCH v5 2/7] perf config: Add macros assigning key-value pairs to default_config_item

2016-07-05 Thread Taeung Song
: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.h | 20 1 file changed, 20 insertions(+) diff --git a/tools/perf/util/config.h b/tools/perf/util/config.h index 1fd8e4c..613900f 100644 --- a/tools/perf/util/config.h +++ b/tools

[PATCH v4 2/7] perf config: Add macros assigning key-value pairs to default_config_item

2016-07-03 Thread Taeung Song
: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.h | 20 1 file changed, 20 insertions(+) diff --git a/tools/perf/util/config.h b/tools/perf/util/config.h index 1fd8e4c..613900f 100644 --- a/tools/perf/util/config.h +++ b/tools

[RFC PATCH v4 0/7] perf config: Introduce default config key-value pairs arrays

2016-07-03 Thread Taeung Song
config section v2: - rename 'ui_browser__config_gcolors' to 'ui_browser__config_colors' (Arnaldo) - change 'ground colors' to '{back, fore}ground colors' (Arnaldo) - use strtok + ltrim instead of strchr and while (isspace(*++bg)); (Arnaldo) Taeung Song (7):

[PATCH v4 5/7] perf config: Initialize ui_browser__colorsets with default config items

2016-07-03 Thread Taeung Song
iri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 53 + 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c i

[PATCH v4 7/7] perf config: Initialize annotate_browser__opts with default config items

2016-07-03 Thread Taeung Song
Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 16 tools/perf/util/config.h | 6 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tools/perf

[PATCH v4 4/7] perf config: Use combined {fore,back}ground colors value instead of each two color

2016-07-03 Thread Taeung Song
by 'colors_config_items' array that have default values at util/config.c because both actual variable and config item of 'colors_config_items' are equal in the number of values (as just one). Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishk

[PATCH v4 6/7] perf config: Add 'annotate' section default configs arrrays

2016-07-03 Thread Taeung Song
e.c because of setting default actual variable for 'annotate' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c | 11 +++ tools/perf/util/config.h | 11 +++ 2 files

[PATCH v4 3/7] perf config: Add 'colors' section default configs arrrays

2016-07-03 Thread Taeung Song
ll be used on ui/browser.c because of setting default actual variable for 'colors' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c | 15 +++ tools/perf/util/config.h | 16 +

[PATCH v4 1/7] perf config: Introduce default_config_section and default_config_item for default config key-value pairs

2016-07-03 Thread Taeung Song
values at one spot (i.e. util/config.c) with default config arrays and it could be easy and simple to modify default config values or add new configs. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Ta

[PATCH v3 2/7] perf config: Add global variable 'config_set'

2016-05-30 Thread Taeung Song
handled in perf_config() and other functions at util/config.c Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 9 - tools/perf/util/config.c| 1 + tools/perf/util/config.h| 2 ++ 3 files changed

[PATCH v3 1/7] perf config: Use new perf_config_set__init() to initialize config set

2016-05-30 Thread Taeung Song
config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c | 50 +++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/config.c b/tools/perf

[RFC][PATCH v3 0/7] perf config: Reimplement perf_config() using perf_config_set__inter()

2016-05-30 Thread Taeung Song
al variable 'config_set' - reset config set when only 'config' sub-commaned work because of options for config file location Taeung Song (7): perf config: Use new perf_config_set__init() to initialize config set perf config: Add global variable 'config_set&#

[PATCH v3 7/7] perf config: Reset the config set at only 'config' sub-command

2016-05-30 Thread Taeung Song
--list annotate.hide_src_code=false tui.report=on After: # perf config --user --list annotate.hide_src_code=false tui.report=on # perf config --system --list annotate.hide_src_code=true Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-

[PATCH v3 6/7] perf config: Remove needless code about config set at cmd_config()

2016-05-30 Thread Taeung Song
eded to declare 'config_set' as extern variable because the variable is only handled at util/config.c from now on. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 8 tools/perf/util/config.h

[PATCH v3 3/7] perf config: Modify perf_config_set__delete() using global variable 'config_set'

2016-05-30 Thread Taeung Song
This function deleted allocated config set but the global variable 'config_set' is used all around so this directly remove 'config_set' instead of using local variable 'set'. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by

[PATCH v3 5/7] perf config: Reimplement show_config() using perf_config()

2016-05-30 Thread Taeung Song
: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 255015e..cf6c396 100644 --- a/tools/perf/builtin

[PATCH v3 4/7] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-05-30 Thread Taeung Song
Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/perf.c| 1 + tools/perf/util/cache.h | 1 + tools/perf/util/config.c | 97 3 files changed, 51 insertions(+

Re: [PATCH v3 3/7] perf config: Modify perf_config_set__delete() using global variable 'config_set'

2016-05-30 Thread Taeung Song
Hi, Arnaldo :-D On 05/31/2016 04:29 AM, Arnaldo Carvalho de Melo wrote: Em Tue, May 31, 2016 at 01:44:07AM +0900, Taeung Song escreveu: This function deleted allocated config set but the global variable 'config_set' is used all around so this directly remove 'config_set' in

Re: [PATCH v3 6/7] perf config: Remove needless code about config set at cmd_config()

2016-05-30 Thread Taeung Song
On 05/31/2016 04:35 AM, Arnaldo Carvalho de Melo wrote: Em Tue, May 31, 2016 at 01:44:10AM +0900, Taeung Song escreveu: show_config() was reimplemented using perf_config() so it isn't needed to use perf_config_set__new() at cmd_config(). And perf_config_set__delete() isn't

Re: [PATCH v3 4/7] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-05-30 Thread Taeung Song
On 05/31/2016 04:32 AM, Arnaldo Carvalho de Melo wrote: Em Tue, May 31, 2016 at 01:44:08AM +0900, Taeung Song escreveu: +static int perf_config_set__iter(struct perf_config_set *set, config_fn_t fn, void *data) +{ + struct perf_config_section *section; + struct perf_config_item

[RFC][PATCH v4 0/6] perf config: Reimplement perf_config() using perf_config_set__inter()

2016-05-30 Thread Taeung Song
a global variable 'config_set' 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 optio

[PATCH v4 2/6] perf config: Add global variable 'config_set'

2016-05-30 Thread Taeung Song
handled in perf_config() and other functions at util/config.c Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 9 - tools/perf/util/config.c| 1 + tools/perf/util/config.h| 2 ++ 3 files changed

[PATCH v4 4/6] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-05-30 Thread Taeung Song
Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/perf.c| 1 + tools/perf/util/cache.h | 1 + tools/perf/util/config.c | 86 +--- 3 files changed, 40 insertions(+

<    1   2   3   4   5   6   7   8   9   >