Re: [PATCH] perf list: Hide deprecated events by default

2019-10-16 Thread Jin, Yao
On 10/16/2019 6:27 PM, Jiri Olsa wrote: On Wed, Oct 16, 2019 at 06:22:06PM +0800, Jin, Yao wrote: On 10/16/2019 3:27 PM, Jiri Olsa wrote: On Wed, Oct 16, 2019 at 08:59:13AM +0800, Jin, Yao wrote: On 10/15/2019 5:14 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:57AM +0800, Jin Yao

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-16 Thread Jin, Yao
On 10/16/2019 6:15 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP +static struct block_header_column{ + const char *name; + int width; +} block_columns[PERF_HPP_REPORT__BLOCK_MAX_INDEX] = { + [PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_COV

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-16 Thread Jin, Yao
On 10/16/2019 8:53 PM, Jiri Olsa wrote: On Wed, Oct 16, 2019 at 06:51:07PM +0800, Jin, Yao wrote: On 10/16/2019 6:15 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP +static struct block_header_column{ + const char *name; + int width

[PATCH v2] perf list: Separate the deprecated events

2019-10-17 Thread Jin Yao
display the deprecated events under the title "--- Following are deprecated events ---". Signed-off-by: Jin Yao --- tools/perf/pmu-events/jevents.c| 26 -- tools/perf/pmu-events/jevents.h| 3 +- tools/perf/pmu-events/pmu-events.h | 1 +

Re: [PATCH v2] perf list: Separate the deprecated events

2019-10-17 Thread Jin, Yao
g to back this up ;-) if that's the case we can go with the original patch jirka I'm fine to go with the original patch. :) Thanks Jin Yao So I think the only sane option is to hide it by default. -Andi

Re: [PATCH] perf list: Hide deprecated events by default

2019-10-18 Thread Jin, Yao
Since now we go back to this version, can this patch be accepted? Thanks Jin Yao On 10/15/2019 10:53 AM, Jin Yao wrote: There are some deprecated events listed by perf list. But we can't remove them from perf list with ease because some old scripts may use them. Deprecated events ar

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-20 Thread Jin, Yao
On 10/16/2019 8:53 PM, Jiri Olsa wrote: On Wed, Oct 16, 2019 at 06:51:07PM +0800, Jin, Yao wrote: On 10/16/2019 6:15 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP +static struct block_header_column{ + const char *name; + int width

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jin, Yao
On 10/22/2019 12:07 AM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -51,6 +51,7 @@ #include "util/util.h" // perf_tip() #include "ui/ui.h" #include "

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jin, Yao
On 10/22/2019 12:08 AM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP + cycles += bi->cycles_aggr / bi->num_aggr; + + he_block = hists__add_entry_block(&bh-&g

[PATCH v3 0/5] perf report: Support sorting all blocks by cycles

2019-10-22 Thread Jin Yao
and tui. And also with the supporting of --percent-limit. v3: --- 1. Move common block info functions to block-info.h/block-info.c 2. Remove nasty hack for skipping calculation of column length. 3. Some minor cleanup. v2: --- Rebase to perf/core branch Jin Yao (5): perf util: C

[PATCH v3 1/5] perf util: Cleanup and refactor block info functions

2019-10-22 Thread Jin Yao
more common part to block-info, such as block_info__process_sym. 4. Remove the nasty hack for skipping calculation of column length Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c| 118 tools/perf/util/Build| 1 + tools/perf/util/block-i

[PATCH v3 4/5] perf report: Support --percent-limit for total_cycles

2019-10-22 Thread Jin Yao
116.0K0.42% 19 [random_r.c:357 -> random_r.c:394] libc-2.27.so It only shows the entries which 'Sampled Cycles%' > 1%. v3: --- Minor change since the function name is changed: block_total_cycles_percent -> block_info__

[PATCH v3 5/5] perf report: Sort by sampled cycles percent per block for tui

2019-10-22 Thread Jin Yao
57 -> random_r.c:394] libc-2.27.so v3: --- Minor change since the function name is changed: block_total_cycles_percent -> block_info__total_cycles_percent Signed-off-by: Jin Yao --- tools/perf/builtin-report.c| 30 +--- tools/perf/ui/browsers/hists.c | 62 +++

[PATCH v3 2/5] perf util: Count the total cycles of all samples

2019-10-22 Thread Jin Yao
a new argument 'total_cycles' in hist__account_cycles(), which will be added with the cycles of each sample. Signed-off-by: Jin Yao --- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-diff.c | 3 ++- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-top.c | 3 ++-

[PATCH v3 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-22 Thread Jin Yao
1 [perf_event_nmi_handler+57 -> perf_event_nmi_handler+63] [kernel.kallsyms] 0.00% 10.02% 1 [perf_event_nmi_handler+68 -> perf_event_nmi_handler+74] [kernel.kallsyms] v3: --- 1. Use common function block_info__pr

[PATCH] perf pmu-events: Fix the missing "cpu_clk_unhalted.core"

2019-07-29 Thread Jin Yao
E_RUNNING disabled 1 inherit 1 exclude_guest1 ... Signed-off-by: Jin Yao --- tools/perf/pmu-events/jevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/pm

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

2019-01-21 Thread Jin, Yao
Hi Arnaldo, Is this patch acceptable? Thanks Jin Yao On 1/7/2019 5:05 PM, Jiri Olsa wrote: On Mon, Jan 07, 2019 at 09:00:50AM +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

[PATCH v1 7/9] perf diff: Compute cycles diff of basic blocks

2019-05-19 Thread Jin Yao
In previous patch, we have already linked up the same basic blocks. Now we compute the cycles diff value of basic blocks, in order to sort by diff cycles later. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 31 +++ tools/perf/util/sort.h| 2 ++ 2 files

[PATCH v1 8/9] perf diff: Print the basic block cycles diff

2019-05-19 Thread Jin Yao
) 0 __random (3ab03:3ab0f) 0 __random (3ab14:3ab1b) 0 __random (3ab28:3ab2e) 0 __random (3ab4a:3ab53) Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 168 ++ tools/perf/util/hist.c| 2 +- tools

[PATCH v1 9/9] perf diff: Documentation --basic-block option

2019-05-19 Thread Jin Yao
Documentation the new option '--basic-block'. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt index da7809b..b242af8 100644 -

[PATCH v1 6/9] perf diff: Link same basic blocks among different data files

2019-05-19 Thread Jin Yao
-off-by: Jin Yao --- tools/perf/builtin-diff.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 09551fe..72c33ab 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c

[PATCH v1 4/9] perf diff: Get a list of symbols(functions)

2019-05-19 Thread Jin Yao
, which will be used in next patch for accounting cycles per basic block per function. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 81 ++- 1 file changed, 73 insertions(+), 8 deletions(-) diff --git a/tools/perf/builtin-diff.c b/tools/perf

[PATCH v1 0/9] perf diff: diff cycles at basic block level

2019-05-19 Thread Jin Yao
erf-diff option, which enables the displaying of cycles difference of same program basic block amongst two or more perf.data. The program basic block is the code block between two branches in a function. Jin Yao (9): perf util: Create block_info structure perf util: Add block_info in hist_entry p

[PATCH v1 3/9] perf diff: Check if all data files with branch stacks

2019-05-19 Thread Jin Yao
We will expand perf diff to support diff cycles of individual programs blocks, so it requires all data files having branch stacks. This patch checks HEADER_BRANCH_STACK in header, and only set the flag has_br_stack when HEADER_BRANCH_STACK are set in all data files. Signed-off-by: Jin Yao

[PATCH v1 2/9] perf util: Add block_info in hist_entry

2019-05-19 Thread Jin Yao
field to hist_entry. In order not to impact current interface, we creates a new function hists__add_entry_block. Signed-off-by: Jin Yao --- tools/perf/util/hist.c | 22 -- tools/perf/util/hist.h | 6 ++ tools/perf/util/sort.h | 1 + 3 files changed, 27 insertions(+), 2

[PATCH v1 1/9] perf util: Create block_info structure

2019-05-19 Thread Jin Yao
(function), start/end addrress of this block, cycles. This patch creates this structure and with some ops. Signed-off-by: Jin Yao --- tools/perf/util/symbol.c | 22 ++ tools/perf/util/symbol.h | 23 +++ 2 files changed, 45 insertions(+) diff --git a/tools/perf

[PATCH v1 5/9] perf diff: Use hists to manage basic blocks

2019-05-19 Thread Jin Yao
compare, sort and print the basic blocks. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 145 ++ 1 file changed, 145 insertions(+) diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index e067ac6..09551fe 100644 --- a/tools/perf

Re: [PATCH v1 8/9] perf diff: Print the basic block cycles diff

2019-05-23 Thread Jin, Yao
On 5/22/2019 10:04 PM, Jiri Olsa wrote: On Mon, May 20, 2019 at 09:27:55PM +0800, Jin Yao wrote: Currently we only support sorting by diff cycles. For example, perf record -b ./div perf record -b ./div perf diff --basic-block # Cycles diff Basic block (start:end

[PATCH] perf diff: Report noisy for cycles diff

2019-07-12 Thread Jin Yao
2.27.so [.] rand 2.14%[rand@plt+0 -> rand@plt+0]0 ± 0.0%div[.] rand@plt Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 5 ++ tools/perf/builtin-diff.c | 94 +++---

Re: [PATCH v3] perf diff: Report noisy for cycles diff

2019-08-12 Thread Jin, Yao
On 8/12/2019 4:35 PM, Jiri Olsa wrote: On Sat, Aug 10, 2019 at 07:30:29AM +0800, Jin Yao wrote: SNIP static int process_block_per_sym(struct hist_entry *he) @@ -684,6 +694,21 @@ static struct hist_entry *get_block_pair(struct hist_entry *he, return NULL; } +static void

Re: [PATCH v3] perf diff: Report noisy for cycles diff

2019-08-12 Thread Jin, Yao
On 8/12/2019 4:35 PM, Jiri Olsa wrote: On Sat, Aug 10, 2019 at 07:30:29AM +0800, Jin Yao wrote: SNIP + + init_stats(&pair->diff.stats); + init_spark_values(pair->diff.svals, NUM_SPARKS); + + for (int i = 0; i < pair->bl

Re: [PATCH v3] perf diff: Report noisy for cycles diff

2019-08-12 Thread Jin, Yao
On 8/12/2019 4:35 PM, Jiri Olsa wrote: On Sat, Aug 10, 2019 at 07:30:29AM +0800, Jin Yao wrote: SNIP + if (vals[i] != 0) + return 0; + return 1; +} + +static int print_cycles_spark(char *bf, int size, unsigned long *svals, u64 n) +{ + int len

[PATCH v4] perf diff: Report noisy for cycles diff

2019-08-13 Thread Jin Yao
n function ‘compute_cycles_diff’: builtin-diff.c:712:10: error: taking the absolute value of unsigned type ‘u64’ {aka ‘long unsigned int’} has no effect [-Werror=absolute-value] 712 | labs(pair->block_info->cycles_spark[i] - | ^~~~ Because the result of u64 - u64 is s

[PATCH v3] perf diff: Report noisy for cycles diff

2019-08-09 Thread Jin Yao
iff.c: In function ‘compute_cycles_diff’: builtin-diff.c:712:10: error: taking the absolute value of unsigned type ‘u64’ {aka ‘long unsigned int’} has no effect [-Werror=absolute-value] 712 | labs(pair->block_info->cycles_spark[i] - | ^~~~ Because the re

[PATCH v2] perf diff: Report noisy for cycles diff

2019-07-24 Thread Jin Yao
diff.c:712:10: error: taking the absolute value of unsigned type ‘u64’ {aka ‘long unsigned int’} has no effect [-Werror=absolute-value] 712 | labs(pair->block_info->cycles_spark[i] - | ^~~~ Because the result of u64 - u64 is still u64. No

Re: [PATCH v2] perf diff: Report noisy for cycles diff

2019-08-05 Thread Jin, Yao
Hi, Any comments for this version? Thanks Jin Yao On 7/25/2019 6:14 AM, Jin Yao wrote: This patch prints the stddev and hist for the cycles diff of program block. It can help us to understand if the cycles diff is noisy or not. This patch is inspired by Andi Kleen's patch https://lw

Re: [PATCH] perf pmu-events: Fix the missing "cpu_clk_unhalted.core"

2019-08-05 Thread Jin, Yao
On 7/30/2019 9:43 AM, Jin, Yao wrote: On 7/30/2019 2:16 AM, Andi Kleen wrote: diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index 1a91a197cafb..d413761621b0 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -453,6 +453,7

Re: [PATCH v2] perf diff: Report noisy for cycles diff

2019-08-06 Thread Jin, Yao
On 8/6/2019 4:34 PM, Jiri Olsa wrote: On Thu, Jul 25, 2019 at 06:14:32AM +0800, Jin Yao wrote: SNIP static int cycles_printf(struct hist_entry *he, struct hist_entry *pair, -struct perf_hpp *hpp, int width) +struct perf_hpp *hpp, int width

Re: [PATCH v2] perf diff: Report noisy for cycles diff

2019-08-06 Thread Jin, Yao
On 8/6/2019 4:34 PM, Jiri Olsa wrote: On Thu, Jul 25, 2019 at 06:14:32AM +0800, Jin Yao wrote: SNIP +} + double avg_stats(struct stats *stats) { return stats->mean; diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h index 95b4de7a9d51..3448d319a220 100644 --- a/to

Re: [PATCH v2] perf diff: Report noisy for cycles diff

2019-08-06 Thread Jin, Yao
On 8/6/2019 4:34 PM, Jiri Olsa wrote: On Thu, Jul 25, 2019 at 06:14:32AM +0800, Jin Yao wrote: This patch prints the stddev and hist for the cycles diff of program block. It can help us to understand if the cycles diff is noisy or not. This patch is inspired by Andi Kleen's patch

Re: [PATCH] perf pmu-events: Fix the missing "cpu_clk_unhalted.core"

2019-07-29 Thread Jin, Yao
he fixed counter encodings between JSON and perf. If big cores don't have this event, nothing will be generated in perf list. In big cores pipeline.json, there is only "CPU_CLK_UNHALTED.THREAD", and there is no "CPU_CLK_UNHALTED.CORE" defined. So at least for now, CPU_CLK_UNHALTED.CORE will not be generated for big core. Thanks Jin Yao

Re: [PATCH] perf pmu-events: Fix the missing "cpu_clk_unhalted.core"

2019-08-08 Thread Jin, Yao
On 8/8/2019 9:56 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Jul 29, 2019 at 03:27:55PM +0800, Jin Yao escreveu: The events defined in pmu-events JSON are parsed and added into perf tool. For fixed counters, we handle the encodings between JSON and perf by using a static array fixed[]. But

Re: [PATCH v4 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-24 Thread Jin, Yao
On 6/24/2019 3:57 PM, Jiri Olsa wrote: On Thu, Jun 20, 2019 at 10:36:39PM +0800, Jin Yao wrote: SNIP + +static void *block_entry_zalloc(size_t size) +{ + return zalloc(size + sizeof(struct hist_entry)); +} + +static void block_entry_free(void *he) +{ + struct block_info *bi

Re: [PATCH v4 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-25 Thread Jin, Yao
On 6/25/2019 5:11 PM, Jiri Olsa wrote: On Thu, Jun 20, 2019 at 10:36:39PM +0800, Jin Yao wrote: SNIP + +static void *block_entry_zalloc(size_t size) +{ + return zalloc(size + sizeof(struct hist_entry)); +} + +static void block_entry_free(void *he) +{ + struct block_info *bi

[PATCH v5 3/7] perf diff: Check if all data files with branch stacks

2019-06-26 Thread Jin Yao
check_file_brstack() from __cmd_diff() to cmd_diff(). Because later patch will check flag 'has_br_stack' before ui_init(). Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 29 + 1 file changed, 29 insertions(+) diff --git a/tools/perf/builtin-diff.c b/tools/pe

[PATCH v5 7/7] perf diff: Documentation -c cycles option

2019-06-26 Thread Jin Yao
Documentation the new computation selection 'cycles'. v4: --- Change the column 'Block cycles diff [start:end]' to '[Program Block Range] Cycles Diff' Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 17 ++--- 1 file changed,

[PATCH v5 2/7] perf util: Add block_info in hist_entry

2019-06-26 Thread Jin Yao
field to hist_entry. In order not to impact current interface, we creates a new function hists__add_entry_block. Signed-off-by: Jin Yao --- tools/perf/util/hist.c | 22 -- tools/perf/util/hist.h | 6 ++ tools/perf/util/sort.h | 1 + 3 files changed, 27 insertions(+), 2

[PATCH v5 6/7] perf diff: Print the basic block cycles diff

2019-06-26 Thread Jin Yao
the 'Baseline' and 'Shared Object'. The output is sorted by "Baseline" and the basic blocks in the same function are sorted by cycles diff. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 80 --- tools/perf/ui/stdi

[PATCH v5 5/7] perf diff: Link same basic blocks among different data

2019-06-26 Thread Jin Yao
data files. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 90 +++ 1 file changed, 90 insertions(+) diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index ff2c076..864423a 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/buil

[PATCH v5 0/7] perf diff: diff cycles at basic block level

2019-06-26 Thread Jin Yao
pdate_blocked_averages (2bf980:2bf9d3) 48 update_blocked_averages (2bf934:2bf942) -35 native_write_msr (267900:26790b) 26 native_irq_return_iret (c00a27:c00a27) 22 rcu_check_callbacks (2febb6:2febdc) -21 __hrtimer_run_queues (30b220:30b2a3)

[PATCH v5 1/7] perf util: Create block_info structure

2019-06-26 Thread Jin Yao
(function), start/end address of this block, cycles. This patch creates this structure and with some ops. Signed-off-by: Jin Yao --- tools/perf/util/symbol.c | 22 ++ tools/perf/util/symbol.h | 23 +++ 2 files changed, 45 insertions(+) diff --git a/tools/perf

[PATCH v5 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-26 Thread Jin Yao
abs() -> labs(), in block_cycles_diff_cmp(). v2: --- v1 adds the basic block entries to per data-file hists but v2 adds the basic block entries to per symbol hists. That is to keep current perf-diff format. Will show the result in next patches. Signed-off-by: Jin Yao --- tools/perf/b

Re: [PATCH v5 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-27 Thread Jin, Yao
On 6/27/2019 3:27 PM, Jiri Olsa wrote: On Thu, Jun 27, 2019 at 10:09:26PM +0800, Jin Yao wrote: SNIP + +static int process_block_per_sym(struct hist_entry *he) +{ + struct annotation *notes; + struct cyc_hist *ch; + struct block_hist *bh; + + if (!he->ms.map ||

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-10 Thread Jin, Yao
On 6/8/2019 7:41 PM, Jin, Yao wrote: On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 43623fa..d1641da 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h

Re: [PATCH v6 5/7] perf diff: Link same basic blocks among different data

2019-07-02 Thread Jin, Yao
On 7/3/2019 12:20 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Jul 02, 2019 at 01:17:39PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Jun 28, 2019 at 05:23:02PM +0800, Jin Yao escreveu: The target is to compare the performance difference (cycles diff) for the same basic blocks in

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-08 Thread Jin, Yao
On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 43623fa..d1641da 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -79,6 +79,9 @@ struct hist_entry_diff

[PATCH v6 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-27 Thread Jin Yao
ymbol hists. That is to keep current perf-diff format. Will show the result in next patches. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 190 +- tools/perf/util/hist.c| 3 + tools/perf/util/sort.h| 12 +++ 3 files changed, 202 insertions

[PATCH v6 2/7] perf util: Add block_info in hist_entry

2019-06-27 Thread Jin Yao
field to hist_entry. In order not to impact current interface, we creates a new function hists__add_entry_block. v6: --- Remove the 'ops' argument in hists__add_entry_block Signed-off-by: Jin Yao --- tools/perf/util/hist.c | 20 ++-- tools/perf/util/hist.h | 5 ++

[PATCH v6 5/7] perf diff: Link same basic blocks among different data

2019-06-27 Thread Jin Yao
data files. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 90 +++ 1 file changed, 90 insertions(+) diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 83b8c0f..823f162 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/buil

[PATCH v6 3/7] perf diff: Check if all data files with branch stacks

2019-06-27 Thread Jin Yao
check_file_brstack() from __cmd_diff() to cmd_diff(). Because later patch will check flag 'has_br_stack' before ui_init(). Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 29 + 1 file changed, 29 insertions(+) diff --git a/tools/perf/builtin-diff.c b/tools/pe

[PATCH v6 0/7] perf diff: diff cycles at basic block level

2019-06-27 Thread Jin Yao
-35 native_write_msr (267900:26790b) 26 native_irq_return_iret (c00a27:c00a27) 22 rcu_check_callbacks (2febb6:2febdc) -21 __hrtimer_run_queues (30b220:30b2a3) 19 pvclock_gtod_notify (14ba0:14c1b) -18 task_tick_fair (2c5d29:2c5d41)

[PATCH v6 1/7] perf util: Create block_info structure

2019-06-27 Thread Jin Yao
(function), start/end address of this block, cycles. This patch creates this structure and with some ops. Signed-off-by: Jin Yao --- tools/perf/util/symbol.c | 22 ++ tools/perf/util/symbol.h | 23 +++ 2 files changed, 45 insertions(+) diff --git a/tools/perf

[PATCH v6 6/7] perf diff: Print the basic block cycles diff

2019-06-27 Thread Jin Yao
the 'Baseline' and 'Shared Object'. The output is sorted by "Baseline" and the basic blocks in the same function are sorted by cycles diff. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 80 --- tools/perf/ui/stdi

[PATCH v6 7/7] perf diff: Documentation -c cycles option

2019-06-27 Thread Jin Yao
Documentation the new computation selection 'cycles'. v4: --- Change the column 'Block cycles diff [start:end]' to '[Program Block Range] Cycles Diff' Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 17 ++--- 1 file changed,

Re: [PATCH] perf/x86/intel: Fix spurious NMI on fixed counter

2019-07-04 Thread Jin, Yao
x86_pmu_disable_event(event); oops, I overlooed this, looks good Acked-by: Jiri Olsa thanks, jirka Hi, Could this fix be accepted? Thanks Jin Yao /* * Needs to be called after x86_pmu_disable_event, -- 2.14.5

Re: [PATCH] perf/core: don't WARN for impossible rb sizes

2019-02-12 Thread Jin, Yao
On 2/12/2019 9:07 PM, Peter Zijlstra wrote: On Tue, Feb 12, 2019 at 10:42:38AM +0800, Jin, Yao wrote: diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c index 4a9937076331..309ef5a64af5 100644 --- a/kernel/events/ring_buffer.c +++ b/kernel/events/ring_buffer.c @@ -734,6

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

2019-02-24 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. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 6 ++ tools/perf/builtin-diff.c

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

2019-02-24 Thread Jin Yao
samples for CPU0 and CPU1. 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/perf/Documentation/perf-diff.txt

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

2019-02-24 Thread Jin Yao
3971.150589 ... perf diff --time 3946.361400,:3971.150589, It analyzes the perf.data.old from the timestamp 3946.361400 to the end of perf.data.old and analyzes the perf.data from the timestamp 3971.150589 to the end of perf.data. Signed-off-by: Jin Yao --- tools/perf/Documentat

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

2019-02-24 Thread Jin Yao
s for CPU0 and CPU1. --pid: Only diff samples for given process ID (comma separated list). --tid: Only diff samples for given thread ID (comma separated list). For example, perf diff --tid 13965 It only diff the samples for thread 13965. Jin Yao (3): perf diff: Support -

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

2019-03-03 Thread Jin Yao
diff: Support --time filter option" according to Jiri's comments. Others are no logical 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/pe

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

2019-03-03 Thread Jin Yao
samples for CPU0 and CPU1. v3: --- No logical changes 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/perf

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

2019-03-03 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. v3: --- No logical changes. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 6

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

2019-03-03 Thread Jin Yao
is not set. Refactor the code to make it simpler. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 41 ++ tools/perf/builtin-diff.c | 136 + 2 files changed, 164 insertions(+), 13 deletions(-) diff --git a/tools/perf/Docu

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

2019-03-04 Thread Jin, Yao
On 3/4/2019 11:41 PM, Jiri Olsa wrote: On Mon, Mar 04, 2019 at 08:52:38PM +0800, Jin Yao wrote: For better support for perf diff, it would be useful to add --time filter option to diff the samples within given time window. It supports time percent with multipe time ranges. Time string is &#

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

2019-03-04 Thread Jin Yao
samples for CPU0 and CPU1. v4: --- No logical changes 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/perf

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

2019-03-04 Thread Jin Yao
it return error if strdup is failed, and update __cmd_diff() accordingly. Only the patch "perf diff: Support --time filter option" is impacted Others are no logical changes. Jin Yao (3): perf diff: Support --time filter option perf diff: Support --cpu filter option perf di

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

2019-03-04 Thread Jin Yao
dup is failed, and update __cmd_diff() accordingly. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 41 + tools/perf/builtin-diff.c | 148 + 2 files changed, 175 insertions(+), 14 deletions(-) diff --git a/tools/perf/

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

2019-03-04 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. v4: --- No logical changes. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 6

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

2018-09-09 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/x86/intel/uncore: Provide alias for IIO free-running boxes on SKX

2018-09-03 Thread Jin Yao
or 'system wide': 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 remo

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 v4 3/3] perf annotate: Support '--group' option

2018-05-21 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 v4 0/3] perf annotate: Support '--group' option

2018-05-21 Thread Jin Yao
27;perf annotate: Support multiple events without group' Jin Yao (3): perf evlist: Create new function perf_evlist__force_leader perf report: Use perf_evlist__force_leader to support '--group' perf annotate: Support '--group' option tools/perf/builtin-annotate.c

[PATCH v4 2/3] perf report: Use perf_evlist__force_leader to support '--group'

2018-05-21 Thread Jin Yao
Since we have created a new function perf_evlist__force_leader, so now remove the old code and use perf_evlist__force_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 v4 1/3] perf evlist: Create new function perf_evlist__force_leader

2018-05-21 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__force_leader which contains common code to force setting the group leader. Si

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

2018-05-21 Thread Jin, Yao
On 5/22/2018 1:43 AM, Arnaldo Carvalho de Melo wrote: Em Mon, May 21, 2018 at 10:57:46PM +0800, Jin Yao escreveu: With the '--group' option, even for non-explicit group, perf annotate will enable the group output. For example, perf record -e cycles,branches ./div perf annotate ma

[PATCH] perf annotate: Show group event string for stdio

2018-05-21 Thread Jin Yao
4407 samples) .. The first line doesn't include the event 'branches'. With this patch, it will show the correct group even string. perf annotate --group --stdio Percent | Source code & Disassembly of div for cycles, branches (44407 samples) ......

[PATCH v4 0/6] Support perf -vv

2018-03-29 Thread Jin Yao
thers 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

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

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

2018-03-29 Thread Jin Yao
ld environment 2. Create '--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 --- tools/perf/builtin-version.c | 82 +++

[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 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 --- tools/perf/Makefile.config | 2 +- tools/perf/util/dwarf-aux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

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

2018-03-29 Thread Jin Yao
bpf: [ on ] # HAVE_LIBBPF_SUPPORT 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 --- tools/perf/perf.c | 6 ++ too

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 "

[PATCH] perf annotate: Display multiple events for --stdio

2018-05-09 Thread Jin Yao
04b1: xor%edi,%edi :srand(s_randseed); 0.000.00 : 4004b3: mov$0x77359400,%ebx : :return i; : } Signed-off-by: Jin Yao --- tools/perf/util/annotate.c | 3 +++

Re: [PATCH] perf annotate: Display multiple events for --stdio

2018-05-09 Thread Jin, Yao
On 5/10/2018 12:42 AM, Arnaldo Carvalho de Melo wrote: Em Wed, May 09, 2018 at 11:57:15PM +0800, Jin Yao escreveu: When we perform following command lines: perf record -e "{cycles,branches}" ./div perf annotate main --stdio Only shows one event "cycles" and the disp

Re: [PATCH] perf annotate: Display multiple events for --stdio

2018-05-09 Thread Jin, Yao
On 5/10/2018 1:24 AM, Arnaldo Carvalho de Melo wrote: Em Wed, May 09, 2018 at 01:42:51PM -0300, Arnaldo Carvalho de Melo escreveu: Em Wed, May 09, 2018 at 11:57:15PM +0800, Jin Yao escreveu: When we perform following command lines: perf record -e "{cycles,branches}" ./div perf ann

[PATCH] perf annotate: Support multiple events without group

2018-05-09 Thread Jin Yao
for (i = 0; i < 20; i++) { flag = compute_flag(); 4.85 5.83 38: xor%eax,%eax 0.01 0.01 → callq compute_flag count++; 4.44 2.27movcount,%edx 0.00 0.00add

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

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