Skip to contentSkip to conversation

perf test: Fix a typo in cs-etm testing

PATCH RESEND In review Leo Yan 3 participants 6 messages Nov 10, 2020 – Nov 11, 2020 perf events

lore
Share & tools
lore

Leo Yan

author
#0 lore raw

PATCH RESEND 1/2 perf test: Fix a typo in cs-etm testing

Fix a typo: s/devce_name/device_name.

Fixes fe0aed19b266 ("perf test: Introduce script for Arm CoreSight testing")

---

Resend patches for adding "Fixes" tags.

 tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_arm_coresight.sh +1 -1
index 8d84fdbed6a6..59d847d4981d 100755
@@ -105,7 +105,7 @@ arm_cs_iterate_devices() {
 		#     `> device_name = 'tmc_etf0'
 		device_name=$(basename $path)
 
-		if is_device_sink $path $devce_name; then
+		if is_device_sink $path $device_name; then
 
 			record_touch_file $device_name $2 &&
 			perf_script_branch_samples touch &&
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH RESEND 2/2 perf test: Update branch sample parttern for cs-etm

Since the commit 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting"), 'exclude_guest=1' is set for user-space counting; and the branch sample's modifier has been altered, the sample event name has been changed from "branches:u:" to "branches:uH:", which gives out info for "user-space and host counting".

But the cs-etm testing's regular expression cannot match the updated branch sample event and leads to test failure.

This patch updates the branch sample parttern by using a more flexible expression '.*' to match branch sample's modifiers, so that allows the testing to work as expected.

Fixes 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting")
---
 tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_arm_coresight.sh +1 -1
index 59d847d4981d..18fde2f179cd 100755
@@ -44,7 +44,7 @@ perf_script_branch_samples() {
 	#   touch  6512          1         branches:u:      ffffb22082e0 strcmp+0xa0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	#   touch  6512          1         branches:u:      ffffb2208320 strcmp+0xe0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	perf script -F,-time -i ${perfdata} | \
-		egrep " +$1 +[0-9]+ .* +branches:([u|k]:)? +"
+		egrep " +$1 +[0-9]+ .* +branches:(.*:)? +"
 }
 
 perf_report_branch_samples() {
Signature · 1 line
2.17.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH RESEND 2/2] perf test: Update branch sample parttern for cs-etm

Quoted 10 lines · Leo Yan

Since the commit 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting"), 'exclude_guest=1' is set for user-space counting; and the branch sample's modifier has been altered, the sample event name has been changed from "branches:u:" to "branches:uH:", which gives out info for "user-space and host counting".

But the cs-etm testing's regular expression cannot match the updated branch sample event and leads to test failure.

This patch updates the branch sample parttern by using a more flexible

s/parttern/pattern

Quoted 8 lines

expression '.*' to match branch sample's modifiers, so that allows the testing to work as expected.

Fixes 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting")
---
 tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here too I would CC stable. With the above:

Quoted 17 lines
tools/perf/tests/shell/test_arm_coresight.sh +1 -1
index 59d847d4981d..18fde2f179cd 100755
@@ -44,7 +44,7 @@ perf_script_branch_samples() {
 	#   touch  6512          1         branches:u:      ffffb22082e0 strcmp+0xa0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	#   touch  6512          1         branches:u:      ffffb2208320 strcmp+0xe0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	perf script -F,-time -i ${perfdata} | \
-		egrep " +$1 +[0-9]+ .* +branches:([u|k]:)? +"
+		egrep " +$1 +[0-9]+ .* +branches:(.*:)? +"
 }
 
 perf_report_branch_samples() {
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH RESEND 2/2] perf test: Update branch sample parttern for cs-etm

Em Tue, Nov 10, 2020 at 11:08:29AM -0700, Mathieu Poirier escreveu:

Quoted 7 lines · Leo Yan
Quoted 6 lines

Since the commit 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting"), 'exclude_guest=1' is set for user-space counting; and the branch sample's modifier has been altered, the sample event name has been changed from "branches:u:" to "branches:uH:", which gives out info for "user-space and host counting".

Quoted 6 lines
Quoted 4 lines

But the cs-etm testing's regular expression cannot match the updated branch sample event and leads to test failure.

This patch updates the branch sample parttern by using a more flexible

s/parttern/pattern

I'll fix it and add stable@ to the CC list, thanks

Quoted 30 lines
Quoted 8 lines

expression '.*' to match branch sample's modifiers, so that allows the testing to work as expected.

Fixes 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting")
---
 tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here too I would CC stable. With the above:

Quoted 17 lines
tools/perf/tests/shell/test_arm_coresight.sh +1 -1
index 59d847d4981d..18fde2f179cd 100755
@@ -44,7 +44,7 @@ perf_script_branch_samples() {
 	#   touch  6512          1         branches:u:      ffffb22082e0 strcmp+0xa0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	#   touch  6512          1         branches:u:      ffffb2208320 strcmp+0xe0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	perf script -F,-time -i ${perfdata} | \
-		egrep " +$1 +[0-9]+ .* +branches:([u|k]:)? +"
+		egrep " +$1 +[0-9]+ .* +branches:(.*:)? +"
 }
 
 perf_report_branch_samples() {
Signature · 1 line
2.17.1
Signature · 1 line
- Arnaldo
author
#4 lore raw

Re: [PATCH RESEND 2/2] perf test: Update branch sample parttern for cs-etm

Quoted 8 lines · Arnaldo Carvalho de Melo

Em Tue, Nov 10, 2020 at 11:08:29AM -0700, Mathieu Poirier escreveu:

Quoted 7 lines · Leo Yan
Quoted 6 lines

Since the commit 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting"), 'exclude_guest=1' is set for user-space counting; and the branch sample's modifier has been altered, the sample event name has been changed from "branches:u:" to "branches:uH:", which gives out info for "user-space and host counting".

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

But the cs-etm testing's regular expression cannot match the updated branch sample event and leads to test failure.

This patch updates the branch sample parttern by using a more flexible

s/parttern/pattern

I'll fix it and add stable@ to the CC list, thanks

Thanks, Arnaldo and Mathieu.

Will take care for sending stable list in next time.

Quoted 34 lines
Quoted 30 lines
Quoted 8 lines

expression '.*' to match branch sample's modifiers, so that allows the testing to work as expected.

Fixes 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting")
---
 tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here too I would CC stable. With the above:

Quoted 17 lines
tools/perf/tests/shell/test_arm_coresight.sh +1 -1
index 59d847d4981d..18fde2f179cd 100755
@@ -44,7 +44,7 @@ perf_script_branch_samples() {
 	#   touch  6512          1         branches:u:      ffffb22082e0 strcmp+0xa0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	#   touch  6512          1         branches:u:      ffffb2208320 strcmp+0xe0 (/lib/aarch64-linux-gnu/ld-2.27.so)
 	perf script -F,-time -i ${perfdata} | \
-		egrep " +$1 +[0-9]+ .* +branches:([u|k]:)? +"
+		egrep " +$1 +[0-9]+ .* +branches:(.*:)? +"
 }
 
 perf_report_branch_samples() {
Signature · 1 line
2.17.1
Signature · 1 line
- Arnaldo
Reviewed-by on v1 1/2
#5 lore raw
In reply to Leo Yan
Quoted 6 lines · Leo Yan

Fix a typo: s/devce_name/device_name.

Fixes fe0aed19b266 ("perf test: Introduce script for Arm CoreSight testing")

---

I would CC stable too.

Quoted 21 lines

Resend patches for adding "Fixes" tags.

 tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_arm_coresight.sh +1 -1
index 8d84fdbed6a6..59d847d4981d 100755
@@ -105,7 +105,7 @@ arm_cs_iterate_devices() {
 		#     `> device_name = 'tmc_etf0'
 		device_name=$(basename $path)
 
-		if is_device_sink $path $devce_name; then
+		if is_device_sink $path $device_name; then
 
 			record_touch_file $device_name $2 &&
 			perf_script_branch_samples touch &&
Signature · 1 line
2.17.1