Re: [PATCH] perf tool: Improve bash command line auto-complete for multiple events with comma

2017-12-21 Thread Jin, Yao
On 12/22/2017 12:26 AM, Arnaldo Carvalho de Melo wrote: Em Thu, Dec 21, 2017 at 05:26:10PM +0800, Jin Yao escreveu: perf has perf-completion.sh to define command line auto-completion in bash/zsh. For record/stat -e it works for single events, but not working when specifying multiple events

[PATCH] perf tool: Return all events as auto-completions after comma

2017-12-21 Thread Jin Yao
t the auto-completions doesn't work well for the event with ':'. For example, clk:clk_enable. Because ':' is set as WORDBREAK by default in bash. Need more work for this case. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf-completion.sh | 10 +++--- 1 file chang

Re: [PATCH] perf tool: Return all events as auto-completions after comma

2017-12-24 Thread Jin, Yao
x0e,umask=0x1,inv/ -a sleep 1 Anyway, if we want to implement the auto-completion for the modifiers, it'd better expose them by an interface (e.g. perf list --xx) rather than hardcode them in auto-completion script. That's my initial idea. Thanks Jin Yao

Re: [PATCH] perf report: Fix a no annotate browser displayed issue

2017-12-24 Thread Jin, Yao
Hi, Any comments for this bug fix? Thanks Jin Yao On 12/18/2017 9:26 PM, Jin Yao wrote: When enabling '-b' option in perf record, for example, perf record -b ... perf report and then browsing the annotate browser from perf report, it would be failed (annotate browser can't be displayed

Re: [PATCH v7 3/6] perf util: Create function to parse time percent

2018-01-08 Thread Jin, Yao
On 1/8/2018 10:38 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Jan 08, 2018 at 11:31:49AM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Dec 08, 2017 at 09:13:43PM +0800, Jin Yao escreveu: Current perf report/script/... have a --time option to limit the time range of output. But right now

[PATCH] perf util: Display warning when perf report/annotate is missing some libs

2018-01-10 Thread Jin Yao
. This patch displays warnings that these libraries are missing in build when perf report / perf annotate are used. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-annotate.c | 2 ++ tools/perf/builtin-report.c | 2 ++ tools/perf/util/symbol.c

Re: [PATCH v7 5/6] perf report: support time percent and multiple time ranges

2018-01-08 Thread Jin, Yao
ce a % in the --time string, etc. 4. Add an indication of what percentage ranges are being used. For example, Samples: 128 of event 'cycles:ppp', Event count (approx.): 21386169 (10%/1) I will develop a follow-up patchset to improve this feature. Thanks Jin Yao

[PATCH] perf stat: Ignore error thread when enabling system-wide --per-thread

2018-01-15 Thread Jin Yao
d Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-stat.c| 14 +- tools/perf/util/evsel.c | 3 +++ tools/perf/util/thread_map.c | 1 + tools/perf/util/thread_map.h | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/perf/b

Re: [PATCH] perf stat: Ignore error thread when enabling system-wide --per-thread

2018-01-21 Thread Jin, Yao
On 1/16/2018 9:17 PM, Jiri Olsa wrote: On Tue, Jan 16, 2018 at 09:06:09PM +0800, Jin, Yao wrote: Just tested. But looks it's not OK for '--per-thread' case. yea, I haven't tested much.. might need soem tweaking, but my point was that it could be doable on one place instead of introducing

Re: [PATCH] perf util: Fix evlist->threads when working with 'perf stat --per-thread'

2018-01-22 Thread Jin, Yao
Very sorry, I just see this mail today. Please let me look at this issue first. Thanks Jin Yao threads in a system, resulting in new kernel events being created for all threads rather than just the thread of interest. This patch keeps the newly introduced functionality but make sure it doesn't

Re: [PATCH v1 0/8] perf: Follow-up patches to improve time slice

2018-01-16 Thread Jin, Yao
On 1/16/2018 10:48 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jan 16, 2018 at 12:55:19PM +0100, Jiri Olsa escreveu: On Wed, Jan 10, 2018 at 11:00:25PM +0800, Jin Yao wrote: It's follow-up patches to improve the perf time slice feature (perf report/script --time xxx) 1. Improve the error

Re: [PATCH v1 0/8] perf: Follow-up patches to improve time slice

2018-01-16 Thread Jin, Yao
On 1/16/2018 7:55 PM, Jiri Olsa wrote: On Wed, Jan 10, 2018 at 11:00:25PM +0800, Jin Yao wrote: It's follow-up patches to improve the perf time slice feature (perf report/script --time xxx) 1. Improve the error message perf report: Improve error msg when no first/last sample time found

Re: [PATCH] perf stat: Ignore error thread when enabling system-wide --per-thread

2018-01-16 Thread Jin, Yao
Disallow kernel profiling by users without CAP_SYS_ADMIN To make this setting permanent, edit /etc/sysctl.conf too, e.g.: kernel.perf_event_paranoid = -1 Thanks Jin Yao On 1/16/2018 8:51 PM, Jiri Olsa wrote: On Tue, Jan 16, 2018 at 11:43:08PM +0800, Jin Yao wrote: If we execute 'perf s

Re: [PATCH] perf stat: Ignore error thread when enabling system-wide --per-thread

2018-01-16 Thread Jin, Yao
On 1/16/2018 9:17 PM, Jiri Olsa wrote: On Tue, Jan 16, 2018 at 09:06:09PM +0800, Jin, Yao wrote: Just tested. But looks it's not OK for '--per-thread' case. yea, I haven't tested much.. might need soem tweaking, but my point was that it could be doable on one place instead of introducing

[PATCH v1 4/8] perf util: Support no index time percent slice

2018-01-09 Thread Jin Yao
Previously, the time percent slice needs an index to specify which one the user wants. While it may be easy for using if the index can be omitted. So with this patch, for example, perf report --stdio --time 10%/1 should be equivalent to perf report --stdio --time 10% Signed-off-by: Jin Yao <

[PATCH v1 2/8] perf script: Improve error msg when no first/last sample time found

2018-01-09 Thread Jin Yao
needs to set '--timestamp-boundary')." Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-script.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index c1cce47..4f691af 100644 --- a/to

[PATCH v1 6/8] perf util: Allocate time slices buffer according to number of comma

2018-01-09 Thread Jin Yao
entry even if no comma is found. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/util/time-utils.c | 28 tools/perf/util/time-utils.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c

[PATCH v1 5/8] perf report: Add an indication of what time slices are used

2018-01-09 Thread Jin Yao
Add a time slices indication to the perf report header. For example, # perf report --stdio --time 10% # Total Lost Samples: 0 # # Samples: 9K of event 'cycles:ppp' (time slices: 10%) # Event count (approx.): 8951288803 Signed-off-by: Jin Yao <yao@linux.intel.com> --- tool

[PATCH v1 7/8] perf report: Remove the time slices number limitation

2018-01-09 Thread Jin Yao
Previously it was only allowed to use at most 10 time slices in 'perf report --time'. This patch removes this limitation. For example, following command line is OK (12 time slices) perf report --stdio --time 1%/1,1%/2,1%/3,1%/4,1%/5,1%/6,1%/7,1%/8,1%/9,1%/10,1%/11,1%/12 Signed-off-by: Jin Yao

[PATCH v1 3/8] perf util: Improve error checking for time percent input

2018-01-09 Thread Jin Yao
/tmp# perf report --stdio --time 1abc%/1 Invalid time string Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/util/time-utils.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c index 3f7f18f

[PATCH v1 8/8] perf script: Remove the time slices number limitation

2018-01-09 Thread Jin Yao
Previously it was only allowed to use at most 10 time slices in 'perf script --time'. This patch removes this limitation. For example, following command line is OK (12 time slices) perf script --time 1%/1,1%/2,1%/3,1%/4,1%/5,1%/6,1%/7,1%/8,1%/9,1%/10,1%/11,1%/12 Signed-off-by: Jin Yao <

[PATCH v1 0/8] perf: Follow-up patches to improve time slice

2018-01-09 Thread Jin Yao
limitation perf script: Remove the time slices number limitation Jin Yao (8): perf report: Improve error msg when no first/last sample time found perf script: Improve error msg when no first/last sample time found perf util: Improve error checking for time percent input perf util: Support

[PATCH v1 1/8] perf report: Improve error msg when no first/last sample time found

2018-01-09 Thread Jin Yao
needs to set '--timestamp-boundary')." Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-report.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index dd4df9a..a6c5cf2 100644 --- a/to

Re: [PATCH] perf util: Display warning when perf report/annotate is missing some libs

2018-01-11 Thread Jin, Yao
On 1/11/2018 11:30 PM, Jiri Olsa wrote: On Thu, Jan 11, 2018 at 07:03:06PM +0800, Jin Yao wrote: We keep having bug reports that when users build perf on their own, we already have same warnings during the build Yes, there will be warnings displayed during the build if some libraries

[PATCH] perf report: Fix wrong jump arrow

2018-01-28 Thread Jin Yao
212; │ │ │ │s_randseed = time(0); │ │srand(s_randseed); │ │ │ │for (i = 0; i < 20; i++) { 1.37 │0.4882:└─→sub$0x1,%ebx 28.21 │0.4817 ↑ jne38 Signed-off-by: Jin Yao <yao@linux.intel.com> ---

Re: [PATCH] perf report: Fix wrong jump arrow

2018-02-12 Thread Jin, Yao
Hi Arnaldo, Thanks for applying the patch. Yes the issue only happens on skl+. The committer notes are very good and clear. Thanks Jin Yao On 2/9/2018 11:15 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Jan 29, 2018 at 06:57:53PM +0800, Jin Yao escreveu: When we use perf report interactive

[PATCH] perf report: Fix a memory corrupton issue when enabling --branch-history

2018-02-12 Thread Jin Yao
l reallocate array 'he_cache[]' in iter_next_cumulative_entry() if necessary (the case of too many nodes in callchain). Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/util/hist.c | 21 + 1 file changed, 21 insertions(+) diff --git a/tools/perf/util/hist.c

Re: [PATCH] perf report: Fix a memory corrupton issue when enabling --branch-history

2018-02-13 Thread Jin, Yao
On 2/13/2018 5:45 PM, Jiri Olsa wrote: On Tue, Feb 13, 2018 at 04:44:28PM +0800, Jin Yao wrote: Following command lines will cause perf crash. perf record -j call -g -a perf report --branch-history *** Error in `perf': double free or corruption (!prev): 0x104aa040

Re: [PATCH] perf report: Fix a memory corrupton issue when enabling --branch-history

2018-02-15 Thread Jin, Yao
On 2/13/2018 10:00 PM, Jin, Yao wrote: On 2/13/2018 5:45 PM, Jiri Olsa wrote: On Tue, Feb 13, 2018 at 04:44:28PM +0800, Jin Yao wrote: Following command lines will cause perf crash. perf record -j call -g -a perf report --branch-history *** Error in `perf': double free or corruption

Re: [PATCH] perf annotate: Support to display the LBR data in tui mode

2018-02-23 Thread Jin, Yao
On 2/23/2018 11:29 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Feb 23, 2018 at 09:25:00AM +0100, Peter Zijlstra escreveu: On Fri, Feb 23, 2018 at 10:35:58PM +0800, Jin Yao wrote: Unlike the perf report interactive annotate mode, the perf annotate doesn't display the LBR data. perf record

[PATCH] perf annotate: Support to display the LBR data in tui mode

2018-02-22 Thread Jin Yao
Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-annotate.c | 88 --- 1 file changed, 82 insertions(+), 6 deletions(-) diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index f15731a..ead6ae4 100644

Re: [PATCH] perf annotate: Support to display the LBR data in tui mode

2018-02-23 Thread Jin, Yao
On 2/23/2018 4:25 PM, Peter Zijlstra wrote: On Fri, Feb 23, 2018 at 10:35:58PM +0800, Jin Yao wrote: Unlike the perf report interactive annotate mode, the perf annotate doesn't display the LBR data. perf record -b ... perf annotate function It should show IPC/cycle, but it doesn't

Re: [PATCH] perf report: Fix a no annotate browser displayed issue

2017-12-25 Thread Jin, Yao
On 12/26/2017 5:44 AM, Jiri Olsa wrote: On Mon, Dec 25, 2017 at 11:58:39AM +0800, Jin, Yao wrote: Hi, Any comments for this bug fix? getting segfault with this [jolsa@krava perf]$ sudo ./perf record -b ls [jolsa@krava perf]$ sudo ./perf report --stdio Segmentation fault (core dumped

[PATCH v2] perf report: Fix a no annotate browser displayed issue

2017-12-25 Thread Jin Yao
t code to hist_iter__branch_callback ( refer to hist_iter__report_callback). Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-report.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index eb9c

[PATCH] perf report: Fix a wrong offset issue when using /proc/kcore

2017-12-29 Thread Jin Yao
22.77% _vm_normal_page+66 | ---page_remove_rmap +228 page_remove_rmap +391 (cycles:5) unlock_page_memcg +0 page_remove_rmap +231 (cycles:1) page_remove_rmap +236 Signed-off-by: Jin Yao <yao@linux.intel.com> --- too

[PATCH] perf tool: Auto-complete for the event with ':'

2017-12-22 Thread Jin Yao
_rq_insertblock:block_rq_remap root@skl:/tmp# perf stat -e block:block_rq_complete block:block_rq_complete root@skl:/tmp# perf stat -e block:block_rq_complete Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf-completion.sh | 5 + 1 file changed, 5 insertions(+) diff --

[PATCH] perf tool: Improve bash command line auto-complete for multiple events with comma

2017-12-20 Thread Jin Yao
cpu/CACHE-REFERENCES/ cpu/CYCLES-CT/ root@skl:/tmp# perf stat -e cpu/cache-misses/,cpu/CACHE-REFERENCES/ Note that: a) This patch only supports bash. b) It doesn't support the cases like {},{} or {...,...}. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf-co

[PATCH] perf/x86/intel/uncore: Provide alias for IIO free-running boxes on SKX

2018-08-26 Thread Jin Yao
': 153.12 MiB uncore_iio_pcie1/bw_in_port0/ 8.469790720 seconds time elapsed Signed-off-by: Jin Yao --- arch/x86/events/intel/uncore.c | 9 +++-- arch/x86/events/intel/uncore.h | 1 + arch/x86/events/intel/uncore_snbep.c | 10 ++ 3 files changed, 18 insertions

Re: [PATCH v2] perf/x86/intel/uncore: Provide alias for IIO free-running boxes on SKX

2018-09-10 Thread Jin, Yao
One week nearly passed, I guess there is no any objections for this patch from community. :) Thanks Jin Yao On 9/4/2018 3:45 PM, Jin, Yao wrote: On 9/4/2018 3:13 PM, Peter Zijlstra wrote: On Tue, Sep 04, 2018 at 06:58:17PM +0800, Jin Yao wrote: root@skx /sys/devices# ls | grep uncore_iio

[PATCH v2] perf util: Use target->per_thread and target->system_wide flags

2018-01-23 Thread Jin Yao
amp; target->system_wide' as a condition to check for all threads case. v2: --- According to Jiri's comment, add description to explain why the patch uses 'target->per_thread && target->system_wide'. v2 doesn't have functional change. Signed-off-by: Jin Yao <yao

Re: [PATCH] perf util: Use target->per_thread and target->system_wide flags

2018-01-22 Thread Jin, Yao
On 1/23/2018 5:10 AM, Mathieu Poirier wrote: On 22 January 2018 at 15:15, Jin Yao <yao@linux.intel.com> wrote: Mathieu Poirier reports issue in commit ("73c0ca1eee3d perf thread_map: Enumerate all threads from /proc") that it has negative impact on 'perf record --per

Re: [PATCH] perf util: Use target->per_thread and target->system_wide flags

2018-01-22 Thread Jin, Yao
On 1/23/2018 7:56 AM, Mathieu Poirier wrote: On 22 January 2018 at 15:15, Jin Yao <yao@linux.intel.com> wrote: Mathieu Poirier reports issue in commit ("73c0ca1eee3d perf thread_map: Enumerate all threads from /proc") that it has negative impact on 'perf record --per

Re: [PATCH 1/1] perf util: Do not reuse target->per_thread flag

2018-01-22 Thread Jin, Yao
e. I just think for your perf record case, the target->system_wide will not be set. Instead, if target->per-thread and target->system_wide are both set, that means we needs to trace on all threads, right? Thanks Jin Yao On 1/13/2018 7:12 AM, Mathieu Poirier wrote: Commit ("73c0ca1e

[PATCH] perf util: Use target->per_thread and target->system_wide flags

2018-01-22 Thread Jin Yao
amp; target->system_wide' as a condition to check for all threads case. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/util/evlist.c | 2 +- tools/perf/util/thread_map.c | 4 ++-- tools/perf/util/thread_map.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff -

Re: [PATCH] perf util: Use target->per_thread and target->system_wide flags

2018-01-23 Thread Jin, Yao
On 1/23/2018 10:40 PM, Jiri Olsa wrote: On Tue, Jan 23, 2018 at 07:02:44AM +0800, Jin, Yao wrote: SNIP threads = thread_map__new_str(target->pid, target->tid, target->uid, - target->per_thread); +

Re: [PATCH v2] perf annotate: Support to display the IPC/Cycle in tui mode

2018-03-07 Thread Jin, Yao
Hi, Could this patch be accepted? I'm working on the supporting for stdio mode. I just wish to post the patch series after this patch being merged. Thanks Jin Yao On 2/27/2018 5:38 PM, Jin Yao wrote: Unlike the perf report interactive annotate mode, the perf annotate doesn't display

[PATCH v1 0/4] perf annotate: Create a new '--tui-dump' option

2018-03-13 Thread Jin Yao
dio code. But right now we'd better keep it until the '--tui-dump' option is good enough. Jin Yao (4): perf browser: Add a new 'dump' flag perf browser: bypass ui_init if in tui dump mode perf annotate: Process the new switch flag tui_dump perf annotate: Enable the '--tui-dump' mode to

[PATCH v1 1/4] perf browser: Add a new 'dump' flag

2018-03-13 Thread Jin Yao
We have a new requirement to provide the TUI output option for non-interactive mode. For example, write the TUI output to stdio directly. This patch creates a new flag 'dump' in struct ui_browser. Once it's on, for the formatted buffer, we just print it on stdio. Signed-off-by: Jin Yao <

[PATCH v1 4/4] perf annotate: Enable the '--tui-dump' mode

2018-03-13 Thread Jin Yao
│} 26.93 │3.38 2 ← retq Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/Documentation/perf-annotate.txt | 3 +++ tools/perf/builtin-annotate.c | 12 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/perf/Documen

[PATCH v1 3/4] perf annotate: Process the new switch flag tui_dump

2018-03-13 Thread Jin Yao
The tui_dump is created as a parameter and it will be finally passed to symbol__tui_annotate() and be saved to browser.dump. It's a switch for TUI routines to indicate if TUI output needs to be dumped to stdio. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-anno

[PATCH v1 2/4] perf browser: bypass ui_init if in tui dump mode

2018-03-13 Thread Jin Yao
We create a tui dump mode in previous patch. In tui dump mode, the output is written to stdio. We need to bypass ui_init() in setup_browser(). Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-c2c.c | 2 +- tools/perf/b

Re: [PATCH v1 0/4] perf annotate: Create a new '--tui-dump' option

2018-03-14 Thread Jin, Yao
On 3/14/2018 9:54 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Mar 14, 2018 at 10:04:49AM +0800, Jin, Yao escreveu: On 3/13/2018 11:20 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 13, 2018 at 10:16:50PM +0800, Jin Yao escreveu: There is a requirement to let perf annotate support

Re: [PATCH v1 0/4] perf annotate: Create a new '--tui-dump' option

2018-03-13 Thread Jin, Yao
On 3/13/2018 11:20 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 13, 2018 at 10:16:50PM +0800, Jin Yao escreveu: There is a requirement to let perf annotate support displaying the IPC/Cycle. In previous patch, this is supported in TUI mode. While it's not convenient for users since

[PATCH v1 3/3] perf version: Print status for syscall_table

2018-04-08 Thread Jin Yao
get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT The line "syscall_table: [ on ] # HAVE_SYSCALL_TABLE_SUPPORT" is new created. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-version.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v1 0/3] perf version: some follow-up updates

2018-04-08 Thread Jin Yao
add a line for HAVE_SYSCALL_TABLE_SUPPORT. Jin Yao (3): perf script: Use HAVE_LIBXXX_SUPPORT to replace NO_LIBXXX perf: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT perf version: Print status for syscall_table tools/perf/Makefile.config | 2 +- tools/perf/buil

[PATCH v1 2/3] perf: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT

2018-04-08 Thread Jin Yao
To make consistent with other HAVE_XXX_SUPPORT in Makefile.config, this patch renames HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT and update the C code accordingly. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/Makefile.config | 2 +- tools/perf/builtin-

Re: [PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-26 Thread Jin, Yao
On 3/26/2018 9:51 PM, Jin, Yao wrote: On 3/26/2018 5:39 PM, Jiri Olsa wrote: On Tue, Mar 27, 2018 at 12:07:03AM +0800, Jin Yao wrote: This patch checks the values passed by CFLAGS (-DXXX) and then print the status of libraries. For example, if HAVE_DWARF_SUPPORT is defined, that means

Re: [PATCH v1 3/3] perf: Support perf -vv

2018-03-27 Thread Jin, Yao
On 3/27/2018 2:03 PM, Ingo Molnar wrote: * Jin Yao <yao@linux.intel.com> wrote: +++ b/tools/perf/perf.c @@ -64,6 +64,7 @@ static struct cmd_struct commands[] = { { "top", cmd_top,0 }, { "annotate", cmd_annotate, 0 }, { &qu

Re: [PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-27 Thread Jin, Yao
On 3/27/2018 1:58 PM, Ingo Molnar wrote: * Jin Yao <yao@linux.intel.com> wrote: +#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_DWARF_GETLOCATIONS +#ifdef NO_GLIBC +#ifdef HAVE_GTK2_SUPPORT +#ifdef HAVE_LIBAUDIT_SUPPORT +#ifdef HAVE_LIBBFD_SUPPORT +#ifdef HAVE_LIBELF_SUPPORT +

Re: [PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-26 Thread Jin, Yao
On 3/26/2018 5:39 PM, Jiri Olsa wrote: On Tue, Mar 27, 2018 at 12:07:03AM +0800, Jin Yao wrote: This patch checks the values passed by CFLAGS (-DXXX) and then print the status of libraries. For example, if HAVE_DWARF_SUPPORT is defined, that means the library "dwarf" i

Re: [PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-27 Thread Jin, Yao
On 3/27/2018 8:56 PM, Jiri Olsa wrote: On Tue, Mar 27, 2018 at 09:44:23AM +0800, Jin, Yao wrote: On 3/26/2018 5:39 PM, Jiri Olsa wrote: On Tue, Mar 27, 2018 at 12:07:03AM +0800, Jin Yao wrote: This patch checks the values passed by CFLAGS (-DXXX) and then print the status of libraries

Re: [PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-27 Thread Jin, Yao
On 3/27/2018 8:38 PM, Jiri Olsa wrote: On Mon, Mar 26, 2018 at 09:51:03PM +0800, Jin, Yao wrote: On 3/26/2018 5:39 PM, Jiri Olsa wrote: On Tue, Mar 27, 2018 at 12:07:03AM +0800, Jin Yao wrote: This patch checks the values passed by CFLAGS (-DXXX) and then print the status of libraries

[PATCH v2 3/4] perf version: Print the compiled-in status of libraries

2018-03-28 Thread Jin Yao
uot;OFF". v2: --- 1. Use IS_BUILTIN macro to replace #ifdef/#endif block. 2. Print color for on/OFF. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-version.c | 68 1 file changed, 68 insertions(+) diff --git a/tools

[PATCH v2 4/4] perf: Support perf -vv

2018-03-28 Thread Jin Yao
environment v2: --- Use a global variable version_verbose to count the number of 'v'. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf.c | 22 ++ tools/perf/perf.h | 1 + 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/perf/pe

[PATCH v2 0/4] Support perf -vv

2018-03-28 Thread Jin Yao
: [ on ] lzma: [ on ] get_cpuid: [ on ] bpf: [ on ] [ on ]: library is compiled-in [ OFF ]: library is disabled in make configuration OR library is not installed in build environment Jin Yao (3): perf config: Add some new -DHAVE_XXX

[PATCH v2 1/4] tools include: Add config.h header file

2018-03-28 Thread Jin Yao
From: Jiri Olsa Adding IS_BUILTIN macro and its dependencies into tools world. It's taken from kernel's include/linux/kconfig.h, which can't be taken completely due to its kconfig dependencies. Signed-off-by: Jiri Olsa --- tools/include/tools/config.h | 34

[PATCH v1 0/3] Support perf -vv

2018-03-26 Thread Jin Yao
: [ on ] libcrypto: [ on ] libunwind: [ on ] libdw-dwarf-unwind: [ on ] zlib: [ on ] lzma: [ on ] get_cpuid: [ on ] bpf: [ on ] Jin Yao (3): perf config: Add -DNO_GLIBC to CFLAGS perf

[PATCH v1 3/3] perf: Support perf -vv

2018-03-26 Thread Jin Yao
: [ on ] get_cpuid: [ on ] bpf: [ on ] Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 1b3fc8e..300c83d 100644 --- a/tools/perf/

[PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-26 Thread Jin Yao
This patch checks the values passed by CFLAGS (-DXXX) and then print the status of libraries. For example, if HAVE_DWARF_SUPPORT is defined, that means the library "dwarf" is compiled-in. The patch will print the status "on" for this library. Signed-off-by: Jin Yao <

[PATCH v1 1/3] perf config: Add -DNO_GLIBC to CFLAGS

2018-03-26 Thread Jin Yao
-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/Makefile.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 98ff736..5883dd6 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -324,6

[PATCH v3 0/5] Support perf -vv

2018-03-29 Thread Jin Yao
: [ on ] bpf: [ on ] Jin Yao (4): perf config: Add some new -DHAVE_XXX to CFLAGS perf version: Print the compiled-in status of libraries perf: Support perf -vv perf Documentation: Create perf-version.txt Jiri Olsa (1): tools include: Add config.h header file tools/include

[PATCH v3 5/5] perf Documentation: Create perf-version.txt

2018-03-29 Thread Jin Yao
Since a new option '--build-options' is created for 'perf version', so we need to document it. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/Documentation/perf-version.txt | 24 1 file changed, 24 insertions(+) create mode 100644 tool

Re: [PATCH v3 0/5] Support perf -vv

2018-03-29 Thread Jin, Yao
On 3/29/2018 3:20 PM, Ingo Molnar wrote: * Jin Yao <yao@linux.intel.com> wrote: For example: $ ./perf version --build-options or ./perf --version --build-options or ./perf -v --build-options or ./perf -vv Thank you, the UI looks perfect to me! perf v

[PATCH v3 4/5] perf: Support perf -vv

2018-03-29 Thread Jin Yao
the number of 'v'. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf.c | 6 ++ tools/perf/perf.h | 1 + 2 files changed, 7 insertions(+) diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 1b3fc8e..1659029 100644 --- a/tools/perf/perf.c +++ b/tools/perf/

[PATCH v3 1/5] tools include: Add config.h header file

2018-03-29 Thread Jin Yao
From: Jiri Olsa Adding IS_BUILTIN macro and its dependencies into tools world. It's taken from kernel's include/linux/kconfig.h, which can't be taken completely due to its kconfig dependencies. Signed-off-by: Jiri Olsa --- tools/include/tools/config.h | 34

[PATCH v3 3/5] perf version: Print the compiled-in status of libraries

2018-03-29 Thread Jin Yao
UILTIN macro to replace #ifdef/#endif block. 2. Print color for on/OFF. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-version.c | 81 +++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-version.c

Re: [PATCH v2 4/4] perf: Support perf -vv

2018-03-28 Thread Jin, Yao
On 3/28/2018 11:46 PM, Ingo Molnar wrote: * Jin Yao <yao@linux.intel.com> wrote: $ ./perf -vv or ./perf -version --build-options perf version 4.13.rc5.gcb1183 My suggestion was to add the 'version' subcommand like Git has, not a "-version" option: $ git versio

[PATCH v4 1/6] tools include: Add config.h header file

2018-03-29 Thread Jin Yao
From: Jiri Olsa Adding IS_BUILTIN macro and its dependencies into tools world. It's taken from kernel's include/linux/kconfig.h, which can't be taken completely due to its kconfig dependencies. Signed-off-by: Jiri Olsa --- tools/include/tools/config.h | 34

[PATCH v4 6/6] perf Documentation: Create perf-version.txt

2018-03-29 Thread Jin Yao
Since a new option '--build-options' is created for 'perf version', so we need to document it. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/Documentation/perf-version.txt | 24 1 file changed, 24 insertions(+) create mode 100644 tool

[PATCH v4 4/6] perf version: Print the compiled-in status of libraries

2018-03-29 Thread Jin Yao
reate '--build-options' option. 3. Use standard option parsing API 'parse_options'. v2: --- 1. Use IS_BUILTIN macro to replace #ifdef/#endif block. 2. Print color for on/OFF. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin-version.c | 82

[PATCH v4 0/6] Support perf -vv

2018-03-29 Thread Jin Yao
not changed Jin Yao (5): perf config: Add some new -DHAVE_XXX to CFLAGS perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT perf version: Print the compiled-in status of libraries perf: Support perf -vv perf Documentation: Create perf-version.txt Jiri Olsa (1): tools include: Add

[PATCH v4 3/6] perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT

2018-03-29 Thread Jin Yao
In Makefile.config, to make all libraries flags have _SUPPORT suffix, rename HAVE_DWARF_GETLOCATIONS to HAVE_DWARF_GETLOCATIONS_SUPPORT Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/Makefile.config | 2 +- tools/perf/util/dwarf-aux.c | 2 +- 2 files changed, 2 insertions

[PATCH v4 5/6] perf: Support perf -vv

2018-03-29 Thread Jin Yao
v3: --- One bug is found in v2. It didn't process the option like '-vabc' correctly. Fix this bug. v2: --- Use a global variable version_verbose to record the number of 'v'. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/perf.c | 6 ++ tools/perf/perf.h | 1 + 2 files c

Re: [PATCH v1 2/3] perf version: Print the status of compiled-in libraries

2018-03-26 Thread Jin, Yao
On 3/26/2018 5:39 PM, Jiri Olsa wrote: On Tue, Mar 27, 2018 at 12:07:03AM +0800, Jin Yao wrote: This patch checks the values passed by CFLAGS (-DXXX) and then print the status of libraries. For example, if HAVE_DWARF_SUPPORT is defined, that means the library "dwarf" i

Re: [PATCH v1 0/3] Support perf -vv

2018-03-26 Thread Jin, Yao
On 3/26/2018 5:07 PM, Jiri Olsa wrote: On Mon, Mar 26, 2018 at 02:00:31AM -0700, Andi Kleen wrote: On Tue, Mar 27, 2018 at 12:07:01AM +0800, Jin Yao wrote: We keep having bug reports that when users build perf on their own, but they don't install some needed libraries such as libelf, libbfd

Re: [PATCH v4 4/6] perf version: Print the compiled-in status of libraries

2018-04-02 Thread Jin, Yao
On 4/3/2018 12:47 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Mar 30, 2018 at 05:27:14PM +0800, Jin Yao escreveu: This patch checks the values passed by CFLAGS (-DHAVE_XXX) and then print the status of libraries. For example, if HAVE_DWARF_SUPPORT is defined, that means the library "

Re: [PATCH v2 4/4] perf: Support perf -vv

2018-03-28 Thread Jin, Yao
On 3/28/2018 9:22 PM, Jiri Olsa wrote: On Wed, Mar 28, 2018 at 10:57:08PM +0800, Jin Yao wrote: We keep having bug reports that when users build perf on their own, but they don't install some needed libraries such as libelf, libbfd/libibery. The perf can build, but it is missing important

Re: [PATCH v2 3/4] perf version: Print the compiled-in status of libraries

2018-03-28 Thread Jin, Yao
On 3/28/2018 9:10 PM, Jiri Olsa wrote: On Wed, Mar 28, 2018 at 10:57:07PM +0800, Jin Yao wrote: SNIP + +static void library_status(void) +{ + STATUS(HAVE_DWARF_SUPPORT, dwarf); + STATUS(HAVE_DWARF_GETLOCATIONS, dwarf_getlocations); + STATUS(HAVE_GLIBC_SUPPORT, glibc

Re: [PATCH v2 4/4] perf: Support perf -vv

2018-03-28 Thread Jin, Yao
On 3/28/2018 10:19 PM, Jiri Olsa wrote: On Wed, Mar 28, 2018 at 10:00:32PM +0800, Jin, Yao wrote: On 3/28/2018 9:22 PM, Jiri Olsa wrote: On Wed, Mar 28, 2018 at 10:57:08PM +0800, Jin Yao wrote: We keep having bug reports that when users build perf on their own, but they don't install some

Re: [PATCH] perf util: Display warning when perf report/annotate is missing some libs

2018-03-20 Thread Jin, Yao
the root cause. If with this patch, it should be very easily to know that. Thanks Jin Yao On 1/12/2018 10:22 AM, Jin, Yao wrote: On 1/11/2018 11:30 PM, Jiri Olsa wrote: On Thu, Jan 11, 2018 at 07:03:06PM +0800, Jin Yao wrote: We keep having bug reports that when users build perf on their own, we

Re: [PATCH] perf util: Display warning when perf report/annotate is missing some libs

2018-03-21 Thread Jin, Yao
On 3/21/2018 11:38 PM, Jiri Olsa wrote: On Wed, Mar 21, 2018 at 10:11:10AM +0800, Jin, Yao wrote: Hi Jiri, I'm still thinking it's worth displaying the warning when perf missing some libraries. Somebody just told me that perf didn't work well. While after some investigations, I found it's

Re: [PATCH] perf util: Display warning when perf report/annotate is missing some libs

2018-03-21 Thread Jin, Yao
at 04:38:07PM +0100, Jiri Olsa escreveu: On Wed, Mar 21, 2018 at 10:11:10AM +0800, Jin, Yao wrote: Hi Jiri, I'm still thinking it's worth displaying the warning when perf missing some libraries. Somebody just told me that perf didn't work well. While after some investigations, I found it's just

Re: [PATCH] perf util: Display warning when perf report/annotate is missing some libs

2018-03-22 Thread Jin, Yao
On 3/22/2018 4:51 PM, Jiri Olsa wrote: On Thu, Mar 22, 2018 at 09:04:10AM +0800, Jin, Yao wrote: On 3/21/2018 11:38 PM, Jiri Olsa wrote: On Wed, Mar 21, 2018 at 10:11:10AM +0800, Jin, Yao wrote: Hi Jiri, I'm still thinking it's worth displaying the warning when perf missing some

[PATCH v2] perf annotate: Support to display the IPC/Cycle in tui mode

2018-02-26 Thread Jin Yao
: 400657: sub%edx,%eax :} 25.26 : 400659: retq # -100.00% (p:100.00%) Change-log: --- v2: --- No code change. Just change the patch description to make it more clear. Signed-off-by: Jin Yao <yao@linux.intel.com> --- tools/perf/builtin

Re: [PATCH] perf stat: Ignore error thread when enabling system-wide --per-thread

2018-02-26 Thread Jin, Yao
On 1/23/2018 10:19 PM, Jiri Olsa wrote: On Mon, Jan 22, 2018 at 01:10:31PM +0800, Jin, Yao wrote: On 1/16/2018 9:17 PM, Jiri Olsa wrote: On Tue, Jan 16, 2018 at 09:06:09PM +0800, Jin, Yao wrote: Just tested. But looks it's not OK for '--per-thread' case. yea, I haven't tested much

[PATCH] perf top: Display the LBR stats in callchain entry

2018-10-30 Thread Jin Yao
) 0.58% pick_next_task_fair (cycles:47) + 0.56% i915_request_retire (cycles:2) + 0.52% do_sys_poll (cycles:4) Signed-off-by: Jin Yao --- tools/perf/builtin-top.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index

Re: [PATCH] perf top: Display the LBR stats in callchain entry

2018-11-04 Thread Jin, Yao
Hi, Any comments for this patch? Thanks Jin Yao On 10/31/2018 7:06 PM, Jin Yao wrote: Perf report has supported the displaying of LBR stats (such as cycles, predicted%) in callchain entry. For example, perf report --branch-history --stdio --1.01%--intel_idle mwait.h:29 intel_idle

[PATCH v2] perf/x86/intel/uncore: Provide alias for IIO free-running boxes on SKX

2018-09-03 Thread Jin Yao
': 153.12 MiB uncore_iio_pcie1/bw_in_port0/ 8.469790720 seconds time elapsed v2: --- Previously, it used braces around initialized string. For example, { "iio_cbdma" }. The braces around scalar initializer would cause the build warning. In v2, it removes the braces. Signed-o

Re: [PATCH v2] perf/x86/intel/uncore: Provide alias for IIO free-running boxes on SKX

2018-09-04 Thread Jin, Yao
On 9/4/2018 3:13 PM, Peter Zijlstra wrote: On Tue, Sep 04, 2018 at 06:58:17PM +0800, Jin Yao wrote: root@skx /sys/devices# ls | grep uncore_iio uncore_iio_0 uncore_iio_1 uncore_iio_2 uncore_iio_3 uncore_iio_4 uncore_iio_5 uncore_iio_free_running_0 uncore_iio_free_running_1

[PATCH v3 1/3] perf annotate: Compute average IPC and IPC coverage per symbol

2018-11-27 Thread Jin Yao
__lll_unlock_wake_private add$0x80,%rsp 21.56 2.908a: movslq 0xc(%rsp),%rax 2.90 add$0x18,%rsp 9.03 2.90 1 ← retq It shows for this symbol the average IPC is 2.30 and the IPC coverage is 54.8%. Signed-off-by: Jin Yao --- tools/perf

<    1   2   3   4   5   6   7   8   9   10   >