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

2018-01-09 Thread Jin Yao
--buildid-all' is enabled, needs to set '--timestamp-boundary')." Signed-off-by: Jin Yao --- 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 10

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

2018-01-09 Thread Jin Yao
umber 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: Su

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

2018-01-08 Thread Jin, Yao
cify which one is wanted" when you notice 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

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

Re: [PATCH v7 2/6] perf record: Get the first sample time and last sample time

2018-01-05 Thread Jin, Yao
On 1/5/2018 8:53 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Jan 05, 2018 at 09:15:03AM +0800, Jin, Yao escreveu: On 1/5/2018 3:09 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 08, 2017 at 09:13:42PM +0800, Jin Yao escreveu: In the default 'perf record' configuration, all s

Re: [PATCH v7 2/6] perf record: Get the first sample time and last sample time

2018-01-04 Thread Jin, Yao
On 1/5/2018 3:09 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 08, 2017 at 09:13:42PM +0800, Jin Yao escreveu: In the default 'perf record' configuration, all samples are processed, to create the HEADER_BUILD_ID table. So it's very easy to get the first/last samples and s

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

2017-12-29 Thread Jin Yao
ch, the perf report output is: 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 --- t

[tip:perf/core] perf tools: Return all events as auto-completions after comma

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 34c16db0f035f3f3dc50fbed03747693c12b6a5b Gitweb: https://git.kernel.org/tip/34c16db0f035f3f3dc50fbed03747693c12b6a5b Author: Jin Yao AuthorDate: Fri, 22 Dec 2017 18:57:35 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:59 -0300 perf tools

[tip:perf/core] perf tools: Auto-complete for events with ':'

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 5d4fd9c8b83b36d34521b3af361a5726899045bf Gitweb: https://git.kernel.org/tip/5d4fd9c8b83b36d34521b3af361a5726899045bf Author: Jin Yao AuthorDate: Sat, 23 Dec 2017 04:15:58 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:16:00 -0300 perf tools: Auto

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

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 74cd5815d9af6e6c4f3bcecfbc8e439f2fd7e6b1 Gitweb: https://git.kernel.org/tip/74cd5815d9af6e6c4f3bcecfbc8e439f2fd7e6b1 Author: Jin Yao AuthorDate: Thu, 21 Dec 2017 17:26:10 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:59 -0300 perf tool

[tip:perf/core] perf stat: Resort '--per-thread' result

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 29734550c996c259ffa8d32198439d6fe4b51320 Gitweb: https://git.kernel.org/tip/29734550c996c259ffa8d32198439d6fe4b51320 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:11 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:47 -0300 perf stat: Resort

[tip:perf/core] perf stat: Remove --per-thread pid/tid limitation

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 1d9f8d1b824bf69cf984c1c36e5641b51eea42bb Gitweb: https://git.kernel.org/tip/1d9f8d1b824bf69cf984c1c36e5641b51eea42bb Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:10 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:47 -0300 perf stat: Remove

[tip:perf/core] perf thread_map: Enumerate all threads from /proc

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 73c0ca1eee3d2c96898e05a16be49da2a6d590b2 Gitweb: https://git.kernel.org/tip/73c0ca1eee3d2c96898e05a16be49da2a6d590b2 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:09 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:46 -0300 perf thread_map

[tip:perf/core] perf stat: Update or print per-thread stats

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 14e72a21c783654ca7b6c897b6d6508c1abccd7d Gitweb: https://git.kernel.org/tip/14e72a21c783654ca7b6c897b6d6508c1abccd7d Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:08 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:46 -0300 perf stat: Update

[tip:perf/core] perf stat: Allocate shadow stats buffer for threads

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 56739444d861daa050624d40c7adff32c73e9980 Gitweb: https://git.kernel.org/tip/56739444d861daa050624d40c7adff32c73e9980 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:07 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:45 -0300 perf stat

[tip:perf/core] perf stat: Print per-thread shadow stats

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: e0128b30dbfb2884530251b4accdffdbf55a6b72 Gitweb: https://git.kernel.org/tip/e0128b30dbfb2884530251b4accdffdbf55a6b72 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:05 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:44 -0300 perf stat: Print

[tip:perf/core] perf stat: Remove a set of shadow stats static variables

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 6a1e2c5c267358455a13bd8d59547430370c845a Gitweb: https://git.kernel.org/tip/6a1e2c5c267358455a13bd8d59547430370c845a Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:06 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:44 -0300 perf stat: Remove

[tip:perf/core] perf stat: Update per-thread shadow stats

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 1fcd03946b52b8a57a6692fedd4406b45baedfe6 Gitweb: https://git.kernel.org/tip/1fcd03946b52b8a57a6692fedd4406b45baedfe6 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:04 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:43 -0300 perf stat: Update

[tip:perf/core] perf stat: Create the runtime_stat init/exit function

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 8efb2df1288bc1bcc3711a97028620717319f138 Gitweb: https://git.kernel.org/tip/8efb2df1288bc1bcc3711a97028620717319f138 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:03 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:43 -0300 perf stat: Create

[tip:perf/core] perf stat: Extend rbtree to support per-thread shadow stats

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: 49cd456af1dcb13ff3e94cb997c82968ae86722a Gitweb: https://git.kernel.org/tip/49cd456af1dcb13ff3e94cb997c82968ae86722a Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:02 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:42 -0300 perf stat: Extend

[tip:perf/core] perf stat: Define a structure for per-thread shadow stats

2017-12-28 Thread tip-bot for Jin Yao
Commit-ID: e5fcc2abc353be94548080d84de3269ef6cc2af6 Gitweb: https://git.kernel.org/tip/e5fcc2abc353be94548080d84de3269ef6cc2af6 Author: Jin Yao AuthorDate: Tue, 5 Dec 2017 22:03:01 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 27 Dec 2017 12:15:42 -0300 perf stat: Define

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

2017-12-25 Thread Jin Yao
) return 0; This patch adds the lost code to hist_iter__branch_callback ( refer to hist_iter__report_callback). Signed-off-by: Jin Yao --- tools/perf/builtin-report.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/bu

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

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'

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

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

2017-12-22 Thread Jin Yao
eue block:block_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 --- tools/perf/perf-completion.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/

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

2017-12-21 Thread Jin Yao
s that 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 --- tools/perf/perf-completion.sh | 10 +++--- 1 file change

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: Improve bash command line auto-complete for multiple events with comma

2017-12-20 Thread Jin Yao
/CYCLES-T/ 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 --- tools/per

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

2017-12-17 Thread Jin Yao
turn 0; This patch adds the lost code to hist_iter__branch_callback ( refer to hist_iter__report_callback). Signed-off-by: Jin Yao --- tools/perf/builtin-report.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index

Re: [PATCH v7 0/6] perf report/script: Support percent and multiple range in --time option

2017-12-13 Thread Jin, Yao
On 12/13/2017 10:28 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 08, 2017 at 09:13:40PM +0800, Jin Yao escreveu: v7: --- v7 doesn't have functional change. The update is only: Thanks for working on this, will try and get this processed in my next round. - Arnaldo Thanks in ad

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

2017-12-07 Thread Jin Yao
urns error message to user. v4: Remove perf_time__skip_sample, only uses perf_time__ranges_skip_sample v3: Since the definitions of first_sample_time/last_sample_time are moved from perf_session to perf_evlist so change the related code. Signed-off-by: Jin Yao --- tools/perf/Document

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

2017-12-07 Thread Jin Yao
. Following passes. perf script --time 10%/10x12321xsdfdasfdsafdsafdsa Now it uses strtol to replace atoi. Signed-off-by: Jin Yao --- tools/perf/util/time-utils.c | 205 --- tools/perf/util/time-utils.h | 3 + 2 files changed, 196 insertions(+), 12

[PATCH v7 4/6] perf util: Create function to perform multiple time range checking

2017-12-07 Thread Jin Yao
ned-off-by: Jin Yao --- tools/perf/util/time-utils.c | 28 tools/perf/util/time-utils.h | 3 +++ 2 files changed, 31 insertions(+) diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c index 61c46022..3f7f18f 100644 --- a/tools/perf/util/time-uti

[PATCH v7 2/6] perf record: Get the first sample time and last sample time

2017-12-07 Thread Jin Yao
and last_sample_time from struct record and directly save them in perf_evlist. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-record.txt | 3 +++ tools/perf/builtin-record.c | 18 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/

[PATCH v7 1/6] perf header: Record first sample time and last sample time in perf file header

2017-12-07 Thread Jin Yao
script time style for timestamp printing. Also add with the printing of sample duration. v3: Remove the definitions of first_sample_time/last_sample_time from perf_session. Just define them in perf_evlist Signed-off-by: Jin Yao --- tools/perf/Documentation/perf.data-file-form

[PATCH v7 0/6] perf report/script: Support percent and multiple range in --time option

2017-12-07 Thread Jin Yao
lices perf report --time 10%/1,10%/2 4. Select from 0% to 10% and 30% to 40% slices perf report --time 0%-10%,30%-40% Jin Yao (6): perf header: Record first sample time and last sample time in perf file header perf record: Get the first sample time and last sample time perf util: Cr

[PATCH v7 6/6] perf script: support time percent and multiple time ranges

2017-12-07 Thread Jin Yao
d, returns error message to user. v4: Remove perf_time__skip_sample, only uses perf_time__ranges_skip_sample v3: Since the definitions of first_sample_time/last_sample_time are moved from perf_session to perf_evlist so change the related code. Signed-off-by: Jin Yao --- tools/perf/Doc

Re: [PATCH v9 3/5] perf utils: use pmu->is_uncore to detect PMU UNCORE devices

2017-12-06 Thread Jin, Yao
On 12/6/2017 9:47 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Dec 06, 2017 at 08:30:37AM +0800, Jin, Yao escreveu: On 12/6/2017 2:42 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Dec 05, 2017 at 08:35:22PM +0800, Jin, Yao escreveu: A quick test with the new patch 'fix_json_v9_2.patch&#

[tip:perf/core] perf stat: Add rbtree node_delete op

2017-12-06 Thread tip-bot for Jin Yao
Commit-ID: b984aff7811bbac75b3f05931643d815067cf45c Gitweb: https://git.kernel.org/tip/b984aff7811bbac75b3f05931643d815067cf45c Author: Jin Yao AuthorDate: Fri, 1 Dec 2017 18:57:28 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 10:24:31 -0300 perf stat: Add

[tip:perf/core] perf rblist: Create rblist__exit() function

2017-12-06 Thread tip-bot for Jin Yao
Commit-ID: 33fec3e393dc1c55737cfb9c876b5c0da0d6f380 Gitweb: https://git.kernel.org/tip/33fec3e393dc1c55737cfb9c876b5c0da0d6f380 Author: Jin Yao AuthorDate: Fri, 1 Dec 2017 18:57:25 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 10:24:31 -0300 perf rblist: Create

Re: [PATCH v9 3/5] perf utils: use pmu->is_uncore to detect PMU UNCORE devices

2017-12-05 Thread Jin, Yao
On 12/6/2017 2:42 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Dec 05, 2017 at 08:35:22PM +0800, Jin, Yao escreveu: A quick test with the new patch 'fix_json_v9_2.patch' shows it working. I'll take this as a Tested-by: you, ok? Hi Arnaldo, I didn't do a full test fo

Re: [PATCH v9 3/5] perf utils: use pmu->is_uncore to detect PMU UNCORE devices

2017-12-05 Thread Jin, Yao
.any # 0.8 CPI vmstat-10322 1,565,807 cycles vmstat-10322 1,879,654 inst_retired.any # 1.2 IPC vmstat-10322 1,565,807 cpu_clk_unhalted.thread 2.850291804 seconds time elapsed Thanks for fixing it quickly. Tha

Re: [PATCH v6 00/11] perf stat: Enable '--per-thread' on all thread

2017-12-05 Thread Jin, Yao
On 12/5/2017 6:21 PM, Jiri Olsa wrote: On Tue, Dec 05, 2017 at 10:03:00PM +0800, Jin Yao wrote: v6: --- Update according to Arnaldo's comments. 1. In 'perf util: Define a structure for runtime shadow stats' Remove '#include "evsel.h"' 2. In 'perf s

Re: [PATCH v9 3/5] perf utils: use pmu->is_uncore to detect PMU UNCORE devices

2017-12-04 Thread Jin, Yao
to yao@linux.intel.com cc yao@intel.com Thanks Jin Yao On 12/5/2017 3:12 PM, Ganapatrao Kulkarni wrote: diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 5ad8a18..57e38fd 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -538,6 +538,34 @@ static bool pmu_is_uncore(co

[PATCH v6 01/11] perf util: Define a structure for per-thread shadow stats

2017-12-04 Thread Jin Yao
-thread. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 11 --- tools/perf/util/stat.h| 43 ++- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index

[PATCH v6 04/11] perf util: Update per-thread shadow stats

2017-12-04 Thread Jin Yao
stats on a input parameter 'stat' and uses update_runtime_stat() to update the stats. It will not directly update the static variables as before. Signed-off-by: Jin Yao --- tools/perf/builtin-script.c | 3 +- tools/perf/builtin-stat.c | 3 +- tools/perf/util/stat-sha

[PATCH v6 02/11] perf stat: Extend rbtree to support per-thread shadow stats

2017-12-04 Thread Jin Yao
Previously the rbtree was used to link generic metrics. This patches adds new ctx/type/stat into rbtree keys because we will use this rbtree to maintain shadow metrics to replace original a couple of static arrays for supporting per-thread shadow stats. Signed-off-by: Jin Yao --- tools/perf

[PATCH v6 05/11] perf util: Print per-thread shadow stats

2017-12-04 Thread Jin Yao
parameter 'stat'. It will not directly get value from static variable. Instead, it now uses runtime_stat_avg() and runtime_stat_n() to get and compute the values. Signed-off-by: Jin Yao --- tools/perf/builtin-script.c | 3 +- tools/perf/builtin-stat.c | 24 +++-- tools/perf

[PATCH v6 06/11] perf util: Remove a set of shadow stats static variables

2017-12-04 Thread Jin Yao
In previous patches, we have reconstructed the code and let it not access the static variables directly. This patch removes these static variables. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 68 ++- tools/perf/util/stat.h| 1 + 2

[PATCH v6 09/11] perf util: Enumerate all threads from /proc

2017-12-04 Thread Jin Yao
This patch calls thread_map__new_all_cpus() to enumerate all threads from /proc if per-thread flag is enabled. Signed-off-by: Jin Yao --- tools/perf/tests/thread-map.c | 2 +- tools/perf/util/evlist.c | 3 ++- tools/perf/util/thread_map.c | 5 - tools/perf/util/thread_map.h | 2 +- 4

[PATCH v6 03/11] perf util: Create the runtime_stat init/exit function

2017-12-04 Thread Jin Yao
It mainly initializes and releases the rblist which is defined in struct runtime_stat. For the original rblist 'runtime_saved_values', it's still kept there for keeping the patch bisectable. The rblist 'runtime_saved_values' will be removed in later patch at switching

[PATCH v6 00/11] perf stat: Enable '--per-thread' on all thread

2017-12-04 Thread Jin Yao
watchdog/1-144,663 cycles watchdog/4-324,626 cycles watchdog/5-384,403 cycles watchdog/3-263,936 cycles watchdog/2-203,850 cycles

[PATCH v6 11/11] perf stat: Resort '--per-thread' result

2017-12-04 Thread Jin Yao
cycles kworker/u16:2-23146 2,654 cycles watchdog/6-442,017 cycles watchdog/7-502,017 cycles 2.175726600 seconds time elapsed Signed-off-by: Jin Yao

[PATCH v6 08/11] perf stat: Update or print per-thread stats

2017-12-04 Thread Jin Yao
If the stats pointer in stat_config structure is not null, it will update the per-thread stats or print the per-thread stats on this buffer. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 9 +++-- tools/perf/util/stat.c| 11 --- 2 files changed, 15 insertions(+), 5

[PATCH v6 10/11] perf stat: Remove --per-thread pid/tid limitation

2017-12-04 Thread Jin Yao
-t, --tidstat events on existing thread id This patch removes this limitation. If no pid/tid specified, it returns all threads (get threads from /proc). Note that it doesn't support cpu_list yet so if it's a cpu_list case, then skip. Signed-off-by: Jin Yao --- tools/perf

[PATCH v6 07/11] perf stat: Allocate shadow stats buffer for threads

2017-12-04 Thread Jin Yao
stat_config. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 46 +- tools/perf/util/stat.h| 2 ++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 1edc082..8ff3348 100644

Re: [PATCH v9 3/5] perf utils: use pmu->is_uncore to detect PMU UNCORE devices

2017-12-04 Thread Jin, Yao
cpu_clk_unhalted.thread 3.051274166 seconds time elapsed Could you please help to take a look? Thanks Jin Yao On 10/17/2017 2:32 AM, Ganapatrao Kulkarni wrote: PMU CORE devices are identified using sysfs filename cpu, however on some platforms(like arm/arm64), PMU CORE sysfs nam

Re: [PATCH v5 10/12] perf util: Reuse thread_map__new_by_uid to enumerate threads from /proc

2017-12-01 Thread Jin, Yao
On 12/1/2017 11:02 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 01, 2017 at 11:44:25AM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Dec 01, 2017 at 06:57:34PM +0800, Jin Yao escreveu: Perf already has a function thread_map__new_by_uid() which can enumerate all threads from /proc by

Re: [PATCH v5 10/12] perf util: Reuse thread_map__new_by_uid to enumerate threads from /proc

2017-12-01 Thread Jin, Yao
On 12/1/2017 10:44 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 01, 2017 at 06:57:34PM +0800, Jin Yao escreveu: Perf already has a function thread_map__new_by_uid() which can enumerate all threads from /proc by uid. This patch creates a static function enumerate_threads() which reuses the

Re: [PATCH v5 06/12] perf util: Update and print per-thread shadow stats

2017-12-01 Thread Jin, Yao
On 12/1/2017 10:21 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 01, 2017 at 06:57:30PM +0800, Jin Yao escreveu: The functions perf_stat__update_shadow_stats() and perf_stat__print_shadow_statss() are called to update and print the shadow stats on a set of static variables. But the static

Re: [PATCH v5 03/12] perf util: Extend rbtree to support shadow stats

2017-12-01 Thread Jin, Yao
On 12/1/2017 10:10 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 01, 2017 at 06:57:27PM +0800, Jin Yao escreveu: Previously the rbtree was used to link generic metrics. Try to make the one line subject more descriptive, I'm changing it to: perf stat: Extend rbtree to support per-t

Re: [PATCH v5 02/12] perf util: Define a structure for runtime shadow stats

2017-12-01 Thread Jin, Yao
On 12/1/2017 10:02 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Dec 01, 2017 at 06:57:26PM +0800, Jin Yao escreveu: Perf has a set of static variables to record the runtime shadow metrics stats. While if we want to record the runtime shadow stats for per-thread, it will be the limitation

[PATCH v5 02/12] perf util: Define a structure for runtime shadow stats

2017-11-30 Thread Jin Yao
-thread. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 11 --- tools/perf/util/stat.h| 44 ++- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index

[PATCH v5 06/12] perf util: Update and print per-thread shadow stats

2017-11-30 Thread Jin Yao
eter 'stat'. It will not directly get value from static variable. Instead, it now uses runtime_stat_avg() and runtime_stat_n() to get and compute the values. Signed-off-by: Jin Yao --- tools/perf/builtin-script.c | 6 +- tools/perf/builtin-stat.c | 27 ++-- tools/perf/util

[PATCH v5 04/12] perf util: Add rbtree node_delete ops

2017-11-30 Thread Jin Yao
In current stat-shadow.c, the rbtree deleting is ignored. The patch adds the implementation to node_delete method of rblist. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/stat-shadow.c b

[PATCH v5 07/12] perf util: Remove a set of shadow stats static variables

2017-11-30 Thread Jin Yao
In previous patches, we have reconstructed the code and let it not access the static variables directly. This patch removes these static variables. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 68 ++- tools/perf/util/stat.h| 1 + 2

[PATCH v5 09/12] perf stat: Update or print per-thread stats

2017-11-30 Thread Jin Yao
If the stats pointer in stat_config structure is not null, it will update the per-thread stats or print the per-thread stats on this buffer. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 9 +++-- tools/perf/util/stat.c| 11 --- 2 files changed, 15 insertions(+), 5

[PATCH v5 11/12] perf stat: Remove --per-thread pid/tid limitation

2017-11-30 Thread Jin Yao
-t, --tidstat events on existing thread id This patch removes this limitation. If no pid/tid specified, it returns all threads (get threads from /proc). Note that it doesn't support cpu_list yet so if it's a cpu_list case, then skip. Signed-off-by: Jin Yao --- tools/perf

[PATCH v5 10/12] perf util: Reuse thread_map__new_by_uid to enumerate threads from /proc

2017-11-30 Thread Jin Yao
thread_map__new_by_uid() and a new function thread_map__new_threads(). The new function thread_map__new_threads() is called to enumerate all threads from /proc. Signed-off-by: Jin Yao --- tools/perf/tests/thread-map.c | 2 +- tools/perf/util/evlist.c | 3 ++- tools/perf/util/thread_map.c | 19

[PATCH v5 12/12] perf stat: Resort '--per-thread' result

2017-11-30 Thread Jin Yao
cycles kworker/u16:2-23146 2,654 cycles watchdog/6-442,017 cycles watchdog/7-502,017 cycles 2.175726600 seconds time elapsed Signed-off-by: Jin Yao

[PATCH v5 03/12] perf util: Extend rbtree to support shadow stats

2017-11-30 Thread Jin Yao
Previously the rbtree was used to link generic metrics. This patches adds new ctx/type/stat into rbtree keys because we will use this rbtree to maintain shadow metrics to replace original a couple of static arrays for supporting per-thread shadow stats. Signed-off-by: Jin Yao --- tools/perf

[PATCH v5 01/12] perf util: Create rblist__exit() function

2017-11-30 Thread Jin Yao
This patch creates a new function rblist__exit() which is similar as rblist__delete() but it will not free the pointer of rblist. Signed-off-by: Jin Yao --- tools/perf/util/rblist.c | 19 --- tools/perf/util/rblist.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-)

[PATCH v5 05/12] perf util: Create the runtime_stat init/exit function

2017-11-30 Thread Jin Yao
It mainly initializes and releases the rblist which is defined in struct runtime_stat. For the original rblist 'runtime_saved_values', it's still kept there for keeping the patch bisectable. The rblist 'runtime_saved_values' will be removed in later patch at switching

[PATCH v5 00/12] perf stat: Enable '--per-thread' on all thread

2017-11-30 Thread Jin Yao
cycles watchdog/5-384,403 cycles watchdog/3-263,936 cycles watchdog/2-203,850 cycles kworker/u16:2-23146 2,654 cycles watchdog/6-442,017 cycles

[PATCH v5 08/12] perf stat: Allocate shadow stats buffer for threads

2017-11-30 Thread Jin Yao
stat_config. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 46 +- tools/perf/util/stat.h| 2 ++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 1edc082..8ff3348 100644

Re: [PATCH v4 00/12] perf stat: Enable '--per-thread' on all thread

2017-11-30 Thread Jin, Yao
On 11/30/2017 6:05 PM, Jiri Olsa wrote: On Thu, Nov 30, 2017 at 07:56:30PM +0800, Jin Yao wrote: v4: --- Update according to Jiri's comments. The major modification is: Move struct perf_stat_config::*stats|stats_num to 'perf stat: Allocate shadow stats buffer for threads'.

Re: [PATCH v4 01/12] perf util: Create rblist__reset() function

2017-11-30 Thread Jin, Yao
On 12/1/2017 3:30 AM, Arnaldo Carvalho de Melo wrote: Em Thu, Nov 30, 2017 at 07:56:31PM +0800, Jin Yao escreveu: Currently we have a rblist__delete() which is used to delete a rblist. While rblist__delete() will free the pointer of rblist at the end. It's inconvenience for user to del

[PATCH v4 01/12] perf util: Create rblist__reset() function

2017-11-29 Thread Jin Yao
This patch creates a new function rblist__reset() which function is similar as rblist__delete() but it will not free the rblist. Signed-off-by: Jin Yao --- tools/perf/util/rblist.c | 24 +--- tools/perf/util/rblist.h | 1 + 2 files changed, 18 insertions(+), 7 deletions(-)

[PATCH v4 03/12] perf util: Extend rbtree to support shadow stats

2017-11-29 Thread Jin Yao
Previously the rbtree was used to link generic metrics. This patches adds new ctx/type/stat into rbtree keys because we will use this rbtree to maintain shadow metrics to replace original a couple of static arrays for supporting per-thread shadow stats. Signed-off-by: Jin Yao --- tools/perf

[PATCH v4 02/12] perf util: Define a structure for runtime shadow stats

2017-11-29 Thread Jin Yao
-thread. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 11 --- tools/perf/util/stat.h| 44 ++- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index

[PATCH v4 05/12] perf util: Create the runtime_stat init/free function

2017-11-29 Thread Jin Yao
It mainly initializes the rblist in struct runtime_stat. For the original rblist 'runtime_saved_values', it's still there for keeping the patch bisectable. The rblist 'runtime_saved_values' will be removed in later patch at switching time. Signed-off-by: Jin Yao

[PATCH v4 07/12] perf util: Remove a set of shadow stats static variables

2017-11-29 Thread Jin Yao
In previous patches, we have reconstructed the code and let it not access the static variables directly. This patch removes these static variables. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 68 ++- tools/perf/util/stat.h| 1 + 2

[PATCH v4 08/12] perf stat: Allocate shadow stats buffer for threads

2017-11-29 Thread Jin Yao
stat_config. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 46 +- tools/perf/util/stat.h| 2 ++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 1edc082..4b88803 100644

[PATCH v4 12/12] perf stat: Resort '--per-thread' result

2017-11-29 Thread Jin Yao
cycles kworker/u16:2-23146 2,654 cycles watchdog/6-442,017 cycles watchdog/7-502,017 cycles 2.175726600 seconds time elapsed Signed-off-by: Jin Yao

[PATCH v4 11/12] perf stat: Remove --per-thread pid/tid limitation

2017-11-29 Thread Jin Yao
-t, --tidstat events on existing thread id This patch removes this limitation. If no pid/tid specified, it returns all threads (get threads from /proc). Note that it doesn't support cpu_list yet so if it's a cpu_list case, then skip. Signed-off-by: Jin Yao --- tools/perf

[PATCH v4 04/12] perf util: Add rbtree node_delete ops

2017-11-29 Thread Jin Yao
In current stat-shadow.c, the rbtree deleting is ignored. The patch adds the implementation to node_delete method of rblist. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/stat-shadow.c b

[PATCH v4 06/12] perf util: Update and print per-thread shadow stats

2017-11-29 Thread Jin Yao
eter 'stat'. It will not directly get value from static variable. Instead, it now uses runtime_stat_avg() and runtime_stat_n() to get and compute the values. Signed-off-by: Jin Yao --- tools/perf/builtin-script.c | 6 +- tools/perf/builtin-stat.c | 27 ++-- tools/perf/util

[PATCH v4 10/12] perf util: Reuse thread_map__new_by_uid to enumerate threads from /proc

2017-11-29 Thread Jin Yao
thread_map__new_by_uid() and a new function thread_map__new_threads(). The new function thread_map__new_threads() is called to enumerate all threads from /proc. Signed-off-by: Jin Yao --- tools/perf/tests/thread-map.c | 2 +- tools/perf/util/evlist.c | 3 ++- tools/perf/util/thread_map.c | 19

[PATCH v4 09/12] perf stat: Update or print per-thread stats

2017-11-29 Thread Jin Yao
If the stats pointer in stat_config structure is not null, it will update the per-thread stats or print the per-thread stats on this buffer. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 9 +++-- tools/perf/util/stat.c| 11 --- 2 files changed, 15 insertions(+), 5

[PATCH v4 00/12] perf stat: Enable '--per-thread' on all thread

2017-11-29 Thread Jin Yao
3,936 cycles watchdog/2-203,850 cycles kworker/u16:2-23146 2,654 cycles watchdog/6-442,017 cycles watchdog/7-502,017 cycles 2.175726600 seconds time elapsed

Re: [PATCH v3 00/11] perf stat: Enable '--per-thread' on all thread

2017-11-29 Thread Jin, Yao
On 11/29/2017 11:16 PM, Jiri Olsa wrote: On Wed, Nov 29, 2017 at 08:05:47PM +0800, Jin Yao wrote: v3: --- Update according to Jiri's comments. The major modifications are: 1. Fix the crash issue when performing the git bisect. Move the removing of runtime_saved_values to the swit

[PATCH v3 04/11] perf util: Add rbtree node_delete ops

2017-11-28 Thread Jin Yao
In current stat-shadow.c, the rbtree deleting is ignored. The patch adds the implementation to node_delete method of rblist. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/stat-shadow.c b

[PATCH v3 02/11] perf util: Define a structure for runtime shadow stats

2017-11-28 Thread Jin Yao
-thread. Signed-off-by: Jin Yao --- tools/perf/util/stat-shadow.c | 11 --- tools/perf/util/stat.h| 46 ++- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index

[PATCH v3 05/11] perf util: Create the runtime_stat init/free function

2017-11-28 Thread Jin Yao
It mainly initializes the rblist in struct runtime_stat. For the original rblist 'runtime_saved_values', it's still there for keeping the patch bisectable. The rblist 'runtime_saved_values' will be removed in later patch at switching time. Signed-off-by: Jin Yao

[PATCH v3 06/11] perf util: Update and print per-thread shadow stats

2017-11-28 Thread Jin Yao
eter 'stat'. It will not directly get value from static variable. Instead, it now uses runtime_stat_avg() and runtime_stat_n() to get and compute the values. Signed-off-by: Jin Yao --- tools/perf/builtin-script.c | 6 +- tools/perf/builtin-stat.c | 34 +++-- tools/perf/util

[PATCH v3 01/11] perf util: Create rblist__reset() function

2017-11-28 Thread Jin Yao
This patch creates a new function rblist__reset() which function is similar as rblist__delete() but it will not free the rblist. Signed-off-by: Jin Yao --- tools/perf/util/rblist.c | 24 +--- tools/perf/util/rblist.h | 1 + 2 files changed, 18 insertions(+), 7 deletions(-)

[PATCH v3 10/11] perf stat: Remove --per-thread pid/tid limitation

2017-11-28 Thread Jin Yao
-t, --tidstat events on existing thread id This patch removes this limitation. If no pid/tid specified, it returns all threads (get threads from /proc). Note that it doesn't support cpu_list yet so if it's a cpu_list case, then skip. Signed-off-by: Jin Yao --- tools/perf

[PATCH v3 08/11] perf stat: Allocate shadow stats buffer for threads

2017-11-28 Thread Jin Yao
stat_config. Signed-off-by: Jin Yao --- tools/perf/builtin-stat.c | 46 +- tools/perf/util/stat.c| 11 --- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index c7fe582

[PATCH v3 11/11] perf stat: Resort '--per-thread' result

2017-11-28 Thread Jin Yao
cycles kworker/u16:2-23146 2,654 cycles watchdog/6-442,017 cycles watchdog/7-502,017 cycles 2.175726600 seconds time elapsed Signed-off-by: Jin Yao

<    4   5   6   7   8   9   10   11   12   13   >