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 C79F5384BC2C for ; Mon, 30 May 2022 22:12:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C79F5384BC2C Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24ULfpbH002010; Mon, 30 May 2022 22:12:15 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gd62mgcgx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:12:15 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24UM3Sjf006774; Mon, 30 May 2022 22:12:14 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gd62mgcgb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:12:14 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24UM7lCJ031808; Mon, 30 May 2022 22:12:12 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 3gbcb7jdkd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:12:11 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24UMB3Ar19923328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 May 2022 22:11:03 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E06E4C046; Mon, 30 May 2022 22:12:07 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D51DF4C040; Mon, 30 May 2022 22:12:06 +0000 (GMT) Received: from heavy.ibmuc.com (unknown [9.171.0.196]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 30 May 2022 22:12:06 +0000 (GMT) From: Ilya Leoshkevich To: Tom Tromey , Andrew Burgess Cc: Ulrich Weigand , Andreas Arnez , Pedro Alves , gdb-patches@sourceware.org, Ilya Leoshkevich Subject: [PATCH v2 2/7] gdb.perf/: Add binary_link_with_shlibs setting to GenPerfTest Date: Tue, 31 May 2022 00:11:42 +0200 Message-Id: <20220530221147.1991835-3-iii@linux.ibm.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220530221147.1991835-1-iii@linux.ibm.com> References: <20220530221147.1991835-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 0Es70w8VEhjVjvpDf0ye00F0q8XDsCmm X-Proofpoint-ORIG-GUID: ePMvRs33l7QZV9QDDVUwKPcs8u52Mkzz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-05-30_09,2022-05-30_03,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 bulkscore=0 malwarescore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205300117 X-Spam-Status: No, score=-11.4 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: Mon, 30 May 2022 22:12:20 -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..07007db0834 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 + # Should the binary be linked with the generated shared libraries? + set DEFAULT_BINARY_LINK_WITH_SHLIBS true + # 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