From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id D62153831288 for ; Wed, 25 May 2022 22:37:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D62153831288 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24PK6cVq030498; Wed, 25 May 2022 22:37:22 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g9pw6qrc5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 22:37:22 +0000 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24PMUHc5030208; Wed, 25 May 2022 22:37:21 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g9pw6qrbm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 22:37:21 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24PMbJL4018789; Wed, 25 May 2022 22:37:19 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma02fra.de.ibm.com with ESMTP id 3g9s6m88w6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 22:37:19 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24PMbEQ052756816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 May 2022 22:37:14 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 54979A4059; Wed, 25 May 2022 22:37:14 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB03BA4057; Wed, 25 May 2022 22:37:13 +0000 (GMT) Received: from heavy.lan (unknown [9.171.15.184]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 25 May 2022 22:37:13 +0000 (GMT) From: Ilya Leoshkevich To: Tom Tromey Cc: Ulrich Weigand , Andreas Arnez , Andrew Burgess , Pedro Alves , gdb-patches@sourceware.org, Ilya Leoshkevich Subject: [PATCH 2/5] gdb.perf/: Add binary_link_with_shlibs setting to GenPerfTest Date: Thu, 26 May 2022 00:37:08 +0200 Message-Id: <20220525223711.845475-3-iii@linux.ibm.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220525223711.845475-1-iii@linux.ibm.com> References: <20220525223711.845475-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: aZkYJ1xjJGG5PJKdAxeO0Aw4dPQGVSW5 X-Proofpoint-ORIG-GUID: 87pGo4N78cC0Y2cvAXThCyT_VkC1X9vx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-25_06,2022-05-25_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205250104 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2022 22:37:26 -0000 Performance tests that dynamically load generated shared libraries do not need to link with them. Provide an option to avoid this. --- gdb/testsuite/lib/gen-perf-test.exp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/lib/gen-perf-test.exp b/gdb/testsuite/lib/gen-perf-test.exp index 0a5607c2c9a..f0bfdc9317d 100644 --- a/gdb/testsuite/lib/gen-perf-test.exp +++ b/gdb/testsuite/lib/gen-perf-test.exp @@ -100,6 +100,9 @@ namespace eval GenPerfTest { # The number of compunits in each objfile. set DEFAULT_NR_COMPUNITS 1 + # Link the binary with the generated shared libraries by default + set DEFAULT_BINARY_LINK_WITH_SHLIBS 1 + # The number of public globals in each compunit. set DEFAULT_NR_EXTERN_GLOBALS 1 @@ -254,6 +257,7 @@ namespace eval GenPerfTest { set testcase(tail_shlib_headers) $GenPerfTest::DEFAULT_TAIL_SHLIB_HEADERS set testcase(nr_gen_shlibs) $GenPerfTest::DEFAULT_NR_GEN_SHLIBS set testcase(nr_compunits) $GenPerfTest::DEFAULT_NR_COMPUNITS + set testcase(binary_link_with_shlibs) $GenPerfTest::DEFAULT_BINARY_LINK_WITH_SHLIBS set testcase(nr_extern_globals) $GenPerfTest::DEFAULT_NR_EXTERN_GLOBALS set testcase(nr_static_globals) $GenPerfTest::DEFAULT_NR_STATIC_GLOBALS @@ -281,7 +285,7 @@ namespace eval GenPerfTest { binary_extra_sources binary_extra_headers gen_shlib_extra_sources gen_shlib_extra_headers tail_shlib_sources tail_shlib_headers - nr_gen_shlibs nr_compunits + nr_gen_shlibs nr_compunits binary_link_with_shlibs nr_extern_globals nr_static_globals nr_extern_functions nr_static_functions class_specs @@ -1298,14 +1302,16 @@ namespace eval GenPerfTest { proc _make_shlib_options { self_var static run_nr } { upvar 1 $self_var self - set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr] set result "" - for { set i 0 } { $i < $nr_gen_shlibs } { incr i } { - lappend result "shlib=[_make_shlib_name self $static $run_nr $i]" - } - set tail_shlib_name [_make_tail_shlib_name self $static $run_nr] - if { "$tail_shlib_name" != "" } { - lappend result "shlib=$tail_shlib_name" + if { [_get_param $self(binary_link_with_shlibs) $run_nr] } { + set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr] + for { set i 0 } { $i < $nr_gen_shlibs } { incr i } { + lappend result "shlib=[_make_shlib_name self $static $run_nr $i]" + } + set tail_shlib_name [_make_tail_shlib_name self $static $run_nr] + if { "$tail_shlib_name" != "" } { + lappend result "shlib=$tail_shlib_name" + } } return $result } -- 2.35.3