On Wed, 15 May 2019 at 19:08, Leo Yan leo.yan@linaro.org wrote:
Hi Mathieu,
On Wed, May 15, 2019 at 02:36:29PM -0600, Mathieu Poirier wrote:
On Mon, 6 May 2019 at 03:41, Leo Yan leo.yan@linaro.org wrote:
This patch adds two testings for 'perf report' command.
The first testing is a general report testing with branch samples, the second testing is to use option '--itrace=i1000i' to insert synthesized instructions events and the script will check if perf can output the percentage value successfully based on the instruction samples.
Signed-off-by: Leo Yan leo.yan@linaro.org
...etm.sh => record+script+report_arm_cs_etm.sh} | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) rename tools/perf/tests/shell/{record+script_arm_cs_etm.sh => record+script+report_arm_cs_etm.sh} (79%)
Wouldn't it be better to just name the script "test_arm_coresight.sh" so that we can make any changes we want to it without having to rethink the name every time?
Will fix it.
diff --git a/tools/perf/tests/shell/record+script_arm_cs_etm.sh b/tools/perf/tests/shell/record+script+report_arm_cs_etm.sh similarity index 79% rename from tools/perf/tests/shell/record+script_arm_cs_etm.sh rename to tools/perf/tests/shell/record+script+report_arm_cs_etm.sh index 108604984867..ea053ed4bbb1 100755 --- a/tools/perf/tests/shell/record+script_arm_cs_etm.sh +++ b/tools/perf/tests/shell/record+script+report_arm_cs_etm.sh @@ -31,6 +31,18 @@ perf_script_branch_samples() { egrep " +touch +[0-9]+ .* +branches: +" }
+perf_report_branch_samples() {
echo "Looking at perf.data file for reporting branch samples:"
perf report --stdio -i ${perfdata} | \
egrep " +[0-9]+\.[0-9]+% +[0-9]+\.[0-9]+% +touch "
Please document the the 'egrep' is looking for with an example of the 'report' output.
Will add.
+}
+perf_report_instruction_samples() {
echo "Looking at perf.data file for instruction samples:"
perf report --itrace=i1000i --stdio -i ${perfdata} | \
egrep " +[0-9]+\.[0-9]+% +touch"
Same here. You should also consider merging the patches together.
Will add the example output and merge two patches.
I tested this and things work quite well.
Thanks a lot for reviewing and testing!
Will wait for a bit time in case others have more suggestion for this, then I will send patch to LKML for wider reviewing.
For now there is no point in making this public on LKML since the topology information in sysfs isn't completely settled. Mike and Suzuki are currently working on finding a representation that will be suitable for both data and signal components. In the mean time I suggest you rebase your work on 5.2-rc1 when it comes out and send another revision that addresses the above comment. I would also prepare a branch for people to clone and test.
Mathieu
Thanks, Leo Yan