[PATCH v4 2/4] perf annotate: Create a annotate2 flag in struct symbol

2018-11-28 Thread Jin Yao
We often use the symbol__annotate2() to annotate a specified symbol. While annotating may take some time, so in order to avoid annotating the same symbol repeatedly, the patch creates a new flag to indicate the symbol has been annotated. Signed-off-by: Jin Yao --- tools/perf/util/annotate.c | 1

[PATCH v4 0/4] perf report/annotate: Support average IPC and IPC coverage for function

2018-11-28 Thread Jin Yao
iri's patch to support stdio mode 2. Add a new patch "perf annotate: Create a annotate2 flag in struct symbol" which records if the symbol has been annotated yet. 3. Minor update such as adding { } for multiline code in 'if' condition. Jin Yao (4): p

Re: [PATCH v4 4/4] perf report: Documentation average IPC and IPC coverage

2018-11-29 Thread Jin, Yao
On 11/29/2018 9:27 PM, Ingo Molnar wrote: * Jin Yao wrote: Add explanations for new columns "IPC" and "IPC coverage" in perf documentation. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-report.txt | 8 1 file changed, 8 insertions(+) dif

Re: [PATCH v4 0/4] perf report/annotate: Support average IPC and IPC coverage for function

2018-11-29 Thread Jin, Yao
On 11/29/2018 7:33 PM, Jiri Olsa wrote: On Thu, Nov 29, 2018 at 11:39:34PM +0800, Jin Yao wrote: Add supporting of displaying the average IPC and IPC coverage percentage per function. For example, $ perf record -b ... $ perf report -s symbol or perf report -s symbol --stdio Overhead

Re: [PATCH v3 0/3] perf report/annotate: Support average IPC and IPC coverage for function

2018-11-29 Thread Jin, Yao
On 11/29/2018 6:13 PM, Jiri Olsa wrote: On Thu, Nov 29, 2018 at 02:24:27PM +0800, Jin, Yao wrote: On 11/28/2018 6:18 PM, Jiri Olsa wrote: On Wed, Nov 28, 2018 at 11:17:57AM +0100, Jiri Olsa wrote: On Wed, Nov 28, 2018 at 11:14:55PM +0800, Jin Yao wrote: Add supporting of displaying the

[PATCH v5 4/4] perf report: Documentation average IPC and IPC coverage

2018-11-29 Thread Jin Yao
Add explanations for new columns "IPC" and "IPC coverage" in perf documentation. v5: --- Update the description according to Ingo's comments. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Reviewed-by: Ingo Molnar --- tools/perf/Documentation/perf-report.txt | 8 ++

[PATCH v5 2/4] perf annotate: Create a annotate2 flag in struct symbol

2018-11-29 Thread Jin Yao
We often use the symbol__annotate2() to annotate a specified symbol. While annotating may take some time, so in order to avoid annotating the same symbol repeatedly, the patch creates a new flag to indicate the symbol has been annotated. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa --- tools

[PATCH v5 3/4] perf report: Display average IPC and IPC coverage per symbol

2018-11-29 Thread Jin Yao
nabled when "symbol" is specified. v2: --- Merge in Jiri's patch to support stdio mode Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa --- tools/perf/builtin-report.c | 26 --- tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 61

[PATCH v5 1/4] perf annotate: Compute average IPC and IPC coverage per symbol

2018-11-29 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 Reviewed-by: Jiri

[PATCH v5 0/4] perf report/annotate: Support average IPC and IPC coverage for function

2018-11-29 Thread Jin Yao
2 flag in struct symbol" which records if the symbol has been annotated yet. 3. Minor update such as adding { } for multiline code in 'if' condition. Jin Yao (4): perf annotate: Compute average IPC and IPC coverage per symbol perf annotate: Create a annotate2 flag

Re: [PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping leaked kernel samples

2018-06-17 Thread Jin, Yao
On 6/15/2018 7:36 PM, Mark Rutland wrote: On Fri, Jun 15, 2018 at 06:03:22PM +0800, Jin Yao wrote: When doing sampling, for example: perf record -e cycles:u ... On workloads that do a lot of kernel entry/exits we see kernel samples, even though :u is specified. This is due to skid existing

Re: [PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping leaked kernel samples

2018-06-18 Thread Jin, Yao
On 6/18/2018 6:45 PM, Peter Zijlstra wrote: On Mon, Jun 18, 2018 at 02:55:32PM +0800, Jin, Yao wrote: Thanks for providing the patch. I understand this approach. In my opinion, the skid window is from counter overflow to interrupt delivered. While if the skid window is too *big* (e.g. user

[PATCH] perf util: Add more PMU fields for perf script python

2018-05-29 Thread Jin Yao
e) transaction (from sample->transaction, raw value) Signed-off-by: Jin Yao --- .../util/scripting-engines/trace-event-python.c| 212 - 1 file changed, 211 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util

Re: [PATCH] perf util: Add more PMU fields for perf script python

2018-05-30 Thread Jin, Yao
On 5/31/2018 1:43 AM, Andi Kleen wrote: On Wed, May 30, 2018 at 10:20:45PM +0800, Jin Yao wrote: When doing pmu sampling and then running a script with perf script -s script.py, the process_event function gets dictionary with some fields from the perf ring buffer (like ip, sym, callchain etc

[PATCH v2 3/3] perf script python: Add fields introduction to Documentation

2018-05-31 Thread Jin Yao
Add the brief introduction of fields to perf-script-python.txt. It may help python script developer easily finding what fields are supported. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-script-python.txt | 26 + 1 file changed, 26 insertions(+) diff --git

[PATCH v2 0/3] perf script python: Add more PMU fields

2018-05-31 Thread Jin Yao
,iregs,uregs,and etc. This patch adds these fields for perf script python. Jin Yao (3): perf script python: Move dsoname code to a new function perf script python: Add more PMU fields perf script python: Add fields introduction to Documentation tools/perf/Documentation/perf-script-python.txt

[PATCH v2 1/3] perf script python: Move dsoname code to a new function

2018-05-31 Thread Jin Yao
This patch creates a new function get_dsoname() and move the code which gets the dsoname string to this function. That's because in next patch, when we process LBR data, we will also need get_dsoname() to return dsoname for branch from/to. Signed-off-by: Jin Yao --- .../util/scripting-en

[PATCH v2 2/3] perf script python: Add more PMU fields

2018-05-31 Thread Jin Yao
(converted string) key : datasrc key : datasrc_decode (decoded string) key : iregs key : uregs key : weight key : transaction v2: --- Add new fields for dso. Use PyBool_FromLong() for mispred/predicted/in_tx/abort Signed-off-by: Jin Yao --- .../util/scripting-engines/trace-event-python.c

[PATCH v1 2/2] perf Documentation: Introduce the sysctl perf_allow_sample_leakage

2018-06-14 Thread Jin Yao
Introduce a new sysctl /sys/devices/cpu/perf_allow_sample_leakage, which turns on/off dropping leaked kernel samples. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-record.txt | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/perf/Documentation/perf-record.txt

[PATCH v1 0/2] perf: Drop leaked kernel samples

2018-06-14 Thread Jin Yao
ked kernel samples. 1 - don't drop the leaked kernel samples. For rr it can write 1 to /sys/devices/cpu/perf_allow_sample_leakage to keep original system behavior. Jin Yao (2): perf/core: Use sysctl to turn on/off dropping leaked kernel samples perf Documentation: Intro

[PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping leaked kernel samples

2018-06-14 Thread Jin Yao
linux] [k] apic_timer_interrupt 0.00% div libc-2.23.so [.] intel_check_word 0.00% div ld-2.23.so[.] brk 0.00% div [kernel.vmlinux] [k] page_fault 0.00% div ld-2.23.so[.] _start We can see the kernel symbols apic_timer_interrupt and

Re: [PATCH v1 0/2] perf: Drop leaked kernel samples

2018-06-14 Thread Jin, Yao
if (event->attr.exclude_kernel && !user_mode(regs)) return false; } But rr needs to add PERF_SAMPLE_ALLOW_LEAKAGE to sample_type since by default the bit is not set. 3. Sysctl is a more flexible way. It provides us with an option when we want to see if skid is existing, we can use sysctl to turn on that. Thanks Jin Yao

Re: [PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping leaked kernel samples

2018-06-15 Thread Jin, Yao
On 6/15/2018 1:59 PM, Stephane Eranian wrote: On Thu, Jun 14, 2018 at 7:10 PM Jin Yao wrote: When doing sampling, for example: perf record -e cycles:u ... On workloads that do a lot of kernel entry/exits we see kernel samples, even though :u is specified. This is due to skid existing

Re: [PATCH v1 0/2] perf: Drop leaked kernel samples

2018-06-15 Thread Jin, Yao
On 6/15/2018 3:45 PM, Peter Zijlstra wrote: On Fri, Jun 15, 2018 at 06:03:21PM +0800, Jin Yao wrote: On workloads that do a lot of kernel entry/exits we see kernel samples, even though :u is specified. This is due to skid existing. This might be a security issue because it can leak kernel

Re: [PATCH v1 0/2] perf: Drop leaked kernel samples

2018-06-15 Thread Jin, Yao
On 6/15/2018 4:12 PM, Peter Zijlstra wrote: On Fri, Jun 15, 2018 at 04:01:45PM +0800, Jin, Yao wrote: Bring more overhead to kernel if we zero the bits considering the number of leaked samples may be not too small? Keeping the samples at least allows you to know how many samples happened

Re: [PATCH v1 0/2] perf: Drop leaked kernel samples

2018-06-15 Thread Jin, Yao
has potential conflicts with some applications. Is this proposal reasonable? Thanks Jin Yao On 6/16/2018 1:34 AM, Robert O'Callahan wrote: On Fri, Jun 15, 2018 at 10:16 AM, Kyle Huey wrote: If you want a sysctl for your own reasons that's fine. But we don't want a sysctl. We wa

Re: [PATCH v1 0/2] perf: Drop leaked kernel samples

2018-06-15 Thread Jin, Yao
On 6/16/2018 8:56 AM, Kyle Huey wrote: On Fri, Jun 15, 2018 at 5:50 PM, Jin, Yao wrote: Hi All, This patch raised many questions, I was prepared. :) I'd like to try another proposal that it adds a special flag in the returned perf_sample_data to indicate the perf binary that this s

Re: [PATCH] perf annotate: Support multiple events without group

2018-05-16 Thread Jin, Yao
Hi, Any comments for this fix? Thanks Jin Yao On 5/10/2018 9:59 PM, Jin Yao wrote: See example, perf record -e cycles,branches ./div perf annotate main --stdio or perf annotate main --stdio2 or perf annotate main The "perf annotate" should show both cycles and branches on the left

[PATCH v1 2/2] perf annotate: Create hotkey 'c' to show max/min cycles

2018-05-17 Thread Jin Yao
│↓ jne29 │↓ jmp43 │1.1020: cmpxchg %esi,__abort_msg@@GLIBC_PRIVATE+0x8a0 8.93 │1.10 1 ↓ je 43 Signed-off-by: Jin Yao --- tools/perf/ui/browsers/annotate.c | 8 tools/perf/util/annotate.c| 37 +++

[PATCH v1 0/2] perf annotate: add max/min cycles

2018-05-17 Thread Jin Yao
p43 │1.1020: cmpxchg %esi,__abort_msg@@GLIBC_PRIVATE+0x8a0 8.93 │1.10 1 ↓ je 43 Jin Yao (2): perf annotate: Record the max/min cycles perf annotate: Create hotkey 'c' to show max/min cycles tools/perf/ui/browsers/annotate.c | 8 ++ tools/pe

[PATCH v1 1/2] perf annotate: Record the max/min cycles

2018-05-17 Thread Jin Yao
cycles but also the max and min cycles. This patch records the max and min cycles. Signed-off-by: Jin Yao --- tools/perf/util/annotate.c | 14 +- tools/perf/util/annotate.h | 4 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf

Re: [PATCH v1 2/2] perf annotate: Create hotkey 'c' to show max/min cycles

2018-05-17 Thread Jin, Yao
On 5/18/2018 4:06 AM, Arnaldo Carvalho de Melo wrote: Em Thu, May 17, 2018 at 10:58:38PM +0800, Jin Yao escreveu: In perf annotate view, a new hotkey 'c' is created for showing the max/min cycles. I just changed everything from "max/min" to "min/max", as i

Re: [PATCH] perf annotate: Support multiple events without group

2018-05-17 Thread Jin, Yao
On 5/18/2018 4:27 AM, Jiri Olsa wrote: On Thu, May 17, 2018 at 01:27:50PM -0300, Arnaldo Carvalho de Melo wrote: Em Thu, May 10, 2018 at 09:59:22PM +0800, Jin Yao escreveu: See example, perf record -e cycles,branches ./div perf annotate main --stdio or perf annotate main --stdio2 or perf

[PATCH v2 0/3] perf annotate: Support '--group' option

2018-05-17 Thread Jin Yao
-- Post the patch 'perf annotate: Support multiple events without group' Jin Yao (3): perf evlist: Create a new function perf_evlist_forced_leader perf report: Use perf_evlist_forced_leader to support '--group' perf annotate: Support '--group' option

[PATCH v2 1/3] perf evlist: Create a new function perf_evlist_forced_leader

2018-05-17 Thread Jin Yao
For non-explicit group, perf report supports a option '--group' which can enable group output. We also need to support perf annotate with the same '--group'. Create a new function perf_evlist_forced_leader which contains common code to force setting the group leader. Si

[PATCH v2 2/3] perf report: Use perf_evlist_forced_leader to support '--group'

2018-05-17 Thread Jin Yao
Since we have created a new function perf_evlist_forced_leader, so now remove the old code and use perf_evlist_forced_leader instead. Signed-off-by: Jin Yao --- tools/perf/builtin-report.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/perf/builtin-report.c b

[PATCH v2 3/3] perf annotate: Support '--group' option

2018-05-17 Thread Jin Yao
or%edi,%edi :srand(s_randseed); 0.00 : 4004b3: mov$0x77359400,%ebx : :return i; :} Signed-off-by: Jin Yao --- tools/perf/builtin-annotate.c | 7 +++ 1 file changed, 7 insertions(+) di

Re: [PATCH v2 2/3] perf report: Use perf_evlist_forced_leader to support '--group'

2018-05-18 Thread Jin, Yao
On 5/18/2018 3:04 PM, Jiri Olsa wrote: On Fri, May 18, 2018 at 08:57:39PM +0800, Jin Yao wrote: Since we have created a new function perf_evlist_forced_leader, so now remove the old code and use perf_evlist_forced_leader instead. Signed-off-by: Jin Yao --- tools/perf/builtin-report.c | 8

[PATCH v3 0/3] perf annotate: Support '--group' option

2018-05-18 Thread Jin Yao
patch 'perf annotate: Support multiple events without group' Jin Yao (3): perf evlist: Create a new function perf_evlist_forced_leader perf report: Use perf_evlist_forced_leader to support '--group' perf annotate: Support '--group' option tools/perf/builtin

[PATCH v3 3/3] perf annotate: Support '--group' option

2018-05-18 Thread Jin Yao
or%edi,%edi :srand(s_randseed); 0.00 : 4004b3: mov$0x77359400,%ebx : :return i; :} Signed-off-by: Jin Yao --- tools/perf/builtin-annotate.c | 7 +++ 1 file changed, 7 insertions(+) di

[PATCH v3 2/3] perf report: Use perf_evlist_forced_leader to support '--group'

2018-05-18 Thread Jin Yao
Since we have created a new function perf_evlist_forced_leader, so now remove the old code and use perf_evlist_forced_leader instead. Signed-off-by: Jin Yao --- tools/perf/builtin-report.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/perf/builtin

[PATCH v3 1/3] perf evlist: Create a new function perf_evlist_forced_leader

2018-05-18 Thread Jin Yao
For non-explicit group, perf report supports a option '--group' which can enable group output. We also need to support perf annotate with the same '--group'. Create a new function perf_evlist_forced_leader which contains common code to force setting the group leader. Si

Re: [PATCH v3 1/3] perf evlist: Create a new function perf_evlist_forced_leader

2018-05-18 Thread Jin, Yao
On 5/18/2018 10:18 PM, Arnaldo Carvalho de Melo wrote: Em Sat, May 19, 2018 at 12:00:32AM +0800, Jin Yao escreveu: For non-explicit group, perf report supports a option '--group' which can enable group output. We also need to support perf annotate with the same '--group&

Re: [PATCH] perf stat: Poll for monitored tasks being alive in fork mode

2019-01-04 Thread Jin, Yao
On 1/4/2019 8:54 PM, Jiri Olsa wrote: On Fri, Jan 04, 2019 at 10:28:17AM +0800, Jin Yao wrote: Following test shows the stat keeps running even if no longer task to monitor (mgen exits at ~5s). perf stat -e cycles -p `pgrep mgen` -I1000 -- sleep 10 time counts unit

Re: [PATCH] perf stat: Poll for monitored tasks being alive in fork mode

2019-01-06 Thread Jin, Yao
On 1/6/2019 9:25 PM, Jiri Olsa wrote: On Sat, Jan 05, 2019 at 11:16:40AM +0800, Jin, Yao wrote: On 1/4/2019 8:54 PM, Jiri Olsa wrote: On Fri, Jan 04, 2019 at 10:28:17AM +0800, Jin Yao wrote: Following test shows the stat keeps running even if no longer task to monitor (mgen exits at ~5s

[PATCH v2] Poll for monitored tasks being alive in fork mode

2019-01-06 Thread Jin Yao
ntial race condition window, that is the child_pid set with -1 and kill(-1, SIGTERM) may happen. Jiri provides a simple method which stores the child_pid to a local variable and check the local variable before kill(). At least, we can avoid the kill(-1, SIGTERM) case. Signed-off-by: Jin Yao ---

[PATCH] perf stat: Fix endless wait for child process

2019-01-02 Thread Jin Yao
because it's waiting for the child process "sleep 1000" to be end. So perf stat doesn't return even 5s passed. This patch lets the perf stat return when the specified child process is end (in this case, specified child process is "sleep 5"). Signed-off-by: Jin Yao ---

[PATCH] perf stat: Poll for monitored tasks being alive in fork mode

2019-01-03 Thread Jin Yao
cycles 3.000609910 1,297,047,663 cycles 4.000807545 1,297,215,816 cycles 5.001001578 1,297,208,032 cycles 6.001390345582,343,659 cycles sleep: Terminated Now the stat exits immediately when the monitored tasks ends. Signed-off-by: Jin Yao

[PATCH] perf report: Fix wrong iteration count

2019-01-03 Thread Jin Yao
les:1 iter:1 avg_cycles:23) avg_cycles:23 is the average cycles of this iteration. Fixes: c4ee06251d42 ("perf report: Calculate the average cycles of iterations") Signed-off-by: Jin Yao --- tools/perf/util/callchain.c | 32 tools/perf/util/callchain.

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

2018-10-30 Thread Jin Yao
s:400) 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

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

Re: [PATCH v4 00/25] perf tool: AlderLake hybrid support series 1

2021-04-20 Thread Jin, Yao
Hi Arnaldo, Hi Jiri, Kan's patch series for AlderLake perf core support has been upstreamed, so the interface will not be changed any more. For this perf tool series (v4), do you have any comments? Thanks Jin Yao On 4/16/2021 10:04 PM, Jin Yao wrote: AlderLake uses a hybrid archite

Re: [alsa-devel] [PATCH -next] ASoC: Intel: sst_hsw: remove kfree for memory allocated with devm_kzalloc

2015-04-16 Thread Jin, Yao
For HSW, a patch "[PATCH] ASoC: Intel: Remove invalid kfree of devm allocated data" to fix this issue has been applied. But yes, we also need a similar patch for Baytrail. Thanks Jin Yao On 2015/4/16 22:08, Jarkko Nikula wrote: > On 04/16/2015 04:46 PM, weiyj...@163.com wrote:

Re: [alsa-devel] [PATCH] ASoC: Intel: fix ifnullfree.cocci warnings

2015-04-12 Thread Jin, Yao
llow. Thanks JIn Yao On 2015/4/13 3:06, kbuild test robot wrote: > sound/soc/intel/common/sst-ipc.c:287:2-7: WARNING: NULL check before freeing > functions like kfree, debugfs_remove, debugfs_remove_recursive or > usb_free_urb is not needed. Maybe consider reorganizing relevant code to

[PATCH v2 0/4] Support perf -vv

2018-03-28 Thread Jin Yao
zlib: [ 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: A

[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 --- tools/perf/builtin-version.c | 68 1 file changed, 68 insertions(+) diff --git a/tools/perf/builtin-version.c b/tool

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

2018-03-28 Thread Jin Yao
R library is not installed in build environment v2: --- Use a global variable version_verbose to count the number of 'v'. Signed-off-by: Jin Yao --- tools/perf/perf.c | 22 ++ tools/perf/perf.h | 1 + 2 files changed, 19 insertions(+), 4 deletions(-) diff --git

[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 ++

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 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 impo

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

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 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 version git version 2.14.1 T

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

2018-03-29 Thread Jin Yao
-- Use a global variable version_verbose to record the number of 'v'. Signed-off-by: Jin Yao --- 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/pe

[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
arse_options'. v2: --- 1. Use IS_BUILTIN macro to replace #ifdef/#endif block. 2. Print color for on/OFF. Signed-off-by: Jin Yao --- tools/perf/builtin-version.c | 81 +++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-

[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 --- tools/perf/Documentation/perf-version.txt | 24 1 file changed, 24 insertions(+) create mode 100644 tools/perf/Documentation/pe

[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/in

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 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 version 4.13.rc5.g4c1df1

Re: [PATCH v2 2/3] perf script python: Add more PMU fields

2018-06-06 Thread Jin, Yao
On 6/7/2018 2:36 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Jun 01, 2018 at 05:01:02PM +0800, Jin Yao escreveu: +static int get_symoff(struct symbol *sym, struct addr_location *al, + bool print_off, char *bf, int size) +{ + unsigned long offset; + + if

[PATCH] perf util: Refactor time range parsing code

2019-02-27 Thread Jin Yao
efore parsing the time string. Signed-off-by: Jin Yao --- tools/perf/builtin-report.c | 38 +++-- tools/perf/builtin-script.c | 39 +++-- tools/perf/util/time-utils.c | 51 +++- tools/perf/util/time-utils.h

Re: [PATCH] perf util: Refactor time range parsing code

2019-02-28 Thread Jin, Yao
On 3/1/2019 1:57 AM, Arnaldo Carvalho de Melo wrote: Em Thu, Feb 28, 2019 at 10:30:09PM +0800, Jin Yao escreveu: Jiri points out that we don't need any time checking and time string parsing if the --time option is not set. That makes sense. This patch refactors the time range parsing

[PATCH v2] perf util: Refactor time range parsing code

2019-02-28 Thread Jin Yao
eport --time 0%-10%,30%-40% perf script --time 0%-10%,30%-40% Select the time slices from timestamp 3971 to 3973 perf report --time 3971,3973 perf script --time 3971,3973 v2: --- Add some examples in patch description. No functional changes. Signed-off-by: Jin Yao --- tools/perf/bu

Re: [PATCH v4 3/4] perf stat: Support 'percore' event qualifier

2019-04-15 Thread Jin, Yao
On 4/16/2019 3:26 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Apr 15, 2019 at 08:09:09PM +0530, Ravi Bangoria escreveu: On 4/12/19 7:29 PM, Jin Yao wrote: diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt index 39c05f8..1e312c2 100644 --- a

[PATCH] perf annotate: Remove hist__account_cycles from callback

2019-03-12 Thread Jin Yao
For example, perf record -b ... perf annotate The before/after output should be no change. Signed-off-by: Jin Yao --- tools/perf/builtin-annotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 67

Re: [PATCH] perf annotate: Remove hist__account_cycles from callback

2019-03-14 Thread Jin, Yao
Any comments for this patch or any issue is found? In testing, I just feel it accelerates the perf annotate data processing. Thanks Jin Yao On 3/13/2019 4:22 AM, Jin Yao wrote: The hist__account_cycles is executed when the hist_iter__branch_callback is called. But it looks it's not nece

Re: [PATCH] perf annotate: Remove hist__account_cycles from callback

2019-03-14 Thread Jin, Yao
On 3/14/2019 8:04 PM, Jiri Olsa wrote: On Wed, Mar 13, 2019 at 04:22:54AM +0800, Jin Yao wrote: The hist__account_cycles is executed when the hist_iter__branch_callback is called. But it looks it's not necessary. In hist__account_cycles, it already walks on all branch entries. This

Re: [PATCH] perf annotate: Remove hist__account_cycles from callback

2019-03-14 Thread Jin, Yao
On 3/14/2019 10:17 PM, Jin, Yao wrote: On 3/14/2019 8:04 PM, Jiri Olsa wrote: On Wed, Mar 13, 2019 at 04:22:54AM +0800, Jin Yao wrote: The hist__account_cycles is executed when the hist_iter__branch_callback is called. But it looks it's not necessary. In hist__account_cycles, it al

[PATCH v2] perf annotate/report: Remove hist__account_cycles from callback

2019-03-14 Thread Jin Yao
nge. v2: --- 1. Cover the similar perf report 2. Remove the checking code "ch->reset >= ch->num / 2" Signed-off-by: Jin Yao --- tools/perf/builtin-annotate.c | 4 ++-- tools/perf/builtin-report.c | 9 +++-- tools/perf/util/annotate.c| 2 +- 3 files changed, 6 i

[PATCH v1 1/3] perf: Add a coresum event qualifier

2019-03-15 Thread Jin Yao
ed to support this per-core counting on a event level. This can be implemented in only the user tool, no kernel support needed. Signed-off-by: Jin Yao --- tools/perf/util/evsel.c| 2 ++ tools/perf/util/evsel.h| 3 +++ tools/perf/util/parse-events.c | 27 +++

[PATCH v1 0/3] perf: Support a new coresum event qualifier

2019-03-15 Thread Jin Yao
an already support per-core counting with --per-core, but it's often useful to do this together with other metrics that are collected per CPU (per hardware thread). So this patch series supports this per-core counting on a event level. Jin Yao (3): perf: Add a coresum event qualifier per

[PATCH v1 3/3] perf test: Add a simple test for term coresum

2019-03-15 Thread Jin Yao
It's a simple test which just checks if parser works. Signed-off-by: Jin Yao --- tools/perf/tests/parse-events.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 4a69c07..8d741d4 100644

[PATCH v1 2/3] perf stat: Support coresum event qualifier

2019-03-15 Thread Jin Yao
r-core and per-CPU in one perf stat command-line. From the output, we can see: S0-C0 = CPU0 + CPU4 S0-C1 = CPU1 + CPU5 S0-C2 = CPU2 + CPU6 S0-C3 = CPU3 + CPU7 So the result is expected (tiny difference is ignored). Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-stat.txt | 4

Re: [PATCH v2] perf annotate/report: Remove hist__account_cycles from callback

2019-03-15 Thread Jin, Yao
On 3/15/2019 8:54 PM, Jiri Olsa wrote: On Fri, Mar 15, 2019 at 09:46:01PM +0800, Jin Yao wrote: The hist__account_cycles is executed when the hist_iter__branch_callback is called. But it looks it's not necessary. In hist__account_cycles, it already walks on all branch entries. This

[PATCH v3] perf annotate/report: Remove hist__account_cycles from callback

2019-03-15 Thread Jin Yao
o change. v3: --- Fix the crash in stdio mode. Like previous code, it needs the checking of ui__has_annotation() before hist__account_cycles() v2: --- 1. Cover the similar perf report 2. Remove the checking code "ch->reset >= ch->num / 2" Signed-off-by: Jin Yao --- too

Re: [PATCH v3 0/4] perf: Support a new 'percore' event qualifier

2019-04-09 Thread Jin, Yao
Hi Arnaldo, Can this patch be accepted? Thanks Jin Yao On 3/19/2019 6:20 PM, Jiri Olsa wrote: On Tue, Mar 19, 2019 at 04:56:52PM +0800, Jin Yao wrote: The 'percore' event qualifier which sums up the event counts for both hardware threads in a core. For example, perf stat -e c

Re: [PATCH v3 1/4] perf: Add a 'percore' event qualifier

2019-04-10 Thread Jin, Yao
On 4/10/2019 8:54 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 10, 2019 at 09:36:41AM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Mar 19, 2019 at 04:56:53PM +0800, Jin Yao escreveu: Add a 'percore' event qualifier, like cpu/event=0,umask=0x3,percore=1/, that sums up

Re: [PATCH v1 1/3] perf diff: Support --time filter option

2019-02-25 Thread Jin, Yao
On 2/25/2019 9:38 PM, Jiri Olsa wrote: On Mon, Feb 25, 2019 at 09:42:42PM +0800, Jin Yao wrote: SNIP COMPARISON -- The comparison is governed by the baseline file. The baseline perf.data diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 751e197..ddc41e7

Re: [PATCH v1 1/3] perf diff: Support --time filter option

2019-02-25 Thread Jin, Yao
On 2/25/2019 10:19 PM, Jiri Olsa wrote: On Mon, Feb 25, 2019 at 10:12:08PM +0800, Jin, Yao wrote: On 2/25/2019 9:38 PM, Jiri Olsa wrote: On Mon, Feb 25, 2019 at 09:42:42PM +0800, Jin Yao wrote: SNIP COMPARISON -- The comparison is governed by the baseline file. The

[PATCH v2 3/3] perf diff: Support --pid/--tid filter options

2019-02-25 Thread Jin Yao
For better filtering support for perf diff, it would be useful to add --pid and --tid filter options. For example, perf diff --tid 13965 It only diff the samples for thread 13965. v2: --- No functional change. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 6

[PATCH v2 1/3] perf diff: Support --time filter option

2019-02-25 Thread Jin Yao
e, put the time string processing code to separate functions and align the memebers in perf_diff. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 41 tools/perf/builtin-diff.c | 167 ++--- 2 files changed, 195 insertion

[PATCH v2 2/3] perf diff: Support --cpu filter option

2019-02-25 Thread Jin Yao
samples for CPU0 and CPU1. v2: --- No functional change. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 5 + tools/perf/builtin-diff.c | 16 2 files changed, 21 insertions(+) diff --git a/tools/perf/Documentation/perf-diff.txt b/tools

[PATCH v2 0/3] perf diff: Add new filter options

2019-02-25 Thread Jin Yao
diff: Support --time filter option" according to Jiri's comments. Others are no functional changes. Jin Yao (3): perf diff: Support --time filter option perf diff: Support --cpu filter option perf diff: Support --pid/--tid filter options tools/perf/Documentation/

Re: [PATCH v2 1/3] perf diff: Support --time filter option

2019-02-27 Thread Jin, Yao
On 2/27/2019 5:28 PM, Jiri Olsa wrote: On Tue, Feb 26, 2019 at 08:11:07PM +0800, Jin Yao wrote: SNIP + .ordered_events = true, + .ordering_requires_timestamps = true, + }, }; static struct perf_evsel *evsel_match(struct perf_evsel *evsel

Re: [PATCH v2 1/3] perf diff: Support --time filter option

2019-02-27 Thread Jin, Yao
On 2/27/2019 5:27 PM, Jiri Olsa wrote: On Tue, Feb 26, 2019 at 08:11:07PM +0800, Jin Yao wrote: SNIP + abstime_tmp = abstime_ostr; data__for_each_file(i, d) { - d->session = perf_session__new(&d->data, false, &tool); + d->session =

Re: [PATCH v2 1/3] perf diff: Support --time filter option

2019-02-27 Thread Jin, Yao
On 2/27/2019 9:10 PM, Jiri Olsa wrote: On Wed, Feb 27, 2019 at 08:51:44PM +0800, Jin, Yao wrote: On 2/27/2019 5:28 PM, Jiri Olsa wrote: On Tue, Feb 26, 2019 at 08:11:07PM +0800, Jin Yao wrote: SNIP + .ordered_events = true, + .ordering_requires_timestamps

Re: [drm/i915/gt] 8c3b1ba0e7: perf-sanity-tests.Parse_event_definition_strings.fail

2021-02-25 Thread Jin, Yao
. So the easy way is to rename "software-gt-awake-time" to "gt-awake-time", right? Otherwise we have to hardcode something in perf tool. What do you think of this issue and the solution? BTW, as the robot reported, it's related to the

Re: [PATCH 00/49] Add Alder Lake support for perf

2021-02-17 Thread Jin, Yao
On 2/12/2021 12:22 AM, Liang, Kan wrote: On 2/11/2021 6:40 AM, Jiri Olsa wrote: On Mon, Feb 08, 2021 at 07:24:57AM -0800, kan.li...@linux.intel.com wrote: SNIP Jin Yao (24):    perf jevents: Support unit value "cpu_core" and "cpu_atom"    perf util: Sav

Re: [PATCH v9] perf stat: Fix wrong skipping for per-die aggregation

2021-02-17 Thread Jin, Yao
Hi Arnaldo, On 2/1/2021 6:27 AM, Jiri Olsa wrote: On Thu, Jan 28, 2021 at 09:34:17AM +0800, Jin Yao wrote: Uncore becomes die-scope on Xeon Cascade Lake-AP and perf has supported --per-die aggregation yet. One issue is found in check_per_pkg() for uncore events running on AP system. On

[PATCH] perf report: Create option to disable raw event ordering

2021-02-18 Thread Jin Yao
ordered_events for raw dump") Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-report.txt | 3 +++ tools/perf/builtin-report.c | 5 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/per

Re: [PATCH] perf metricgroup: Fix segmentation fault for metrics with no pmu event

2021-02-02 Thread Jin, Yao
Hi John, On 2/2/2021 4:15 PM, John Garry wrote: On 02/02/2021 02:24, Jin Yao wrote: Hit a segmentation fault for DRAM_BW_Use on SKL/KBL.    # perf stat -M DRAM_BW_Use -a -- sleep 1    Segmentation fault (core dumped)    (gdb) backtrace    #0  __strcmp_sse2_unaligned () at ../sysdeps/x86_64

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