Re: [PATCH v6 0/7] perf report: Show branch type

2017-07-07 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:
> v6:
>Update according to the review comments from
>Jiri Olsa . Major modifications are: 
> 
>1. Move that multiline conditional code inside {} brackets.
> 
>2. Move branch_type_stat_display() from builtin-report.c to
>   branch.c. Move branch_type_str() from callchain.c to
>   branch.c.
> 
>3. Keep the original branch info display order, that is:
>   predicted, abort, cycles, iterations

Peter,
are you ok with the kernel side of this?

thanks,
jirka

> 
> v5:
> ---
>Mainly the v5 patch series are updated according to
>comments from Jiri Olsa .
> 
>The kernel part doesn't have functional change. It just
>solve the merge issue.
> 
>In userspace, the functions of branch type counting and
>branch type name resolving are moved to the new files: 
>util/branch.c, util/branch.h.
> 
>And refactor the branch info printing code for better
>maintenance.
> 
> Not changed (or just fix merge issue):
>   perf/core: Define the common branch type classification
>   perf/x86/intel: Record branch type
>   perf record: Create a new option save_type in --branch-filter
> 
> New patches:
>   perf report: Refactor the branch info printing code
>   perf util: Create branch.c/.h for common branch functions
> 
> Changed:
>   perf report: Show branch type statistics for stdio mode
>   perf report: Show branch type in callchain entry
> 
> v4:
> ---
> 1. Describe the major changes in patch description.
>Thanks for Peter Zijlstra's reminding. 
> 
> 2. Initialize branch type to 0 in intel_pmu_lbr_read_32 and
>intel_pmu_lbr_read_64. Remove the invalid else code in
>intel_pmu_lbr_filter. 
> 
> v3:
> ---
> 1. Move the JCC forward/backward and cross page computing from
>kernel to userspace.
> 
> 2. Use lookup table to replace original switch/case processing.
> 
> Changed:
>   perf/core: Define the common branch type classification
>   perf/x86/intel: Record branch type
>   perf report: Show branch type statistics for stdio mode
>   perf report: Show branch type in callchain entry
> 
> Not changed:
>   perf record: Create a new option save_type in --branch-filter
> 
> v2:
> ---
> 1. Use 4 bits in perf_branch_entry to record branch type.
> 
> 2. Pull out some common branch types from FAR_BRANCH. Now the branch
>types defined in perf_event.h:
> 
> Jin Yao (7):
>   perf/core: Define the common branch type classification
>   perf/x86/intel: Record branch type
>   perf record: Create a new option save_type in --branch-filter
>   perf report: Refactor the branch info printing code
>   perf util: Create branch.c/.h for common branch functions
>   perf report: Show branch type statistics for stdio mode
>   perf report: Show branch type in callchain entry
> 
>  arch/x86/events/intel/lbr.c  |  53 +-
>  include/uapi/linux/perf_event.h  |  29 +-
>  tools/include/uapi/linux/perf_event.h|  29 +-
>  tools/perf/Documentation/perf-record.txt |   1 +
>  tools/perf/builtin-report.c  |  25 +
>  tools/perf/util/Build|   1 +
>  tools/perf/util/branch.c | 168 
> +++
>  tools/perf/util/branch.h |  25 +
>  tools/perf/util/callchain.c  | 140 ++
>  tools/perf/util/callchain.h  |   5 +-
>  tools/perf/util/event.h  |   3 +-
>  tools/perf/util/hist.c   |   5 +-
>  tools/perf/util/machine.c|  26 +++--
>  tools/perf/util/parse-branch-options.c   |   1 +
>  14 files changed, 427 insertions(+), 84 deletions(-)
>  create mode 100644 tools/perf/util/branch.c
>  create mode 100644 tools/perf/util/branch.h
> 
> -- 
> 2.7.4
> 


Re: [PATCH v6 0/7] perf report: Show branch type

2017-07-07 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:
> v6:
>Update according to the review comments from
>Jiri Olsa . Major modifications are: 
> 
>1. Move that multiline conditional code inside {} brackets.
> 
>2. Move branch_type_stat_display() from builtin-report.c to
>   branch.c. Move branch_type_str() from callchain.c to
>   branch.c.
> 
>3. Keep the original branch info display order, that is:
>   predicted, abort, cycles, iterations

Peter,
are you ok with the kernel side of this?

thanks,
jirka

> 
> v5:
> ---
>Mainly the v5 patch series are updated according to
>comments from Jiri Olsa .
> 
>The kernel part doesn't have functional change. It just
>solve the merge issue.
> 
>In userspace, the functions of branch type counting and
>branch type name resolving are moved to the new files: 
>util/branch.c, util/branch.h.
> 
>And refactor the branch info printing code for better
>maintenance.
> 
> Not changed (or just fix merge issue):
>   perf/core: Define the common branch type classification
>   perf/x86/intel: Record branch type
>   perf record: Create a new option save_type in --branch-filter
> 
> New patches:
>   perf report: Refactor the branch info printing code
>   perf util: Create branch.c/.h for common branch functions
> 
> Changed:
>   perf report: Show branch type statistics for stdio mode
>   perf report: Show branch type in callchain entry
> 
> v4:
> ---
> 1. Describe the major changes in patch description.
>Thanks for Peter Zijlstra's reminding. 
> 
> 2. Initialize branch type to 0 in intel_pmu_lbr_read_32 and
>intel_pmu_lbr_read_64. Remove the invalid else code in
>intel_pmu_lbr_filter. 
> 
> v3:
> ---
> 1. Move the JCC forward/backward and cross page computing from
>kernel to userspace.
> 
> 2. Use lookup table to replace original switch/case processing.
> 
> Changed:
>   perf/core: Define the common branch type classification
>   perf/x86/intel: Record branch type
>   perf report: Show branch type statistics for stdio mode
>   perf report: Show branch type in callchain entry
> 
> Not changed:
>   perf record: Create a new option save_type in --branch-filter
> 
> v2:
> ---
> 1. Use 4 bits in perf_branch_entry to record branch type.
> 
> 2. Pull out some common branch types from FAR_BRANCH. Now the branch
>types defined in perf_event.h:
> 
> Jin Yao (7):
>   perf/core: Define the common branch type classification
>   perf/x86/intel: Record branch type
>   perf record: Create a new option save_type in --branch-filter
>   perf report: Refactor the branch info printing code
>   perf util: Create branch.c/.h for common branch functions
>   perf report: Show branch type statistics for stdio mode
>   perf report: Show branch type in callchain entry
> 
>  arch/x86/events/intel/lbr.c  |  53 +-
>  include/uapi/linux/perf_event.h  |  29 +-
>  tools/include/uapi/linux/perf_event.h|  29 +-
>  tools/perf/Documentation/perf-record.txt |   1 +
>  tools/perf/builtin-report.c  |  25 +
>  tools/perf/util/Build|   1 +
>  tools/perf/util/branch.c | 168 
> +++
>  tools/perf/util/branch.h |  25 +
>  tools/perf/util/callchain.c  | 140 ++
>  tools/perf/util/callchain.h  |   5 +-
>  tools/perf/util/event.h  |   3 +-
>  tools/perf/util/hist.c   |   5 +-
>  tools/perf/util/machine.c|  26 +++--
>  tools/perf/util/parse-branch-options.c   |   1 +
>  14 files changed, 427 insertions(+), 84 deletions(-)
>  create mode 100644 tools/perf/util/branch.c
>  create mode 100644 tools/perf/util/branch.h
> 
> -- 
> 2.7.4
> 


Re: [PATCH v6 0/7] perf report: Show branch type

2017-07-05 Thread Jin, Yao

Hi Arnaldo,

Could this series be merged? It's more than 2 months since the last time 
Jiri Olsa gave the ack.


Thanks

Jin Yao


On 6/26/2017 2:24 PM, Jin, Yao wrote:

Hi maintainers,

Is this patch series OK or anything I should update?

Thanks

Jin Yao


On 6/2/2017 4:02 PM, Jin, Yao wrote:

Hi maintainers,

Is this patch series (v6) OK for merging?

Thanks

Jin Yao


On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka








Re: [PATCH v6 0/7] perf report: Show branch type

2017-07-05 Thread Jin, Yao

Hi Arnaldo,

Could this series be merged? It's more than 2 months since the last time 
Jiri Olsa gave the ack.


Thanks

Jin Yao


On 6/26/2017 2:24 PM, Jin, Yao wrote:

Hi maintainers,

Is this patch series OK or anything I should update?

Thanks

Jin Yao


On 6/2/2017 4:02 PM, Jin, Yao wrote:

Hi maintainers,

Is this patch series (v6) OK for merging?

Thanks

Jin Yao


On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka








Re: [PATCH v6 0/7] perf report: Show branch type

2017-06-26 Thread Jin, Yao

Hi maintainers,

Is this patch series OK or anything I should update?

Thanks

Jin Yao


On 6/2/2017 4:02 PM, Jin, Yao wrote:

Hi maintainers,

Is this patch series (v6) OK for merging?

Thanks

Jin Yao


On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka






Re: [PATCH v6 0/7] perf report: Show branch type

2017-06-26 Thread Jin, Yao

Hi maintainers,

Is this patch series OK or anything I should update?

Thanks

Jin Yao


On 6/2/2017 4:02 PM, Jin, Yao wrote:

Hi maintainers,

Is this patch series (v6) OK for merging?

Thanks

Jin Yao


On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka






Re: [PATCH v6 0/7] perf report: Show branch type

2017-06-02 Thread Jin, Yao

Hi maintainers,

Is this patch series (v6) OK for merging?

Thanks

Jin Yao


On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka




Re: [PATCH v6 0/7] perf report: Show branch type

2017-06-02 Thread Jin, Yao

Hi maintainers,

Is this patch series (v6) OK for merging?

Thanks

Jin Yao


On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka




Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-23 Thread Jin, Yao



On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka


Thanks so much!

Is the kernel part OK?

Thanks
Jin Yao



Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-23 Thread Jin, Yao



On 4/20/2017 5:36 PM, Jiri Olsa wrote:

On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:

v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:

1. Move that multiline conditional code inside {} brackets.

2. Move branch_type_stat_display() from builtin-report.c to
   branch.c. Move branch_type_str() from callchain.c to
   branch.c.

3. Keep the original branch info display order, that is:
   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka


Thanks so much!

Is the kernel part OK?

Thanks
Jin Yao



Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-20 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:
> v6:
>Update according to the review comments from
>Jiri Olsa . Major modifications are: 
> 
>1. Move that multiline conditional code inside {} brackets.
> 
>2. Move branch_type_stat_display() from builtin-report.c to
>   branch.c. Move branch_type_str() from callchain.c to
>   branch.c.
> 
>3. Keep the original branch info display order, that is:
>   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka


Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-20 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:
> v6:
>Update according to the review comments from
>Jiri Olsa . Major modifications are: 
> 
>1. Move that multiline conditional code inside {} brackets.
> 
>2. Move branch_type_stat_display() from builtin-report.c to
>   branch.c. Move branch_type_str() from callchain.c to
>   branch.c.
> 
>3. Keep the original branch info display order, that is:
>   predicted, abort, cycles, iterations

for the tools part

Acked-by: Jiri Olsa 

thanks,
jirka


[PATCH v6 0/7] perf report: Show branch type

2017-04-19 Thread Jin Yao
v6:
   Update according to the review comments from
   Jiri Olsa . Major modifications are: 

   1. Move that multiline conditional code inside {} brackets.

   2. Move branch_type_stat_display() from builtin-report.c to
  branch.c. Move branch_type_str() from callchain.c to
  branch.c.

   3. Keep the original branch info display order, that is:
  predicted, abort, cycles, iterations

v5:
---
   Mainly the v5 patch series are updated according to
   comments from Jiri Olsa .

   The kernel part doesn't have functional change. It just
   solve the merge issue.

   In userspace, the functions of branch type counting and
   branch type name resolving are moved to the new files: 
   util/branch.c, util/branch.h.

   And refactor the branch info printing code for better
   maintenance.

Not changed (or just fix merge issue):
  perf/core: Define the common branch type classification
  perf/x86/intel: Record branch type
  perf record: Create a new option save_type in --branch-filter

New patches:
  perf report: Refactor the branch info printing code
  perf util: Create branch.c/.h for common branch functions

Changed:
  perf report: Show branch type statistics for stdio mode
  perf report: Show branch type in callchain entry

v4:
---
1. Describe the major changes in patch description.
   Thanks for Peter Zijlstra's reminding. 

2. Initialize branch type to 0 in intel_pmu_lbr_read_32 and
   intel_pmu_lbr_read_64. Remove the invalid else code in
   intel_pmu_lbr_filter. 

v3:
---
1. Move the JCC forward/backward and cross page computing from
   kernel to userspace.

2. Use lookup table to replace original switch/case processing.

Changed:
  perf/core: Define the common branch type classification
  perf/x86/intel: Record branch type
  perf report: Show branch type statistics for stdio mode
  perf report: Show branch type in callchain entry

Not changed:
  perf record: Create a new option save_type in --branch-filter

v2:
---
1. Use 4 bits in perf_branch_entry to record branch type.

2. Pull out some common branch types from FAR_BRANCH. Now the branch
   types defined in perf_event.h:

Jin Yao (7):
  perf/core: Define the common branch type classification
  perf/x86/intel: Record branch type
  perf record: Create a new option save_type in --branch-filter
  perf report: Refactor the branch info printing code
  perf util: Create branch.c/.h for common branch functions
  perf report: Show branch type statistics for stdio mode
  perf report: Show branch type in callchain entry

 arch/x86/events/intel/lbr.c  |  53 +-
 include/uapi/linux/perf_event.h  |  29 +-
 tools/include/uapi/linux/perf_event.h|  29 +-
 tools/perf/Documentation/perf-record.txt |   1 +
 tools/perf/builtin-report.c  |  25 +
 tools/perf/util/Build|   1 +
 tools/perf/util/branch.c | 168 +++
 tools/perf/util/branch.h |  25 +
 tools/perf/util/callchain.c  | 140 ++
 tools/perf/util/callchain.h  |   5 +-
 tools/perf/util/event.h  |   3 +-
 tools/perf/util/hist.c   |   5 +-
 tools/perf/util/machine.c|  26 +++--
 tools/perf/util/parse-branch-options.c   |   1 +
 14 files changed, 427 insertions(+), 84 deletions(-)
 create mode 100644 tools/perf/util/branch.c
 create mode 100644 tools/perf/util/branch.h

-- 
2.7.4



[PATCH v6 0/7] perf report: Show branch type

2017-04-19 Thread Jin Yao
v6:
   Update according to the review comments from
   Jiri Olsa . Major modifications are: 

   1. Move that multiline conditional code inside {} brackets.

   2. Move branch_type_stat_display() from builtin-report.c to
  branch.c. Move branch_type_str() from callchain.c to
  branch.c.

   3. Keep the original branch info display order, that is:
  predicted, abort, cycles, iterations

v5:
---
   Mainly the v5 patch series are updated according to
   comments from Jiri Olsa .

   The kernel part doesn't have functional change. It just
   solve the merge issue.

   In userspace, the functions of branch type counting and
   branch type name resolving are moved to the new files: 
   util/branch.c, util/branch.h.

   And refactor the branch info printing code for better
   maintenance.

Not changed (or just fix merge issue):
  perf/core: Define the common branch type classification
  perf/x86/intel: Record branch type
  perf record: Create a new option save_type in --branch-filter

New patches:
  perf report: Refactor the branch info printing code
  perf util: Create branch.c/.h for common branch functions

Changed:
  perf report: Show branch type statistics for stdio mode
  perf report: Show branch type in callchain entry

v4:
---
1. Describe the major changes in patch description.
   Thanks for Peter Zijlstra's reminding. 

2. Initialize branch type to 0 in intel_pmu_lbr_read_32 and
   intel_pmu_lbr_read_64. Remove the invalid else code in
   intel_pmu_lbr_filter. 

v3:
---
1. Move the JCC forward/backward and cross page computing from
   kernel to userspace.

2. Use lookup table to replace original switch/case processing.

Changed:
  perf/core: Define the common branch type classification
  perf/x86/intel: Record branch type
  perf report: Show branch type statistics for stdio mode
  perf report: Show branch type in callchain entry

Not changed:
  perf record: Create a new option save_type in --branch-filter

v2:
---
1. Use 4 bits in perf_branch_entry to record branch type.

2. Pull out some common branch types from FAR_BRANCH. Now the branch
   types defined in perf_event.h:

Jin Yao (7):
  perf/core: Define the common branch type classification
  perf/x86/intel: Record branch type
  perf record: Create a new option save_type in --branch-filter
  perf report: Refactor the branch info printing code
  perf util: Create branch.c/.h for common branch functions
  perf report: Show branch type statistics for stdio mode
  perf report: Show branch type in callchain entry

 arch/x86/events/intel/lbr.c  |  53 +-
 include/uapi/linux/perf_event.h  |  29 +-
 tools/include/uapi/linux/perf_event.h|  29 +-
 tools/perf/Documentation/perf-record.txt |   1 +
 tools/perf/builtin-report.c  |  25 +
 tools/perf/util/Build|   1 +
 tools/perf/util/branch.c | 168 +++
 tools/perf/util/branch.h |  25 +
 tools/perf/util/callchain.c  | 140 ++
 tools/perf/util/callchain.h  |   5 +-
 tools/perf/util/event.h  |   3 +-
 tools/perf/util/hist.c   |   5 +-
 tools/perf/util/machine.c|  26 +++--
 tools/perf/util/parse-branch-options.c   |   1 +
 14 files changed, 427 insertions(+), 84 deletions(-)
 create mode 100644 tools/perf/util/branch.c
 create mode 100644 tools/perf/util/branch.h

-- 
2.7.4