[PATCH v2 3/9] perf annotate: Fix wrong --show-total-period option showing number of samples

2017-07-13 Thread Taeung Song
section .text: : : 00400816 : : knapsack(): 743737 :400816: push %rbp Reported-by: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/builtin-annotate.c | 4 +-- tools/perf/builtin-report.c | 13 ++---

[PATCH v2 1/9] perf annotate: Introduce struct sym_hist_entry

2017-07-13 Thread Taeung Song
struct sym_hist has addr[] but it should have not only number of samples but also the sample period. So use new struct symhist_entry for that. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 6 +++--- tools/perf/ui/gtk/annotate.c | 4

[PATCH v2 0/9] perf annotate: Fix --show-total-period and support --show-nr-samples

2017-07-13 Thread Taeung Song
ine_samples (Arnaldo) - Fix a case that can't switch 'the total period view' to 'the number of samples view' on the annotate TUI browser (Arnaldo) - Calculate the percentage with 'period', not number of samples Taeung Song (9): perf annotate: Introduce struct

Re: [PATCH 3/4] perf annotate: Support --show-nr-samples option

2017-07-13 Thread Taeung Song
On 07/13/2017 05:13 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Jul 12, 2017 at 07:14:14AM +0900, Taeung Song escreveu: Add --show-nr-samples option to perf-annotate so that it corresponds with perf-report. Additionally h->sum is properly renamed h->nr_samples. Please first do a

Re: [PATCH 4/4] perf annotate browser: Support the toggle number of samples

2017-07-13 Thread Taeung Song
On 07/13/2017 05:16 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Jul 12, 2017 at 07:14:19AM +0900, Taeung Song escreveu: Cc: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Signed-off-by: Taeung Song Humm, this is cycling thru different things to show on a column, I think 'toggle'

Re: [PATCH 3/4] perf annotate: Support --show-nr-samples option

2017-07-13 Thread Taeung Song
head_us, period_us) 366 HPP_PERCENT_FNS(overhead_guest_sys, period_guest_sys) 367 HPP_PERCENT_FNS(overhead_guest_us, period_guest_us) 368 HPP_PERCENT_ACC_FNS(overhead_acc, period) Thanks, Taeung On 07/13/2017 05:13 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Jul 12, 2017 at 07:14:14AM +0900, Tae

Re: [PATCH 2/4] perf anntoate browser: Fix the toggle total period view to show period, not number of samples

2017-07-13 Thread Taeung Song
On 07/13/2017 05:10 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Jul 12, 2017 at 07:14:10AM +0900, Taeung Song escreveu: Currently the toggle total period view on the annotate TUI shows the number of samples, not period like below. $ perf annotate --show-total-period Percent

Re: [PATCH 1/4] perf annotate: Fix wrong --show-total-period option showing number of samples

2017-07-13 Thread Taeung Song
Hi Arnaldo :) On 07/13/2017 05:09 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Jul 12, 2017 at 07:14:04AM +0900, Taeung Song escreveu: Currently the --show-total-period option of perf-annotate is different from perf-report's. For example, perf-report ordinarily shows period and numb

[PATCH 1/4] perf annotate: Fix wrong --show-total-period option showing number of samples

2017-07-11 Thread Taeung Song
(84813704 event count) -- : : : : Disassembly of section .text: : : 00400816 : : knapsack(): 743737 :400816: push %rbp Cc: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Signed-off-by: Taeung Song

[PATCH 3/4] perf annotate: Support --show-nr-samples option

2017-07-11 Thread Taeung Song
Add --show-nr-samples option to perf-annotate so that it corresponds with perf-report. Additionally h->sum is properly renamed h->nr_samples. Cc: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/builtin-annotate.c | 2 ++ tools/perf/ui/gtk/anno

[PATCH 0/4] perf annotate: Fix --show-total-period and support --show-nr-samples

2017-07-11 Thread Taeung Song
otate stdio and TUI browser. And support --show-nr-samples into perf-anntate so that it correpond with perf-report's. The code is available on 'perf/ann-fix-period' branch at git://github.com/taeung/linux-perf.git Thanks, Taeung Taeung Song (4): perf annotate: Fix wrong --sh

[PATCH 2/4] perf anntoate browser: Fix the toggle total period view to show period, not number of samples

2017-07-11 Thread Taeung Song
ow. Event count│ │ │ │Disassembly of section .text: │ │00109a90 <_mcount@@GLIBC_2.2.5>: │ sub$0x38,%rsp 2204022 │ mov%rax,(%rsp) 2207405 │ mov%rcx,0x8(%rsp) Cc: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa

[PATCH 4/4] perf annotate browser: Support the toggle number of samples

2017-07-11 Thread Taeung Song
Cc: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 0ddc3b2..237903d

Re: [QUESTION] perf annotate: how do we fix the 'total period' feature ?

2017-07-04 Thread Taeung Song
Hi Namhyung :) On 07/05/2017 03:07 PM, Namhyung Kim wrote: Hi Taeung, On Wed, Jul 5, 2017 at 2:47 PM, Taeung Song wrote: Hi, Two problems of perf-annotate were mentioned in recent PATCH reviews by Milian and Namhyung. Currently perf-annotate has a '--show-total-period' option and

[QUESTION] perf annotate: how do we fix the 'total period' feature ?

2017-07-04 Thread Taeung Song
Hi, Two problems of perf-annotate were mentioned in recent PATCH reviews by Milian and Namhyung. Currently perf-annotate has a '--show-total-period' option and a 't' key "Toggle total period view" on TUI browser. However, they actually show the number of samples, not period(Raw number of event

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-30 Thread Taeung Song
I'm late.. On 06/28/2017 06:53 PM, Milian Wolff wrote: On Wednesday, June 28, 2017 5:18:08 AM CEST Taeung Song wrote: Hi, The --source-only option and new source code TUI view can show the result of performance analysis based on full source code per symbol(function). (Namhyung Kim to

Re: [PATCH/RFC 1/4] perf annotate: Add --source-only option

2017-06-30 Thread Taeung Song
Thank you for detailed review. On 06/30/2017 12:18 AM, Namhyung Kim wrote: Resend with a proper mail address.. On Fri, Jun 30, 2017 at 12:14 AM, Namhyung Kim wrote: Hi Taeung, Thanks for doing this work! On Wed, Jun 28, 2017 at 12:14 PM, Taeung Song wrote: The option can show the result

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-30 Thread Taeung Song
Hi, On 06/29/2017 04:11 PM, Namhyung Kim wrote: Hello, On Wed, Jun 28, 2017 at 11:53:22AM +0200, Milian Wolff wrote: On Wednesday, June 28, 2017 5:18:08 AM CEST Taeung Song wrote: Hi, The --source-only option and new source code TUI view can show the result of performance analysis based on

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-28 Thread Taeung Song
On 06/28/2017 06:53 PM, Milian Wolff wrote: On Wednesday, June 28, 2017 5:18:08 AM CEST Taeung Song wrote: Hi, The --source-only option and new source code TUI view can show the result of performance analysis based on full source code per symbol(function). (Namhyung Kim told me this idea and

Re: [PATCH/RFC 2/4] perf annotate: Add new source code view to the annotate TUI browser

2017-06-28 Thread Taeung Song
Hi, Milian :) Thank you for your comment. On 06/28/2017 06:44 PM, Milian Wolff wrote: On Wednesday, June 28, 2017 5:14:12 AM CEST Taeung Song wrote: Unlike asm code level, the new source code view provides a additional viewpoint based on source code level for performance analysis. Of course

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-27 Thread Taeung Song
Additionally, the code is available on 'annotate/src-only' branch at git://github.com/taeung/linux-perf.git Thanks, Taeung On 06/28/2017 12:18 PM, Taeung Song wrote: Hi, The --source-only option and new source code TUI view can show the result of performance analysis based on f

[PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-27 Thread Taeung Song
t to listen to your opinions about this new feature, if you don't mind. If you give some feedback, I'd appreciate it! :) Thanks, Taeung Taeung Song (4): perf annotate: Add --source-only option perf annotate: Add new source code view to the annotate TUI browser perf annotate: Fold

[PATCH/RFC 1/4] perf annotate: Add --source-only option

2017-06-27 Thread Taeung Song
2 return p - ptr; 0.00 : 373 } Suggested-by: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Adrian Hunter Cc: Wang Nan Cc: Jin Yao Cc: Andi Kleen Cc: Kim Phillips Cc: David Ahern Signed-off-by: Taeung Song --- tools/perf/builtin-annotate.c |

[PATCH/RFC 2/4] perf annotate: Add new source code view to the annotate TUI browser

2017-06-27 Thread Taeung Song
er Cc: Wang Nan Cc: Jin Yao Cc: Andi Kleen Cc: Kim Phillips Cc: David Ahern Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 153 +- tools/perf/util/annotate.c| 6 +- tools/perf/util/annotate.h| 7 ++ 3 files changed,

[PATCH/RFC 4/4] perf annotate: Support a 'o' key showing addresses on the new source code view

2017-06-27 Thread Taeung Song
Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 200ee0c..bb5a933 100644 --- a/tools

[PATCH/RFC 3/4] perf annotate: Fold or unfold partial disassembly lines on source code view

2017-06-27 Thread Taeung Song
Suggested-by: Namhyung Kim Cc: Milian Wolff Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Adrian Hunter Cc: Wang Nan Cc: Jin Yao Cc: Andi Kleen Cc: Kim Phillips Cc: David Ahern Signed-off-by: Taeung Song --- tools/perf/ui/browser.h | 1 + tools/perf/ui/browsers/annotate.c | 146

[tip:perf/core] perf config: Invert an if statement to reduce nesting in cmd_config()

2017-06-20 Thread tip-bot for Taeung Song
Commit-ID: 8c1cedb4466809f9d741a4088314783cb88680a9 Gitweb: http://git.kernel.org/tip/8c1cedb4466809f9d741a4088314783cb88680a9 Author: Taeung Song AuthorDate: Mon, 8 May 2017 20:07:30 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 15:14:58 -0300 perf config

[tip:perf/core] perf config: Check error cases of {show_spec, set}_config()

2017-06-20 Thread tip-bot for Taeung Song
Commit-ID: 4f1fd74283582f3f5c34d1c9ed55117d775b4a20 Gitweb: http://git.kernel.org/tip/4f1fd74283582f3f5c34d1c9ed55117d775b4a20 Author: Taeung Song AuthorDate: Sat, 17 Jun 2017 12:46:37 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 22:05:54 -0300 perf config

[tip:perf/core] perf config: Refactor the code using 'ret' variable in cmd_config()

2017-06-20 Thread tip-bot for Taeung Song
Commit-ID: dfe1c6d7efa8ead6878b73216d4c891a28207528 Gitweb: http://git.kernel.org/tip/dfe1c6d7efa8ead6878b73216d4c891a28207528 Author: Taeung Song AuthorDate: Sat, 17 Jun 2017 12:46:42 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 22:05:55 -0300 perf config

[PATCH v4 0/5] perf config: Bugfixes & Refactoring

2017-06-16 Thread Taeung Song
#x27; with -1 instead of 0 for more compact code in cmd_config() - Add a error message when perf_config_set__new() failed in cmd_config() v2: - there is no need to consider empty config file (Arnaldo) Taeung Song (5): perf config: Check error cases of {show_spec, set}_config() perf config: Ref

[PATCH v4 4/5] perf config: Check not only section->from_system_config but also item's

2017-06-16 Thread Taeung Song
Currently only section->from_system_config is being checked multiple times. items->from_system_config should be also checked, so fix it. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v4 3/5] perf config: Finally write changed configs on config file at a time

2017-06-16 Thread Taeung Song
Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a waste, so finally write changed configs at a time. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/bu

[PATCH v4 2/5] perf config: Refactor the code using 'ret' variable in cmd_config()

2017-06-16 Thread Taeung Song
To simplify the code related to 'ret' variable in cmd_config(), initialize 'ret' with -1 instead of 0. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 30 +- 1 file changed, 13 insertions(+), 17 deleti

[PATCH v4 1/5] perf config: Check error cases of {show_spec, set}_config()

2017-06-16 Thread Taeung Song
show_spec_config() and set_config() can be called multiple times in the loop in cmd_config(). However, The error cases of them wasn't checked, so fix it. Reported-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c

[PATCH v4 5/5] perf config: Autogenerate a config file if it does not exist on setting feature.

2017-06-16 Thread Taeung Song
. (i.e. by perf_config_set__delete() at the end of cmd_config()) Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/config.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c index 8d724f0..1cc5d80

[PATCH v3 6/7] perf config: Check whether items are from system config in set_config()

2017-05-09 Thread Taeung Song
ng Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index f62cc2d..34ebe83 100644 --- a/tools/perf/builtin-config.c +++ b/tools/perf/builtin-config.c @@ -56,7

[PATCH v3 7/7] perf config: Support autogeneration of config file when setting configs

2017-05-09 Thread Taeung Song
auto-generated. [report] children = false NOTE: The config set will be freed at the tail end. (i.e. by perf_config_set__delete() at the end of cmd_config()) Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/config.c | 5 + 1 file changed, 1 insertio

[PATCH v3 5/7] perf config: Finally write changed configs on config file at a time

2017-05-09 Thread Taeung Song
Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a waste, so finally write changed configs at a time. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/bu

[PATCH v3 4/7] perf config: Add a error message when perf_config_set__new() failed in cmd_config()

2017-05-09 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 6a4d8cd..e9fe673 100644 --- a/tools/perf/builtin-config.c +++ b/tools

[PATCH v3 1/7] perf config: Handle errors from {show_spec, set}_config() in the loop

2017-05-09 Thread Taeung Song
show_spec_config() and set_config() in the loop in cmd_config() and if the return value means a error, handle it. Cc: Jiri Olsa Cc: Namhyung Kim Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 17 +++-- 1 file changed, 15 insertions(+), 2

[PATCH v3 0/7] perf config: Bugfixes & Refactoring

2017-05-09 Thread Taeung Song
fig_set__new() failed in cmd_config() v2: - there is no need to consider empty config file (Arnaldo) Taeung Song (7): perf config: Handle errors from {show_spec, set}_config() in the loop perf config: Refactor the code using 'ret' variable in cmd_config() perf config: Return -1 if sho

[PATCH v3 3/7] perf config: Return -1 if show_spec_config() cannot show the config

2017-05-09 Thread Taeung Song
If the config isn't found in the config set, show_spec_config() cannot show the config. But it return 0 on the situation though, so fix it. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v3 2/7] perf config: Refactor the code using 'ret' variable in cmd_config()

2017-05-09 Thread Taeung Song
To simplify the code related to 'ret' variable in cmd_config(), initialize 'ret' with -1 instead of 0 and use goto statement 'out_err'. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 30 +-

Re: [PATCH v2 4/4] perf config: Automatically create config file if not exists when setting config

2017-05-08 Thread Taeung Song
On 05/09/2017 01:41 AM, Arnaldo Carvalho de Melo wrote: Em Mon, May 08, 2017 at 08:07:49PM +0900, Taeung Song escreveu: When setting config key-value pairs, if user or system config files are nonexistent, currently perf-config's setting didn't work right. "currently doesn&#

Re: [PATCH v2 2/4] perf config: Finally write changed configs on config file at a time

2017-05-08 Thread Taeung Song
On 05/09/2017 01:37 AM, Arnaldo Carvalho de Melo wrote: Em Mon, May 08, 2017 at 08:07:40PM +0900, Taeung Song escreveu: Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a wast

Re: [PATCH v2 3/4] perf config: Correctly check whether it is from system config

2017-05-08 Thread Taeung Song
Hi Arnaldo, On 05/09/2017 01:39 AM, Arnaldo Carvalho de Melo wrote: Em Mon, May 08, 2017 at 08:07:45PM +0900, Taeung Song escreveu: Currently section's from_system_config was checked twice. you mean: "The item->from_system_config is not being checked when iterating over s

[PATCH v2 2/4] perf config: Finally write changed configs on config file at a time

2017-05-08 Thread Taeung Song
Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a waste, so finally write changed configs at a time. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/bu

[PATCH v2 4/4] perf config: Automatically create config file if not exists when setting config

2017-05-08 Thread Taeung Song
t__init() failed, it'll be freed at the tail end (i.e. by perf_config_set__delete() at the end of cmd_config()). Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/config.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/util/conf

[PATCH v2 1/4] perf config: Invert a if statement to reduce nesting in cmd_config()

2017-05-08 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 80668fa..7545966 100644

[PATCH v2 3/4] perf config: Correctly check whether it is from system config

2017-05-08 Thread Taeung Song
Currently section's from_system_config was checked twice. So adjust it in order to correctly check not only section's but also item's from_system_config. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- 1 file changed, 1

[PATCH v2 0/4] perf config: Bugfixes & Refactoring

2017-05-08 Thread Taeung Song
eed to consider empty config file (Arnaldo) Taeung Song (4): perf config: Invert a if statement to reduce nesting in cmd_config() perf config: Finally write changed configs on config file at a time perf config: Correctly check whether it is from system config perf config: Automatically create

Re: [PATCH] perf probe: Fix examples section of documentation

2017-05-08 Thread Taeung Song
Hi SeongJae, Nice to see you :) On 05/07/2017 07:36 PM, SeongJae Park wrote: An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for the case. This commit fixes the example to give appropriate example command. Signed-off-by:

[tip:perf/urgent] perf config: Refactor a duplicated code for obtaining config file name

2017-05-03 Thread tip-bot for Taeung Song
Commit-ID: 4341ec6b3db4c3e903d6c44958722918baec1e59 Gitweb: http://git.kernel.org/tip/4341ec6b3db4c3e903d6c44958722918baec1e59 Author: Taeung Song AuthorDate: Wed, 26 Apr 2017 21:21:02 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 2 May 2017 18:23:12 -0300 perf config

Re: [PATCH 2/7] perf config: Check list empty before showing configs

2017-05-02 Thread Taeung Song
Hi Arnaldo, On 05/03/2017 12:12 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 26, 2017 at 09:21:03PM +0900, Taeung Song escreveu: If existent config files contains nothing, the sections list in config_set can be empty. So check not only NULL pointer of config_set but also the list in

Re: [PATCH] plugin python: Adjust the handling after PyRun_String() failed

2017-04-27 Thread Taeung Song
On 04/27/2017 08:30 PM, Steven Rostedt wrote: On Thu, 27 Apr 2017 11:52:14 +0900 Taeung Song wrote: On 04/27/2017 11:47 AM, Steven Rostedt wrote: On Thu, 27 Apr 2017 08:46:21 +0900 Taeung Song wrote: Even though PyRun_String() failed, just 0 will be returned but we need to return -1

[PATCH v2] plugin python: Adjust the handling after PyRun_String() failed

2017-04-26 Thread Taeung Song
Even though PyRun_String() failed, just 0 will be returned but we need to return -1 that means error status, so fix it. Signed-off-by: Taeung Song --- plugin_python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_python.c b/plugin_python.c index 2997679..c283ed7

Re: [PATCH] plugin python: Adjust the handling after PyRun_String() failed

2017-04-26 Thread Taeung Song
On 04/27/2017 11:47 AM, Steven Rostedt wrote: On Thu, 27 Apr 2017 08:46:21 +0900 Taeung Song wrote: Even though PyRun_String() failed, just 0 will be returned but we need to return -1 that means error status, so fix it. Signed-off-by: Taeung Song --- plugin_python.c | 5 +++-- 1 file

[PATCH] plugin python: Adjust the handling after PyRun_String() failed

2017-04-26 Thread Taeung Song
Even though PyRun_String() failed, just 0 will be returned but we need to return -1 that means error status, so fix it. Signed-off-by: Taeung Song --- plugin_python.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin_python.c b/plugin_python.c index 2997679

Re: [PATCH] trace-cmd: Fix a warning about incompatible pointer type of load_plugin()

2017-04-26 Thread Taeung Song
On 04/27/2017 02:54 AM, Steven Rostedt wrote: On Wed, 26 Apr 2017 23:56:02 +0900 Taeung Song wrote: Want to send another patch on top of Federico's? Yes! I want to do it. After you update 'master' branch on your repo I just updated my master branch. I got it ! I&

[PATCH] parse-events: Fix the FALSE case in pevent_filter_clear_trivial()

2017-04-26 Thread Taeung Song
Currently the FILTER_TRIVIAL_FALSE hasn't break statement so if the trivial type is FALSE, it'll be hit always. So add break statement at the FALSE case to correctly remove trivial filters. Reported-by: Namhyung Kim Signed-off-by: Taeung Song --- parse-filter.c | 1 + 1 file

Re: [PATCH] trace-cmd: Fix a warning about incompatible pointer type of load_plugin()

2017-04-26 Thread Taeung Song
Hi Steven :) On 04/26/2017 08:11 AM, Steven Rostedt wrote: On Mon, 24 Apr 2017 22:43:31 +0900 Taeung Song wrote: Currently the return type of load_plugin() in plugin_python.c is void type, but it is different from the argument type of trace_util_load_plugins(). So fix it for the below

[PATCH 1/7] perf config: Refactor a duplicated code for config file name

2017-04-26 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 55f04f8..80668fa 100644 --- a/tools/perf/builtin

[PATCH 7/7] perf config: No free config set when it's initialization failed

2017-04-26 Thread Taeung Song
fig --user report.children=false $ cat ~/.perfconfig # this file is auto-generated. [report] children = false Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/config.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/util/

[PATCH 6/7] perf config: Finally write changed configs on config file at a time

2017-04-26 Thread Taeung Song
Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a waste, so finally write changed configs at a time. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/bu

[PATCH 5/7] perf config: Correctly check whether it is from system config

2017-04-26 Thread Taeung Song
Currently no bugs in the checking code. But adjust it to correctly check item->from_system_config, not section's from_system_config. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 4/7] perf config: Invert if statements to reduce nesting in cmd_config()

2017-04-26 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 50 - 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index ad0a112..f4596ef 100644

[PATCH 1/7] perf config: Refactor a duplicated code for config file name

2017-04-26 Thread Taeung Song
Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 55f04f8..80668fa 100644 --- a/tools/perf/builtin

[PATCH 2/7] perf config: Check list empty before showing configs

2017-04-26 Thread Taeung Song
If existent config files contains nothing, the sections list in config_set can be empty. So check not only NULL pointer of config_set but also the list in config_set. Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 4 ++-- tools/perf/util/config.c

[PATCH 3/7] perf config: Use none_err for all cases that nothing configured

2017-04-26 Thread Taeung Song
that skip the error message. After: $ perf config -l Nothing configured, please check your /home/taeung/.perfconfig $ perf config report.queue-size Nothing configured, please check your /home/taeung/.perfconfig Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/bu

[PATCH 0/7] perf config: Bugfixes & Refactoring

2017-04-26 Thread Taeung Song
Hi all, :) This is simple patchset for perf-config to fix small bugs and refactor code. I'd appreciate some feedback on this patchset. The code is also avaiable at 'config/refactoring' branch on git://github.com/taeung/linux-perf.git Thanks, Taeung Taeung Song (7): perf c

[PATCH] trace-cmd: Fix a warning about incompatible pointer type of load_plugin()

2017-04-24 Thread Taeung Song
*)’ int trace_util_load_plugins(struct pevent *pevent, const char *suffix, ^ Signed-off-by: Taeung Song --- plugin_python.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin_python.c b/plugin_python.c index da07d27..d736f50 100644 --- a/plugin_python.c +++ b/plugi

Re: [PATCH perf/urgent] perf tools: Fix the code to strip command name

2017-04-20 Thread Taeung Song
On 04/20/2017 07:35 PM, Jiri Olsa wrote: On Thu, Apr 20, 2017 at 07:17:34PM +0900, Taeung Song wrote: Hi Jiri, On 04/20/2017 06:24 PM, Jiri Olsa wrote: Recent commit broke command name strip in perf_event__get_comm_ids function. It replaced left to right search for '\n' with rt

Re: [PATCH perf/urgent] perf tools: Fix the code to strip command name

2017-04-20 Thread Taeung Song
("perf tools: Refactor the code to strip command name with {l,r}trim()") Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Cc: Jin Yao Link: http://lkml.kernel.org/n/tip-51mt8hxaig74zlu42s3rv...@git.kernel.org --- tools/perf/util/event.c

[tip:perf/core] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()

2017-04-11 Thread tip-bot for Taeung Song
Commit-ID: 4597cf0664d2fad785509dedfed22f8fe8951ebb Gitweb: http://git.kernel.org/tip/4597cf0664d2fad785509dedfed22f8fe8951ebb Author: Taeung Song AuthorDate: Sat, 8 Apr 2017 09:52:24 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 16:22:22 -0300 perf annotate

[tip:perf/core] perf annotate: Use stripped line instead of raw disassemble line

2017-04-11 Thread tip-bot for Taeung Song
Commit-ID: 986a5bc028a84d487c354a529730b48682d1fb41 Gitweb: http://git.kernel.org/tip/986a5bc028a84d487c354a529730b48682d1fb41 Author: Taeung Song AuthorDate: Sat, 8 Apr 2017 09:52:25 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 16:22:23 -0300 perf annotate

[tip:perf/core] perf tools: Refactor the code to strip command name with {l,r}trim()

2017-04-11 Thread tip-bot for Taeung Song
Commit-ID: bdd97ca63faa374c98314d53c0bcaedb473c5a33 Gitweb: http://git.kernel.org/tip/bdd97ca63faa374c98314d53c0bcaedb473c5a33 Author: Taeung Song AuthorDate: Fri, 7 Apr 2017 23:24:21 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 15:23:26 -0300 perf tools

[tip:perf/core] perf stat: Refactor the code to strip csv output with ltrim()

2017-04-11 Thread tip-bot for Taeung Song
Commit-ID: b07c40df1f4e6f937271921cb116d570bb9c4a31 Gitweb: http://git.kernel.org/tip/b07c40df1f4e6f937271921cb116d570bb9c4a31 Author: Taeung Song AuthorDate: Fri, 7 Apr 2017 23:24:18 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 08:45:10 -0300 perf stat

[tip:perf/core] perf pmu: Refactor wordwrap() with ltrim()

2017-04-11 Thread tip-bot for Taeung Song
Commit-ID: aa4beb10a94358bf2474d1fc9c4ccde34660cc9d Gitweb: http://git.kernel.org/tip/aa4beb10a94358bf2474d1fc9c4ccde34660cc9d Author: Taeung Song AuthorDate: Fri, 7 Apr 2017 23:24:20 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 08:45:10 -0300 perf pmu

[tip:perf/core] perf ui browser: Refactor the code to parse color configs with ltrim()

2017-04-11 Thread tip-bot for Taeung Song
Commit-ID: e21600fd41106f7a0ca124cec2404b2b3562768d Gitweb: http://git.kernel.org/tip/e21600fd41106f7a0ca124cec2404b2b3562768d Author: Taeung Song AuthorDate: Fri, 7 Apr 2017 23:24:19 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 08:45:10 -0300 perf ui browser

Re: [PATCH v2 5/5] perf tools: Refactor the code to strip command name with {l,r}trim()

2017-04-08 Thread Taeung Song
Hi David, On 04/09/2017 03:48 AM, David Ahern wrote: On 4/7/17 8:52 PM, Taeung Song wrote: After reading command name from /proc//status, use ltrim() and rtrim() to strip command name, not using just while loop, isspace() and etc. Cc: David Ahern Cc: Don Zickus Cc: Jiri Olsa Cc: Namhyung

[PATCH v2 5/5] perf tools: Refactor the code to strip command name with {l,r}trim()

2017-04-07 Thread Taeung Song
After reading command name from /proc//status, use ltrim() and rtrim() to strip command name, not using just while loop, isspace() and etc. Cc: David Ahern Cc: Don Zickus Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/event.c | 11 ++- 1 file changed

[PATCH v2 4/5] perf pmu: Refactor wordwrap() with ltrim()

2017-04-07 Thread Taeung Song
Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 362051e..11c7525 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf

[PATCH v2 2/5] perf annotate: Use stripped line instead of raw disassemble line

2017-04-07 Thread Taeung Song
When parsing disassemble lines for source line number, use a stripped line instead of raw line. Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util

[PATCH v2 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()

2017-04-07 Thread Taeung Song
When parsing disassemble lines, use ltrim() and rtrim() to strip them, not using just while loop and isspace(). Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 42 +++--- 1 file changed, 7 insertions(+), 35

[PATCH v2 0/5] Refactoring with ltrim() and rtrim()

2017-04-07 Thread Taeung Song
main purpose of PATCH (Arnaldo) Taeung Song (5): perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() perf annotate: Use stripped line instead of raw disassemble line perf ui browser: Refactor the code to parse color configs with ltrim() perf pmu: Refactor wordwr

[PATCH v2 3/5] perf ui browser: Refactor the code to parse color configs with ltrim()

2017-04-07 Thread Taeung Song
When parsing {fore, back} ground color configs, use ltrim() instead of just while loop and isspace(). Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/ui/browser.c b/tools/perf

Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()

2017-04-07 Thread Taeung Song
On 04/08/2017 12:04 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 07, 2017 at 11:24:17PM +0900, Taeung Song escreveu: When parsing disassemble lines, use ltrim() and rtrim() to strip them, not using just while loop and isspace(). Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song

Re: [PATCH 2/5] perf stat: Refactor the code to strip csv output with ltrim()

2017-04-07 Thread Taeung Song
On 04/08/2017 12:06 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 07, 2017 at 11:24:18PM +0900, Taeung Song escreveu: To strip csv output, use ltrim() instead of just while loop and isspace() at print_metric_{only}_csv(). Applied. Thank you! - Taeung

Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()

2017-04-07 Thread Taeung Song
On 04/08/2017 12:04 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 07, 2017 at 12:01:30PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Apr 07, 2017 at 11:24:17PM +0900, Taeung Song escreveu: @@ -1148,9 +1136,9 @@ static int symbol__parse_objdump_line(struct symbol *sym, struct map

[PATCH 4/5] perf pmu: Refactor wordwrap() with ltrim()

2017-04-07 Thread Taeung Song
Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 362051e..11c7525 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf

[PATCH 5/5] perf tools: Refactor the code to strip command name with {l,r}trim()

2017-04-07 Thread Taeung Song
After reading command name from /proc//status, use ltrim() and rtrim() to strip command name, not using just while loop, isspace() and etc. Cc: David Ahern Cc: Don Zickus Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/event.c | 11 ++- 1 file changed

[PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()

2017-04-07 Thread Taeung Song
When parsing disassemble lines, use ltrim() and rtrim() to strip them, not using just while loop and isspace(). Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 49 ++ 1 file changed, 10 insertions(+), 39

[PATCH 3/5] perf ui browser: Refactor the code to parse color configs with ltrim()

2017-04-07 Thread Taeung Song
When parsing {fore, back} ground color configs, use ltrim() instead of just while loop and isspace(). Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/ui/browser.c b/tools/perf

[PATCH 2/5] perf stat: Refactor the code to strip csv output with ltrim()

2017-04-07 Thread Taeung Song
To strip csv output, use ltrim() instead of just while loop and isspace() at print_metric_{only}_csv(). Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/builtin-stat.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools

[PATCH 0/5] Refactoring with ltrim() and rtrim()

2017-04-07 Thread Taeung Song
Hi, :) It is to simply refactor the code about stip strings with ltrim() and rtrim(). I'd appreciate some feedback on this PATCHset. Thanks, Taeung Taeung Song (5): perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() perf stat: Refactor the code to stri

[tip:perf/core] perf annotate: Fix missing number of samples for source_line_samples

2017-04-04 Thread tip-bot for Taeung Song
Commit-ID: 99094a5e941fe88d95cbd594e6a41bee24003ecb Gitweb: http://git.kernel.org/tip/99094a5e941fe88d95cbd594e6a41bee24003ecb Author: Taeung Song AuthorDate: Tue, 28 Mar 2017 21:12:05 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 4 Apr 2017 21:08:00 -0300 perf annotate

Re: [PATCH v4] perf annotate: Fix missing number of samples for source_line_samples

2017-03-29 Thread Taeung Song
calc_percent()) has two alternative logic when using '-l' option or not as below. 888 if (src_line) { ... 903 } else { ... 914 } On 03/29/2017 01:15 AM, Taeung Song wrote: On 03/29/2017 12:28 AM, Arnaldo Carvalho de Melo wrote:

Re: [PATCH v4] perf annotate: Fix missing number of samples for source_line_samples

2017-03-28 Thread Taeung Song
On 03/29/2017 12:28 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 28, 2017 at 11:21:33PM +0900, Taeung Song escreveu: On 03/28/2017 10:48 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 28, 2017 at 09:12:05PM +0900, Taeung Song escreveu: The option 'show-total-period' works fi

Re: [PATCH v3 3/3] perf annotate: Fix missing number of samples

2017-03-28 Thread Taeung Song
On 03/28/2017 09:09 PM, Taeung Song wrote: Good morning, Arnaldo :) On 03/28/2017 03:26 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 27, 2017 at 04:10:38PM +0900, Taeung Song escreveu: If running 'perf annotate --stdio -l --show-total-period', you can see a problem showing on

Re: [PATCH v4] perf annotate: Fix missing number of samples for source_line_samples

2017-03-28 Thread Taeung Song
On 03/28/2017 11:21 PM, Taeung Song wrote: On 03/28/2017 10:48 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 28, 2017 at 09:12:05PM +0900, Taeung Song escreveu: The option 'show-total-period' works fine without a option '-l'. But if running 'perf annotate --std

<    1   2   3   4   5   6   7   8   9   >