[PATCH v4 1/6] 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

[PATCH v4 5/6] perf config: Reset the config set at only 'config' sub-command

2016-05-30 Thread Taeung Song
th the options, the config set should be reset at the very beginning at cmd_config() Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/builti

[PATCH v4 6/6] 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 4dab41e..b6ae8ea 100644 --- a/tools/perf/builtin

[PATCH v4 3/6] perf config: Use zfree() instead of free() at perf_config_set__delete()

2016-05-30 Thread Taeung Song
#x27;struct perf_config_set *'. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- tools/perf/util/config.c| 11 +++ tools/perf/util/config.h| 2 +- 3 files changed, 9 insertion

Re: [PATCH v4 1/6] perf config: Use new perf_config_set__init() to initialize config set

2016-05-31 Thread Taeung Song
On 05/31/2016 10:43 PM, Arnaldo Carvalho de Melo wrote: Em Tue, May 31, 2016 at 10:13:43AM +0900, Taeung Song escreveu: Instead of perf_config(), This function initialize config set collecting all configs from config files (i.e. user config ~/.perfconfig and system config $(sysconfdir

[PATCH v5 4/9] perf config: Use new perf_config_set__init() to initialize config set

2016-05-31 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 | 49 +++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/config.c b/tools/perf

[PATCH v5 9/9] perf config: Reimplement show_config() using perf_config()

2016-05-31 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 4dab41e..b6ae8ea 100644 --- a/tools/perf/builtin

[PATCH v5 8/9] perf config: Reset the config set at only 'config' sub-command

2016-05-31 Thread Taeung Song
th the options, the config set should be reset at the very beginning at cmd_config() Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/builti

[PATCH v5 5/9] perf config: Add global variable 'config_set'

2016-05-31 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

[BUGFIX][PATCH v5 1/9] perf config: Let perf_config() return in case of failure

2016-05-31 Thread Taeung Song
fig file line 2 in /root/.perfconfig So fix it. If perf_config() can return on failure without calling die() at perf_parse_file(), this problem is solved. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c

[PATCH v5 6/9] perf config: Use zfree() instead of free() at perf_config_set__delete()

2016-05-31 Thread Taeung Song
#x27;struct perf_config_set *'. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 2 +- tools/perf/util/config.c| 11 +++ tools/perf/util/config.h| 2 +- 3 files changed, 9 insertion

[PATCH v5 7/9] perf config: Reimplement perf_config() using perf_config_set__iter()

2016-05-31 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 | 83 ++-- 3 files changed, 40 insertions(+

[BUGFIX][PATCH v5 3/9] perf config: Handle an error when config set is NULL at collect_config()

2016-05-31 Thread Taeung Song
Signed-off-by: Taeung Song --- tools/perf/util/config.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c index d013f90..062eeb8 100644 --- a/tools/perf/util/config.c +++ b/tools/perf/util/config.c @@ -607,8 +607,12 @@

[BUGFIX][PATCH v5 2/9] perf config: Finally free a config set after collect_config() worked

2016-05-31 Thread Taeung Song
Current colllect_config() free a config set on failure. But it is needed to finally free it at perf_config_set__new() after collect_config() worked. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Alexander Shishkin Signed-off-by: Taeung Song --- tools/perf/util/config.c | 4 ++-- 1

[RFC][PATCH v5 0/9] perf config: Reimplement perf_config() using perf_config_set__inter()

2016-05-31 Thread Taeung Song
about the config set at cmd_config() - add a patch about 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 &#

Re: Scrolling down broken with "perf top --hierarchy"

2016-10-26 Thread Taeung Song
Sorry for late reply, Namhyung On 10/25/2016 01:37 AM, Namhyung Kim wrote: Hi Taeung, On Mon, Oct 24, 2016 at 07:10:24PM +0900, Taeung Song wrote: Hi, Namhyung and Arnaldo :) On 10/24/2016 02:11 PM, Namhyung Kim wrote: Hi Arnaldo, Sorry for late reply. On Fri, Oct 07, 2016 at 11:35:45AM

[PATCH v2 0/7] perf config: Add support for config read/write

2016-11-14 Thread Taeung Song
sages - refactor parts of parse_config_arg Taeung Song (7): perf config: Add support for getting functionality perf config: Document examples getting config info in man page perf config: Parse arguments before getting functionality perf config: Parse arguments before setting functionality perf conf

[PATCH v2 3/7] perf config: Parse arguments before getting functionality

2016-11-14 Thread Taeung Song
. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 42 -- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 7b24789..02def73

[PATCH v2 6/7] perf config: Document config setting examples in man page

2016-11-14 Thread Taeung Song
Explain how to add or modify particular config items in config file and how to set several config items from user or system config file using '--user' or '--system' options. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/Documenta

[PATCH v2 5/7] perf config: Add support for write functionality

2016-11-14 Thread Taeung Song
# perf config ui.show-headers=false If you want to add or modify several config items, you can do like # perf config annotate.show_nr_jumps=false kmem.default=slab Sure, you can also use file-option --user or --system. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung

[PATCH v2 2/7] perf config: Document examples getting config info in man page

2016-11-14 Thread Taeung Song
Explain how to query particular config items in config file and how to get several config items from user or system config file using '--user' or '--system' options. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/Documentation/

[PATCH v2 4/7] perf config: Parse arguments before setting functionality

2016-11-14 Thread Taeung Song
: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 43 ++- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 02def73..098d2df 100644 --- a/tools/perf/builtin

[PATCH v2 1/7] perf config: Add support for getting functionality

2016-11-14 Thread Taeung Song
Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index e4207a2..7b24789 100644 --- a/tools/p

[PATCH v2 7/7] perf config: Mark where are config items from (user or system)

2016-11-14 Thread Taeung Song
), perf_config_set can contain both user and system config items. To avoid merging user and system config items on user config file, we should know where each value is from. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 6 +- tools

Re: [PATCH v2 0/7] perf config: Add support for config read/write

2016-11-14 Thread Taeung Song
rray https://lkml.org/lkml/2016/9/5/17 . Is it better to handle support for config reade/write, first ? Thanks, Taeung On 11/14/2016 05:21 PM, Taeung Song wrote: Hello, :) Add simple config read/write functionalities. I had worked at the related patchset https://lkml.org/lkml/2016/2/22/38 But I remak

Re: [PATCH 1/6] perf config: Add support for getting config key-value pairs

2016-11-14 Thread Taeung Song
Hi, Arnaldo Thank you for your reply :) I was worried lest you don't it.. On 11/15/2016 12:50 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Nov 04, 2016 at 03:44:17PM +0900, Taeung Song escreveu: Add a functionality getting specific config key-value pairs. For the syntax examples,

Re: [PATCH 2/6] perf config: Document examples to get config key-value pairs in man page

2016-11-14 Thread Taeung Song
On 11/15/2016 12:51 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Nov 04, 2016 at 03:44:18PM +0900, Taeung Song escreveu: Explain how to query particular config items in config file and how to get several config items from user or system config file using '--user' or '--system&#

Re: [PATCH 4/6] perf config: Add support for writing configs to a config file

2016-11-14 Thread Taeung Song
Thank you for your review. I have a question at the very bottom (skip v2 I sent lately or not ?). On 11/15/2016 01:04 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Nov 04, 2016 at 03:44:20PM +0900, Taeung Song escreveu: Add setting feature that can add config variables with their values to a

Re: [PATCH 09/15] perf config: Add support setting variables in a config file

2016-11-14 Thread Taeung Song
Hi, Arnaldo :) On 11/15/2016 10:38 AM, Arnaldo Carvalho de Melo wrote: From: Taeung Song Add setting feature that can add config variables with their values to a config file (i.e. user or system config file) or modify config key-value pairs in a config file. For the syntax examples

Re: [PATCH 4/6] perf config: Add support for writing configs to a config file

2016-11-14 Thread Taeung Song
Hi, Arnaldo :) On 11/15/2016 10:49 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Nov 15, 2016 at 02:00:38AM +0900, Taeung Song escreveu: Thank you for your review. I have a question at the very bottom (skip v2 I sent lately or not ?). Humm, I combined some patches, fixed up the stuff I

Re: Scrolling down broken with "perf top --hierarchy"

2016-10-24 Thread Taeung Song
Hi, Namhyung and Arnaldo :) On 10/24/2016 02:11 PM, Namhyung Kim wrote: Hi Arnaldo, Sorry for late reply. On Fri, Oct 07, 2016 at 11:35:45AM -0300, Arnaldo Carvalho de Melo wrote: Em Fri, Oct 07, 2016 at 01:53:57PM +0900, Namhyung Kim escreveu: Cc-ing perf maintainers, On Fri, Oct 07, 2016

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

2016-11-28 Thread Taeung Song
lt perf config values at one spot (i.e. util/config.c) with default config arrays and it could be easy and simple to modify existing default config values or add default values for new config item. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hira

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

2016-11-28 Thread Taeung Song
ser__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): perf config: Introduce default_config_s

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

2016-11-28 Thread Taeung Song
: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index 1c80f00..5caa7e4 100644 --- a/tools/perf/ui/browser.c +++ b/to

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

2016-11-28 Thread Taeung Song
as just one). Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 53 +++-- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index 3eb3e

[PATCH v9 6/7] perf config: Add default section and item arrays for 'annotate' config

2016-11-28 Thread Taeung Song
annoate.c because of setting default values of actual variables for 'annotate' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/util/config.c | 11 +++ tools/perf/util/config.h | 11 +++ 2 files changed, 22 insertions(+)

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

2016-11-28 Thread Taeung Song
amhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 16 tools/perf/util/config.h | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/

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

2016-11-28 Thread Taeung Song
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 434d71c..7498669 100644 --- a/tools/perf/util/config.h +++ b/tools/perf/util/config.h @@ -96,4 +96,24 @@ struct

[PATCH v9 3/7] perf config: Add default section and item arrays for 'colors' config

2016-11-28 Thread Taeung Song
be used on ui/browser.c because of setting default values of actual variables for 'colors' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/util/config.c | 15 +++ tools/perf/util/config.h | 17 + 2 files change

Re: [PATCH 1/6] perf config: Add support for getting config key-value pairs

2016-11-28 Thread Taeung Song
Good morning!! Arnaldo :) On 11/15/2016 12:50 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Nov 04, 2016 at 03:44:17PM +0900, Taeung Song escreveu: Add a functionality getting specific config key-value pairs. For the syntax examples, perf config [] [section.name ...] e.g. To query config

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

2016-11-29 Thread Taeung Song
Hi, Arnaldo :) On 11/30/2016 01:05 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Nov 28, 2016 at 05:51:12PM +0900, Taeung Song escreveu: When initializing default perf config values, we currently use values of actual type(int, bool, char *, etc.). For example, If there isn't a user config

Re: [PATCH 2/4] perf annotate: Avoid division by zero when calculating percent

2017-03-21 Thread Taeung Song
Hi, On 03/21/2017 11:21 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 21, 2017 at 11:14:07AM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Mar 21, 2017 at 07:20:20AM +0900, Taeung Song escreveu: And, I tested by perf-stat on the same situation as below. $ perf stat -e "{cycles

Re: [PATCH 4/4] perf annotate: More exactly grep -v of the objdump command

2017-03-21 Thread Taeung Song
Thank you for your review :) On 03/21/2017 11:37 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 20, 2017 at 11:56:57AM +0900, Taeung Song escreveu: grep -v "file name" in the objdump command cause a side effect eliminating filename:linenr of output of 'objdump -l' if the

Re: [PATCH 4/4] perf annotate: More exactly grep -v of the objdump command

2017-03-21 Thread Taeung Song
Thank you for your review :) On 03/21/2017 11:37 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 20, 2017 at 11:56:57AM +0900, Taeung Song escreveu: grep -v "file name" in the objdump command cause a side effect eliminating filename:linenr of output of 'objdump -l' if the

Re: [PATCH 4/4] perf annotate: More exactly grep -v of the objdump command

2017-03-22 Thread Taeung Song
On 03/22/2017 03:32 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 21, 2017 at 03:29:50PM -0300, Arnaldo Carvalho de Melo escreveu: Em Wed, Mar 22, 2017 at 01:19:49AM +0900, Taeung Song escreveu: On 03/21/2017 11:37 PM, Arnaldo Carvalho de Melo wrote: +++ b/tools/perf/util/annotate.c

Re: [PATCH 2/4] perf annotate: Avoid division by zero when calculating percent

2017-03-22 Thread Taeung Song
On 03/21/2017 11:21 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 21, 2017 at 11:14:07AM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Mar 21, 2017 at 07:20:20AM +0900, Taeung Song escreveu: And, I tested by perf-stat on the same situation as below. $ perf stat -e "{cycles

[PATCH v2 0/3] perf annotate: Bugfixes

2017-03-22 Thread Taeung Song
Hi, perf-annotate has little bugs so I fix them. I'd appreciate some feedback on this patchset. :) Thanks, Taeung v2: - more clearly commit log messages (Arnaldo) - rebased on current acme/perf/core Taeung Song (3): perf annotate: Fix a bug reading link name from a build-id file

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

2017-03-22 Thread Taeung Song
mov$0x0,%edx ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 6 -- tools/perf/util/annotate.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index db3ebf1..23f36c

[PATCH v2 1/3] perf annotate: Fix a bug reading link name from a build-id file

2017-03-22 Thread Taeung Song
/75c7d197c951659d1c1b8b5fd49bcdf8f3f8b1/elf To correctly read link name of build-id, use the build-id dir path that is a symbolic link, instead of the above build-id file name like below. /root/.debug/.build-id/4f/75c7d197c951659d1c1b8b5fd49bcdf8f3f8b1 Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song

[PATCH v2 2/3] perf annotate: Fix a bug of division by zero when calculating percent

2017-03-22 Thread Taeung Song
sembly of old for cycles (529 samples) - : ... a.c:260.570.004.23 : 40081a: mov%edi,-0x24(%rbp) a.c:260.000.009.86 : 40081d: mov%rsi,-0x30(%rbp) ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song

[PATCH 0/4] perf annotate: Bugfixes

2017-03-19 Thread Taeung Song
Hi, perf-annotate has little bugs so I fix them. I'd appreciate some feedback on this patchset. :) Thanks, Taeung Taeung Song (4): perf annotate: Use build-id dir when reading link name perf annotate: Avoid division by zero when calculating percent perf annotate: Fix missing setti

[PATCH 3/4] perf annotate: Fix missing setting nr samples on source_line

2017-03-19 Thread Taeung Song
mov-0x24(%rbp),%eax 2 :400824: mov-0x30(%rbp),%rdx 0 :400828: mov(%rdx),%esi 1 :40082a: mov$0x0,%edx ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 6 -- tools/perf/

[PATCH 4/4] perf annotate: More exactly grep -v of the objdump command

2017-03-19 Thread Taeung Song
: file format elf64-x86-64" After: $ objdump -l -d -S -C /home/taeung/hello | grep /home/taeung/hello: Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/annot

[PATCH 1/4] perf annotate: Use build-id dir when reading link name

2017-03-19 Thread Taeung Song
: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 273f21f..fc91c6b 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c

[PATCH 2/4] perf annotate: Avoid division by zero when calculating percent

2017-03-19 Thread Taeung Song
samples) - : ... a.c:260.570.004.23 : 40081a: mov%edi,-0x24(%rbp) a.c:260.000.009.86 : 40081d: mov%rsi,-0x30(%rbp) ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by

Re: [PATCH 2/4] perf annotate: Avoid division by zero when calculating percent

2017-03-20 Thread Taeung Song
-nan0.00 old_pack_knapsack.c:38 16.37-nan0.00 old_pack_knapsack.c:37 Thanks, Taeung On 03/21/2017 03:15 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 20, 2017 at 11:56:55AM +0900, Taeung Song escreveu: Currently perf-annotate with --print-line can print -nan(0x8) becau

Re: [PATCH 2/4] perf annotate: Avoid division by zero when calculating percent

2017-03-20 Thread Taeung Song
->addr[i] / h->sum; This patch just add if statement 'if (h->sum)' to handle the case that h->sum is zero. But now I wonder how h->sum could be zero.. I'll dig the problem to find the root cause of it, too ! Thanks, Taeung On 03/21/2017 07:11 AM, Taeung Song wro

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

2017-03-27 Thread Taeung Song
mov$0x0,%edx ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 6 -- tools/perf/util/annotate.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 11af5f0..a37032

[PATCH v3 1/3] perf annotate: Fix a bug reading link name from a build-id file

2017-03-27 Thread Taeung Song
/75c7d197c951659d1c1b8b5fd49bcdf8f3f8b1/elf To correctly read link name of build-id, use the build-id dir path that is a symbolic link, instead of the above build-id file name like below. /root/.debug/.build-id/4f/75c7d197c951659d1c1b8b5fd49bcdf8f3f8b1 Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song

[PATCH v3 2/3] perf annotate: Fix a bug of division by zero when calculating percent

2017-03-27 Thread Taeung Song
sembly of old for cycles (529 samples) - : ... a.c:260.570.004.23 : 40081a: mov%edi,-0x24(%rbp) a.c:260.000.009.86 : 40081d: mov%rsi,-0x30(%rbp) ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song

[PATCH v3 0/3] perf annotate: Simple bugfixes

2017-03-27 Thread Taeung Song
Hi, perf-annotate has little bugs so I fix them. I'd appreciate some feedback on this patchset. :) Thanks, Taeung v3: - rebased on current acme/perf/core v2: - more clearly commit log messages (Arnaldo) - rebased on current acme/perf/core Taeung Song (3): perf annotate: Fix a bug re

[PATCH v3 0/7] perf annotate: Fixes & Introduce --source-only and new source code view

2017-03-09 Thread Taeung Song
for 'fold/unfold parts of asm per a line' on the new source code view. If you agree the new source code view, I keep going to do! Taeung Song (7): perf annotate: Use build-id dir when reading link name perf annotate: Avoid division by zero when calculating percent perf annotate:

[PATCH v3 1/7] perf annotate: Use build-id dir when reading link name

2017-03-09 Thread Taeung Song
: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 273f21f..fc91c6b 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c

[PATCH v3 3/7] perf annotate: Fix missing setting nr samples on source_line

2017-03-09 Thread Taeung Song
mov-0x24(%rbp),%eax 2 :400824: mov-0x30(%rbp),%rdx 0 :400828: mov(%rdx),%esi 1 :40082a: mov$0x0,%edx ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 6 -- tools/perf/

[PATCH v3 5/7] perf annotate: Get correct line numbers matched with addr

2017-03-09 Thread Taeung Song
: Taeung Song --- tools/perf/util/annotate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index e49eb7e..a50d949 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -823,11 +823,11 @@ static struct

[PATCH v3 4/7] perf annotate: More exactly grep -v in symbol__disassemble()

2017-03-09 Thread Taeung Song
liminating filename:linenr of output of 'objdump -l' so fix it. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 63130ec..e49eb7

[PATCH v3 2/7] perf annotate: Avoid division by zero when calculating percent

2017-03-09 Thread Taeung Song
samples) - : ... a.c:260.570.004.23 : 40081a: mov%edi,-0x24(%rbp) a.c:260.000.009.86 : 40081d: mov%rsi,-0x30(%rbp) ... Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by

[PATCH v3 7/7] perf annotate: Support the new source code view for TUI

2017-03-09 Thread Taeung Song
| 12.50 |if (hex_val < 0) |break; | 23.21 |*long_val = (*long_val << 4) | hex_val; |p++; |} | 1.79 |return p - ptr; Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song -

[PATCH v3 6/7] perf annotate: Introduce --source-only option

2017-03-09 Thread Taeung Song
iri Olsa Signed-off-by: Taeung Song --- tools/perf/builtin-annotate.c | 2 + tools/perf/ui/browsers/annotate.c | 5 - tools/perf/util/annotate.c| 299 +- tools/perf/util/annotate.h| 22 +++ tools/perf/util/symbol.c | 1 + t

[PATCH 0/6] perf config: Add support for setting and getting functionalities

2016-11-03 Thread Taeung Song
ticular, I agonized implement way for setting functionality. I especially wonder other opinions of new perf_config_set__collect() and bool from_system_config variable. If someone review this patchset and give me some feedback, I'd appreciated it. :) Thanks, Taeung Taeung Song (6): perf conf

[PATCH 5/6] perf config: Document examples to set config variables with values in man page

2016-11-03 Thread Taeung Song
Explain how to add or modify particular config items in config file and how to set several config items from user or system config file using '--user' or '--system' options. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/Documenta

[PATCH 4/6] perf config: Add support for writing configs to a config file

2016-11-03 Thread Taeung Song
# perf config ui.show-headers=false If you want to add or modify several config items, you can do like # perf config annotate.show_nr_jumps=false kmem.default=slab Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 66

[PATCH 3/6] perf config: Parse config variable arguments before getting functionality

2016-11-03 Thread Taeung Song
near future. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 45 + 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index

[PATCH 1/6] perf config: Add support for getting config key-value pairs

2016-11-03 Thread Taeung Song
i Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/builtin-config.c | 40 +--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index e4207a2..df3fa1c 100644 --- a/tools/perf/bu

[PATCH 6/6] perf config: Mark where are config items from (user or system)

2016-11-03 Thread Taeung Song
: Taeung Song --- tools/perf/builtin-config.c | 6 +- tools/perf/util/config.c| 16 +++- tools/perf/util/config.h| 4 +++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 5313702..f4541d7 100644

[PATCH 2/6] perf config: Document examples to get config key-value pairs in man page

2016-11-03 Thread Taeung Song
Explain how to query particular config items in config file and how to get several config items from user or system config file using '--user' or '--system' options. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/Documentation/

[PATCH v2 0/3] perf annotate: Introduce the new source code view

2017-02-28 Thread Taeung Song
27;objdump -S') So fix them regarding wrong line numbers and Introduce new source_code collecting actual code, not depending on 'objdump -S'. I'd appreciate some feedback. Thanks, Taeung v2: - contains the new source code view (Namhyung) Taeung Song (3): perf annotate: Ge

[PATCH v2 1/3] perf annotate: Get correct line numbers matched with addr

2017-02-28 Thread Taeung Song
'objdump -S' with the new source code view. Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 59 +++--- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools

[PATCH v2 3/3] perf annotate: Support the new source code view for TUI

2017-02-28 Thread Taeung Song
) { 25.61 │59 maxprice = get_cond_maxprice(wgt, jewelry); Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/ui/browsers/annotate.c | 170 -- tools/perf/util/annotate.h| 1 + 2 files changed, 128 insertions(+),

[PATCH v2 2/3] perf annotate: Introduce the new source code view

2017-02-28 Thread Taeung Song
price(wgt, jewelry); 0.00 : 60 12.20 : 61 if (knapsack_list[wgt].maxprice < maxprice) 0.00 : 62 knapsack_list[wgt].maxprice = maxprice; 0.00 : 63 } 0.00 : 64 } 0.00 : 65 } Cc: Namhyung Kim Cc: Ji

Re: [PATCH v2 2/3] perf annotate: Introduce the new source code view

2017-03-01 Thread Taeung Song
Hi, Peter On 03/02/2017 12:07 AM, Peter Zijlstra wrote: On Wed, Mar 01, 2017 at 11:56:39PM +0900, Namhyung Kim wrote: It's a kind of user experience issue. We provide the asm-only and asm+source annotation, and I think it'd be nice to add source-only option. And I remember that it was reques

Re: [PATCH v2 1/3] perf annotate: Get correct line numbers matched with addr

2017-03-01 Thread Taeung Song
On 03/01/2017 10:17 PM, Namhyung Kim wrote: Hi Taeung, On Wed, Mar 01, 2017 at 04:59:51AM +0900, Taeung Song wrote: Currently perf-annotate show wrong line numbers. For example, Actual source code is as below ... 21 }; 22 23 unsigned int limited_wgt; 24 25 unsigned int

Re: [PATCH v2 1/3] perf annotate: Get correct line numbers matched with addr

2017-03-02 Thread Taeung Song
On 03/03/2017 11:40 AM, Namhyung Kim wrote: + Andi Kleen who wrote the code. On Thu, Mar 02, 2017 at 03:05:14PM +0900, Taeung Song wrote: On 03/01/2017 10:17 PM, Namhyung Kim wrote: Hi Taeung, On Wed, Mar 01, 2017 at 04:59:51AM +0900, Taeung Song wrote: Currently perf-annotate show

[PATCH 0/4] perf annotate: Fixes for line numbers and Introduce source_code

2017-02-22 Thread Taeung Song
;. :) I'd appreciate some feedback. (Current v1 don't consider improvement of performance of annotate and don't make code of annotate more compact so I'll consider them in v2) Thanks, Taeung Taeung Song (4): perf annotate: Remove needless regular expression for filename

[PATCH 1/4] perf annotate: Remove needless regular expression for filename:linenr

2017-02-22 Thread Taeung Song
7;ll fix the problem about line numbers. Cc: Andi Kleen Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 273

[PATCH 2/4] perf annotate: Align filename:linenr and more correct summary

2017-02-22 Thread Taeung Song
4(%rbp) 0.21 :40081d: mov%rsi,-0x30(%rbp) Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c inde

[PATCH 4/4] perf annotate: Introduce source_code to collect actual code

2017-02-22 Thread Taeung Song
r function(sym) using addr2line() and we can handle 'struct source_code' that contains each line of code. In near future, it would be used for new annotate view based on actual source code per function(sym). Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Taeung Song --- tools/perf/u

[PATCH 3/4] perf annotate: Change the method counting line numbers

2017-02-22 Thread Taeung Song
Currently line numbers are wrong due to just counting according to output of 'objdump -S' So remove needless local variables (line_nr, lineno) and get correct line numbers according to each address in symbol__get_source_line(). Cc: Namhyung Kim Cc: Jiri Olsa Signed-off-by: T

Re: [PATCH 1/4] perf annotate: Remove needless regular expression for filename:linenr

2017-02-22 Thread Taeung Song
Hi Namhyung, On 02/22/2017 07:47 PM, Namhyung Kim wrote: Hi Taeung, On Wed, Feb 22, 2017 at 7:08 PM, Taeung Song wrote: The commit e592488c01d5 ("perf annotate: Support source line numbers in annotate") support source line numbers in annotate. But we can get filename:line

Re: [PATCH 2/4] perf annotate: Align filename:linenr and more correct summary

2017-02-22 Thread Taeung Song
On 02/22/2017 08:22 PM, Namhyung Kim wrote: On Wed, Feb 22, 2017 at 7:08 PM, Taeung Song wrote: In the stdio interface, currently 'filename:linenr' infos are confusedly printed in the intervals of assembly code. So fix it. The cause was a 0.5% filter of if statement. A

Re: [PATCH 4/4] perf annotate: Introduce source_code to collect actual code

2017-02-22 Thread Taeung Song
On 02/22/2017 08:27 PM, Namhyung Kim wrote: On Wed, Feb 22, 2017 at 7:08 PM, Taeung Song wrote: The output of perf-annotate has a problem. It is so confusing that the output is mixed with both source code and assembly code. IMHO, we need readable annotate view based on source code, not mixed

[Suggestion/Problems] perf annoate: Some problems related to the source code view and Improvement of it with line numbers

2017-02-15 Thread Taeung Song
Hi all :) I found some problems about showing line numbers of perf-annotate. and I have a suggestion about perf-annotate. Sure, I have a plan to send the patchset about that. But I'd like to know other opinions about that before sending the patchset. :) If the user do perf-annotate, # pe

Re: [Suggestion/Problems] perf annoate: Some problems related to the source code view and Improvement of it with line numbers

2017-02-15 Thread Taeung Song
On 02/15/2017 10:24 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Feb 15, 2017 at 09:34:51PM +0900, Taeung Song escreveu: > Hi all :) > > I found some problems about showing line numbers of perf-annotate. > and I have a suggestion about perf-annotate. > > Sure, I have

Re: [Suggestion/Problems] perf annoate: Some problems related to the source code view and Improvement of it with line numbers

2017-02-16 Thread Taeung Song
readable :) ) I'll send the patchset for them, maybe it'll a bit take time. But I won't be long.. Thanks, Taeung On 02/15/2017 11:24 PM, Taeung Song wrote: On 02/15/2017 10:24 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Feb 15, 2017 at 09:34:51PM +0900, Taeung Song escreveu: > Hi

Re: [Suggestion/Problems] perf annoate: Some problems related to the source code view and Improvement of it with line numbers

2017-02-17 Thread Taeung Song
On 02/17/2017 10:29 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Feb 17, 2017 at 11:33:29AM +0900, Taeung Song escreveu: Hi, Arnaldo :) Regarding perf annotate: 1) Problem : wrong line numbers on perf-annotate (both stdio and TUI) 2) Problem : wrong sum of overhead(percent) matching source

Re: [PATCH 2/3] perf diff: Add diff.order config option

2017-02-06 Thread Taeung Song
is to set the default value of -o/--order option. Cc: Taeung Song Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-config.txt | 7 +++ tools/perf/Documentation/perf-diff.txt | 6 +- tools/perf/builtin-diff.c| 14 ++ 3 files changed, 26 inser

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

2016-08-09 Thread Taeung Song
#x27;annotate' - use combined {fore, back}ground colors instead of each two color - introduce perf_default_config_init() that call all default_*_config_init() for each config section v2: - rename 'ui_browser__config_gcolors' to 'ui_browser__config_colors' (Arnaldo) - c

[PATCH v7 6/7] perf config: Add default section and item arrays for 'annotate' config

2016-08-09 Thread Taeung Song
annoate.c because of setting default values of actual variables for 'annotate' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/util/config.c | 11 +++ tools/perf/util/config.h | 11 +++ 2 files c

[PATCH v7 3/7] perf config: Add default section and item arrays for 'colors' config

2016-08-09 Thread Taeung Song
be used on ui/browser.c because of setting default values of actual variables for 'colors' config. Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/util/config.c | 15 +++ tools/perf/util/config.h | 17

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

2016-08-09 Thread Taeung Song
(as just one). Cc: Namhyung Kim Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Wang Nan Signed-off-by: Taeung Song --- tools/perf/ui/browser.c | 53 +++-- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui

<    1   2   3   4   5   6   7   8   9   >