Re: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-10-09 Thread zhangzhiqiang
On 2014/10/9 11:41, gre...@linuxfoundation.org wrote:
> On Thu, Oct 09, 2014 at 11:07:04AM +0800, zhangzhiqiang wrote:
>> On 2014/10/8 21:38, Will Deacon wrote:
>>> On Wed, Oct 08, 2014 at 02:31:47PM +0100, gre...@linuxfoundation.org wrote:
>>>> On Wed, Oct 08, 2014 at 10:17:41AM +0100, Will Deacon wrote:
>>>>> On Wed, Oct 08, 2014 at 04:06:12AM +0100, zhangzhiqiang wrote:
>>>>>> hi all,
>>>>>> 
>>>>>>
>>>>>> ref-cycles event is specially to Intel core, but can still used in arm 
>>>>>> architecture
>>>>>> with the wrong return value with 3.10 stable. for instance:
>>>>>>
>>>>>>  perf stat -e ref-cycles sleep 1
>>>>>>
>>>>>>  Performance counter stats for 'sleep 1':
>>>>>>
>>>>>>  0 ref-cycles
>>>>>>
>>>>>>1.002381916 seconds time elapsed
>>>>>>
>>>>>> this patch fix the bug and make it return NOT SUPPORTED
>>>>>> distinctly.
>>>>>>
>>>>>> In upstream this bug has been fixed by other way(not primary for the 
>>>>>> bug), which changes more than one file
>>>>>> and more than 1000 lines. the primary commit is 
>>>>>> 6b7658ec8a100b608e59e3cde353434db51f5be0.
>>>>>> besides we can not simply cherry-pick.
>>>>>
>>>>> I thought I saw Greg pick this up the other day?
>>>>
>>>> Yes, it's in 3.16.4, did I do something wrong by accepting it?
>>>
>>> Nah, it's a trivial patch that I struggle to get excited about. I'm just not
>>> sure why it's being sent again, after you already accepted it.
>>
>> Yes, it's in 3.16.4, in my opinion 3.10 need it too, can we put it into 3.10 
>> or
>> do we have the plan?
> 
> Does it apply to 3.10-stable?  Did you test it there and see if it
> resolves your issue?

I have tested in 3.10.56, the bug is still existing and the patch is apply to 
3.10-stable.
Follow is the result without/with this patch based on 3.10.56.

3.10.56 without the patch:
bash-4.2# perf stat -e ref-cycles sleep 1

 Performance counter stats for 'sleep 1':

 0 ref-cycles

   1.002461500 seconds time elapsed

3.10.56 with the patch:
bash-4.2# perf stat -e ref-cycles sleep 1

 Performance counter stats for 'sleep 1':

ref-cycles

   1.002385243 seconds time elapsed

Best wishes,

zhangzhiqiang



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-10-09 Thread zhangzhiqiang
On 2014/10/9 11:41, gre...@linuxfoundation.org wrote:
 On Thu, Oct 09, 2014 at 11:07:04AM +0800, zhangzhiqiang wrote:
 On 2014/10/8 21:38, Will Deacon wrote:
 On Wed, Oct 08, 2014 at 02:31:47PM +0100, gre...@linuxfoundation.org wrote:
 On Wed, Oct 08, 2014 at 10:17:41AM +0100, Will Deacon wrote:
 On Wed, Oct 08, 2014 at 04:06:12AM +0100, zhangzhiqiang wrote:
 hi all,
 

 ref-cycles event is specially to Intel core, but can still used in arm 
 architecture
 with the wrong return value with 3.10 stable. for instance:

  perf stat -e ref-cycles sleep 1

  Performance counter stats for 'sleep 1':

  0 ref-cycles

1.002381916 seconds time elapsed

 this patch fix the bug and make it return NOT SUPPORTED
 distinctly.

 In upstream this bug has been fixed by other way(not primary for the 
 bug), which changes more than one file
 and more than 1000 lines. the primary commit is 
 6b7658ec8a100b608e59e3cde353434db51f5be0.
 besides we can not simply cherry-pick.

 I thought I saw Greg pick this up the other day?

 Yes, it's in 3.16.4, did I do something wrong by accepting it?

 Nah, it's a trivial patch that I struggle to get excited about. I'm just not
 sure why it's being sent again, after you already accepted it.

 Yes, it's in 3.16.4, in my opinion 3.10 need it too, can we put it into 3.10 
 or
 do we have the plan?
 
 Does it apply to 3.10-stable?  Did you test it there and see if it
 resolves your issue?

I have tested in 3.10.56, the bug is still existing and the patch is apply to 
3.10-stable.
Follow is the result without/with this patch based on 3.10.56.

3.10.56 without the patch:
bash-4.2# perf stat -e ref-cycles sleep 1

 Performance counter stats for 'sleep 1':

 0 ref-cycles

   1.002461500 seconds time elapsed

3.10.56 with the patch:
bash-4.2# perf stat -e ref-cycles sleep 1

 Performance counter stats for 'sleep 1':

   not supported ref-cycles

   1.002385243 seconds time elapsed

Best wishes,

zhangzhiqiang



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-10-08 Thread zhangzhiqiang
On 2014/10/8 21:38, Will Deacon wrote:
> On Wed, Oct 08, 2014 at 02:31:47PM +0100, gre...@linuxfoundation.org wrote:
>> On Wed, Oct 08, 2014 at 10:17:41AM +0100, Will Deacon wrote:
>>> On Wed, Oct 08, 2014 at 04:06:12AM +0100, zhangzhiqiang wrote:
>>>> hi all,
>>>> 
>>>>
>>>> ref-cycles event is specially to Intel core, but can still used in arm 
>>>> architecture
>>>> with the wrong return value with 3.10 stable. for instance:
>>>>
>>>>  perf stat -e ref-cycles sleep 1
>>>>
>>>>  Performance counter stats for 'sleep 1':
>>>>
>>>>0 ref-cycles
>>>>
>>>>1.002381916 seconds time elapsed
>>>>
>>>> this patch fix the bug and make it return NOT SUPPORTED
>>>> distinctly.
>>>>
>>>> In upstream this bug has been fixed by other way(not primary for the bug), 
>>>> which changes more than one file
>>>> and more than 1000 lines. the primary commit is 
>>>> 6b7658ec8a100b608e59e3cde353434db51f5be0.
>>>> besides we can not simply cherry-pick.
>>>
>>> I thought I saw Greg pick this up the other day?
>>
>> Yes, it's in 3.16.4, did I do something wrong by accepting it?
> 
> Nah, it's a trivial patch that I struggle to get excited about. I'm just not
> sure why it's being sent again, after you already accepted it.

Yes, it's in 3.16.4, in my opinion 3.10 need it too, can we put it into 3.10 or
do we have the plan?




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-10-08 Thread zhangzhiqiang
On 2014/10/8 21:38, Will Deacon wrote:
 On Wed, Oct 08, 2014 at 02:31:47PM +0100, gre...@linuxfoundation.org wrote:
 On Wed, Oct 08, 2014 at 10:17:41AM +0100, Will Deacon wrote:
 On Wed, Oct 08, 2014 at 04:06:12AM +0100, zhangzhiqiang wrote:
 hi all,
 

 ref-cycles event is specially to Intel core, but can still used in arm 
 architecture
 with the wrong return value with 3.10 stable. for instance:

  perf stat -e ref-cycles sleep 1

  Performance counter stats for 'sleep 1':

0 ref-cycles

1.002381916 seconds time elapsed

 this patch fix the bug and make it return NOT SUPPORTED
 distinctly.

 In upstream this bug has been fixed by other way(not primary for the bug), 
 which changes more than one file
 and more than 1000 lines. the primary commit is 
 6b7658ec8a100b608e59e3cde353434db51f5be0.
 besides we can not simply cherry-pick.

 I thought I saw Greg pick this up the other day?

 Yes, it's in 3.16.4, did I do something wrong by accepting it?
 
 Nah, it's a trivial patch that I struggle to get excited about. I'm just not
 sure why it's being sent again, after you already accepted it.

Yes, it's in 3.16.4, in my opinion 3.10 need it too, can we put it into 3.10 or
do we have the plan?




--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-10-07 Thread zhangzhiqiang
hi all,


ref-cycles event is specially to Intel core, but can still used in arm 
architecture
with the wrong return value with 3.10 stable. for instance:

 perf stat -e ref-cycles sleep 1

 Performance counter stats for 'sleep 1':

0 ref-cycles

   1.002381916 seconds time elapsed

this patch fix the bug and make it return NOT SUPPORTED
distinctly.

In upstream this bug has been fixed by other way(not primary for the bug), 
which changes more than one file
and more than 1000 lines. the primary commit is 
6b7658ec8a100b608e59e3cde353434db51f5be0.
besides we can not simply cherry-pick.

Signed-off-by: Zhiqiang Zhang 
---
 arch/arm/kernel/perf_event_v7.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 039cffb..c3d24aa 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -126,6 +126,7 @@ static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -250,6 +251,7 @@ static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = 
ARMV7_A9_PERFCTR_STALL_DISPATCH,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -374,6 +376,7 @@ static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -496,6 +499,7 @@ static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -620,6 +624,7 @@ static const unsigned armv7_a7_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
--

so, can we fix it in this way and put it into 3.10 stable repo.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-10-07 Thread zhangzhiqiang
hi all,


ref-cycles event is specially to Intel core, but can still used in arm 
architecture
with the wrong return value with 3.10 stable. for instance:

 perf stat -e ref-cycles sleep 1

 Performance counter stats for 'sleep 1':

0 ref-cycles

   1.002381916 seconds time elapsed

this patch fix the bug and make it return NOT SUPPORTED
distinctly.

In upstream this bug has been fixed by other way(not primary for the bug), 
which changes more than one file
and more than 1000 lines. the primary commit is 
6b7658ec8a100b608e59e3cde353434db51f5be0.
besides we can not simply cherry-pick.

Signed-off-by: Zhiqiang Zhang zhangzhiqiang.zh...@huawei.com
---
 arch/arm/kernel/perf_event_v7.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 039cffb..c3d24aa 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -126,6 +126,7 @@ static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -250,6 +251,7 @@ static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = 
ARMV7_A9_PERFCTR_STALL_DISPATCH,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -374,6 +376,7 @@ static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -496,6 +499,7 @@ static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -620,6 +624,7 @@ static const unsigned armv7_a7_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
--

so, can we fix it in this way and put it into 3.10 stable repo.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Fwd: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-09-26 Thread zhangzhiqiang
hi all,


ref-cycles event is specially to Intel core, but can still used in arm 
architecture
with the wrong return value with 3.10 stable. this patch fix the bug and make 
it return NOT SUPPORTED
distinctly.

In upstream this bug has been fixed by other way, which changes more than one 
file
and more than 1000 lines. the primary commit is 
6b7658ec8a100b608e59e3cde353434db51f5be0.
besides we can not simply cherry-pick.

Signed-off-by: Zhiqiang Zhang 
---
 arch/arm/kernel/perf_event_v7.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 039cffb..c3d24aa 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -126,6 +126,7 @@ static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -250,6 +251,7 @@ static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = 
ARMV7_A9_PERFCTR_STALL_DISPATCH,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -374,6 +376,7 @@ static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -496,6 +499,7 @@ static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -620,6 +624,7 @@ static const unsigned armv7_a7_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
--

can we put it into stable repo.


.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[request for stable inclusion] perf kmem: Make it work again on non NUMA machines

2014-09-26 Thread zhangzhiqiang
hi all,

Now on non NUMA machines with 3.10 stable,perf kmem command does not work well. 
For instance,
when exec perf kmem record sleep 2, we can get the perf.data file correctly. 
but when we exec
perf kmem stat there is nothing return.
In upstream the bug has been fixed and perf kmem work well on non NUMA machines.

Can we cherry-pick it to stable repo.

The commit id is 4921e320244e099bdf237fd10428594ce5f5b87d,the detail as follows:

commit 4921e320244e099bdf237fd10428594ce5f5b87d
Author: Jiri Olsa 
Date:   Thu Sep 12 18:39:36 2013 +0200

perf kmem: Make it work again on non NUMA machines

The commit '2814eb0 perf kmem: Remove die() calls' disabled 'perf kmem'
command for machines without numa support. It made the command fail if
'/sys/devices/system/node' dir wasn't found.

Skipping the numa based initialization in case the directory is not
found and continue execution.

Signed-off-by: Jiri Olsa 
Cc: Corey Ashford 
Cc: Frederic Weisbecker 
Cc: Namhyung Kim 
Cc: Paul Mackerras 
Cc: Peter Zijlstra 
Link: 
http://lkml.kernel.org/r/1379003976-5839-5-git-send-email-jo...@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo 

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index c2dff9c..9b5f077 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -101,7 +101,7 @@ static int setup_cpunode_map(void)

dir1 = opendir(PATH_SYS_NODE);
if (!dir1)
-   return -1;
+ return 0;

while ((dent1 = readdir(dir1)) != NULL) {
if (dent1->d_type != DT_DIR ||



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[request for stable inclusion] perf kmem: Make it work again on non NUMA machines

2014-09-26 Thread zhangzhiqiang
hi all,

Now on non NUMA machines with 3.10 stable,perf kmem command does not work well. 
For instance,
when exec perf kmem record sleep 2, we can get the perf.data file correctly. 
but when we exec
perf kmem stat there is nothing return.
In upstream the bug has been fixed and perf kmem work well on non NUMA machines.

Can we cherry-pick it to stable repo.

The commit id is 4921e320244e099bdf237fd10428594ce5f5b87d,the detail as follows:

commit 4921e320244e099bdf237fd10428594ce5f5b87d
Author: Jiri Olsa jo...@redhat.com
Date:   Thu Sep 12 18:39:36 2013 +0200

perf kmem: Make it work again on non NUMA machines

The commit '2814eb0 perf kmem: Remove die() calls' disabled 'perf kmem'
command for machines without numa support. It made the command fail if
'/sys/devices/system/node' dir wasn't found.

Skipping the numa based initialization in case the directory is not
found and continue execution.

Signed-off-by: Jiri Olsa jo...@redhat.com
Cc: Corey Ashford cjash...@linux.vnet.ibm.com
Cc: Frederic Weisbecker fweis...@gmail.com
Cc: Namhyung Kim namhy...@kernel.org
Cc: Paul Mackerras pau...@samba.org
Cc: Peter Zijlstra a.p.zijls...@chello.nl
Link: 
http://lkml.kernel.org/r/1379003976-5839-5-git-send-email-jo...@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index c2dff9c..9b5f077 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -101,7 +101,7 @@ static int setup_cpunode_map(void)

dir1 = opendir(PATH_SYS_NODE);
if (!dir1)
-   return -1;
+ return 0;

while ((dent1 = readdir(dir1)) != NULL) {
if (dent1-d_type != DT_DIR ||



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Fwd: [PATCH] arm: armv7: perf: fix armv7 ref-cycles error

2014-09-26 Thread zhangzhiqiang
hi all,


ref-cycles event is specially to Intel core, but can still used in arm 
architecture
with the wrong return value with 3.10 stable. this patch fix the bug and make 
it return NOT SUPPORTED
distinctly.

In upstream this bug has been fixed by other way, which changes more than one 
file
and more than 1000 lines. the primary commit is 
6b7658ec8a100b608e59e3cde353434db51f5be0.
besides we can not simply cherry-pick.

Signed-off-by: Zhiqiang Zhang zhangzhiqiang.zh...@huawei.com
---
 arch/arm/kernel/perf_event_v7.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 039cffb..c3d24aa 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -126,6 +126,7 @@ static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -250,6 +251,7 @@ static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = 
ARMV7_A9_PERFCTR_STALL_DISPATCH,
+   [PERF_COUNT_HW_REF_CPU_CYCLES]  = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -374,6 +376,7 @@ static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -496,6 +499,7 @@ static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
@@ -620,6 +624,7 @@ static const unsigned armv7_a7_perf_map[PERF_COUNT_HW_MAX] 
= {
[PERF_COUNT_HW_BUS_CYCLES]  = ARMV7_PERFCTR_BUS_CYCLES,
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = HW_OP_UNSUPPORTED,
+   [PERF_COUNT_HW_REF_CPU_CYCLES] = HW_OP_UNSUPPORTED,
 };

 static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
--

can we put it into stable repo.


.




--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/