Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp74785lqs; Thu, 13 Jun 2024 04:27:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxdiLi/ZDp7LUwMlXFkxJyMKB/Nh4DKg85MpW3qMHe+oaDBiQMo0V6ce/XX1PafjrdE+CxxmDAIfjGBKcC6lleH7v0wqmCR5rV16uXZA== X-Google-Smtp-Source: AGHT+IE+MY4L0HCWd4eanlMS3BLZpprhDtgLwhs9hbEzypQwllts1tHKKQYK7rMEscAq0nbn3kMP X-Received: by 2002:a0d:e657:0:b0:630:36fa:b271 with SMTP id 00721157ae682-63036fab717mr35250927b3.41.1718278060805; Thu, 13 Jun 2024 04:27:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718278060; cv=pass; d=google.com; s=arc-20160816; b=iMLbll3qhu1rarm3GZprHCWMnQpnJkzAmjNmQ6GVHC+gsOkYmEYqCbYTioaVjWQMfp D1umvQohctkoGQdsndxn0Z8IVyH3ZMw3iD2xkgPrYlok2sYCCuWR3ZgVb4vBI4wrgz8H Sb1ot/TlyFT9iFlEo3kyA9KiUWmMgDD4EXB28xfnAWrXa2S8Qi0SLxB4ttm4qZ3YeCic DOfSYiwP9//iiKkEtAx3LIW9wVDoxDr2WXDHz3Jhf7Gz0QgnkzLd/Q3/RhN5/5RFWV6g ZkycbKgjDF1TRH4Un8GzcfVuelpwXwAffhU5rV1xexstkuoQM7qPv/4bsVc8QTjZFMnq p0VA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=vH7wvLw/fbaso/2vKJV9FkAQ/JV6KMc2dBTHBYAqFc8=; fh=5a+Wx783XmQPihkKeBQBI7cD6zjOCSCFwDahEdzHe4w=; b=nsWLq8v1UdoFfKy2nKboroUWdH6vwdvwNEsnqDFegZLD5P9rJHMkQPzmO8VLTEzbtq gc3DO74NDvwGp5BrlpO/mpYcGp48NndPLNpE1AdFqjIBGW2j6GmFEJ2JLmONI8K/5Fit G4QetRNXIPDHAdft2p0rQiu6MC/1FD9O3lQimVGHeSC1A0J+TwnQuNGhWBXPG+AhRZH8 MK1jQwvl/KMudnoNjNMEis2Rbl69oYyFymM6WbO05zk/bOpNI/g9sRz9UYogr7bCoS8S 0dbRLe8y3oj2RDULXQ6q825LFUj8X9u/hGAiLd7RiA7srJ0c1It/s7i4MyVP1+osyE3u QCxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=LuN5eF9+; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-213092-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5a35dd4si12792136d6.168.2024.06.13.04.27.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 04:27:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213092-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=LuN5eF9+; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-213092-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 710EF1C21F06 for ; Thu, 13 Jun 2024 11:27:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E851142E87; Thu, 13 Jun 2024 11:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="LuN5eF9+" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E6F9605C6; Thu, 13 Jun 2024 11:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718278053; cv=none; b=HuspsGSPh9UZvziSi6wdbc1wQtUHA+yB0CpH5po59Ec98O5YhrJJBg2BGlL2e/cubsFV+sIGHqZMjtsLWZy1nSMRxXla2yVtCAUNMpCoMH+7x8ilAddo1G7zMoFHMDaDj9YUpDEjJTUq5PGtFjx/4EreWk34Yi6Zb2tvcgxCFqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718278053; c=relaxed/simple; bh=iL7CwAKS/IwL8enlPQzHrOq5sJ73P0VF652E/ZHm7zw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tM33Cb+etD8xYYY/BRp/uMZyPvCXH/QVWq0XVHOOp6+DKGqBq/BRs1PRiZCDqPALqeoqEmL/CxWwwUO2fRH9Frpca/5T5FGuFPdoFPy/3QgSOItKOhlTQ5XMqiIN2b9YT/+s849W0qaekj8BJonFGUTsyv6lR0X2oS30chBU0AY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=LuN5eF9+; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45DBKUUx025624; Thu, 13 Jun 2024 11:27:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=pp1; bh=vH7wvLw/fbaso/2vKJV9FkAQ/J V6KMc2dBTHBYAqFc8=; b=LuN5eF9++GnjvHuSZ9HtyzV+RYPLz9WUyTthxDr0s0 jo5GSA3jMPkwF77T9cE9dsLumilzhxeaFoPoMXSFq4Pzawme0JtTqTLSryninl9t suYOE8/4p09bI2rMY6crmAjlBzY6bp7diSw9Url4XJ4/6k/7xfW1HdfarNXuVU3s xA1Q+EqvBs3Y3ssRCTF7ihkdBhUVXklKXnv5sR4dbtiRUE7T9aL4bfghNTy/z6sz NiD4vG4JyKAnIPTNK9WWit7Y0tZW0HGnMmCCbnpNetI9bxPLvjQIk697xdvcgsDL gz249ZQ1gskKV1B7GYxTnqoJo/q4eEZZ8CyTyQE8IBUw== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yqrexs8sk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 11:27:27 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45DBHaE2028690; Thu, 13 Jun 2024 11:27:26 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3yn1muq45j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 11:27:26 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45DBRK8e43057510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Jun 2024 11:27:22 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3FA620043; Thu, 13 Jun 2024 11:27:20 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A11F520040; Thu, 13 Jun 2024 11:27:20 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 13 Jun 2024 11:27:20 +0000 (GMT) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org, namhyung@kernel.org Cc: svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com, hca@linux.ibm.com, Thomas Richter Subject: [PATCH] perf/test: Speed up test case perf annotate basic tests Date: Thu, 13 Jun 2024 13:26:55 +0200 Message-Id: <20240613112655.4082737-1-tmricht@linux.ibm.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Dh4YQfKtkZHP9eOakg6Sfdxws854P7_g X-Proofpoint-ORIG-GUID: Dh4YQfKtkZHP9eOakg6Sfdxws854P7_g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-13_03,2024-06-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 spamscore=0 mlxscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406130082 perf test 70 takes a long time. One culprit is the output of command perf annotate. Per default enabled are - demangle symbol names - interleave source code with assembly code. Disable demangle of symbols and abort the annotation after the first 250 lines. This speeds up the test case considerable, for example on s390: Output before: # time perf test 70 70: perf annotate basic tests : Ok ..... real 2m7.467s user 1m26.869s sys 0m34.086s # Output after: # time perf test 70 70: perf annotate basic tests : Ok real 0m3.341s user 0m1.606s sys 0m0.362s # Signed-off-by: Thomas Richter Suggested-by: Namhyung Kim --- tools/perf/tests/shell/annotate.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/tests/shell/annotate.sh b/tools/perf/tests/shell/annotate.sh index b072d9b97387..b28cd95b1d83 100755 --- a/tools/perf/tests/shell/annotate.sh +++ b/tools/perf/tests/shell/annotate.sh @@ -43,7 +43,7 @@ test_basic() { fi # Generate the annotated output file - perf annotate -i "${perfdata}" --stdio 2> /dev/null > "${perfout}" + perf annotate --no-demangle -i "${perfdata}" --stdio 2> /dev/null | head -250 > "${perfout}" # check if it has the target symbol if ! grep "${testsym}" "${perfout}" @@ -62,8 +62,8 @@ test_basic() { fi # check again with a target symbol name - if ! perf annotate -i "${perfdata}" "${testsym}" 2> /dev/null | \ - grep -m 3 "${disasm_regex}" + if ! perf annotate --no-demangle -i "${perfdata}" "${testsym}" 2> /dev/null | \ + head -250 | grep -m 3 "${disasm_regex}" then echo "Basic annotate [Failed: missing disasm output when specifying the target symbol]" err=1 @@ -71,8 +71,8 @@ test_basic() { fi # check one more with external objdump tool (forced by --objdump option) - if ! perf annotate -i "${perfdata}" --objdump=objdump 2> /dev/null | \ - grep -m 3 "${disasm_regex}" + if ! perf annotate --no-demangle -i "${perfdata}" --objdump=objdump 2> /dev/null | \ + head -250 | grep -m 3 "${disasm_regex}" then echo "Basic annotate [Failed: missing disasm output from non default disassembler (using --objdump)]" err=1 -- 2.45.2