From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gI7sDoFBlWIQVAkAWB0awg (envelope-from ) for ; Mon, 30 May 2022 18:13:21 -0400 Received: by simark.ca (Postfix, from userid 112) id 38A2E1E221; Mon, 30 May 2022 18:13:21 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=CfQ5xVmt; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B1E2B1E01D for ; Mon, 30 May 2022 18:13:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 38F5238485A4 for ; Mon, 30 May 2022 22:13:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38F5238485A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653948800; bh=MwmsW1b9vtHeIWLINq0PODY2XKKsJcdg4kYwdVlxzMk=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CfQ5xVmtopmR+G8f0/W2fNFstw41EWuXnw5QTUYnFzk81UbeVFLAOSmPlzl9PDRH/ Q1hmqg77OT7ZfXvhzgY2YPE4gdJ+b0jF0KcFggVh1kQet+x3v+tQiAn9LUKjoU2uaN a7RcHA71Mqbr+ssvDAJXbnAd3l/J7k6Eng6oi+7Q= 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) To: Tom Tromey , Andrew Burgess 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-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: , From: Ilya Leoshkevich via Gdb-patches Reply-To: Ilya Leoshkevich Cc: Ulrich Weigand , Andreas Arnez , gdb-patches@sourceware.org, Pedro Alves , Ilya Leoshkevich Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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