From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 7DB6B3814FE3 for ; Mon, 30 May 2022 12:33:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7DB6B3814FE3 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24UC1F08014860; Mon, 30 May 2022 12:32:59 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gcu953b3j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 12:32:59 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24UBV9OD027877; Mon, 30 May 2022 12:32:58 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gcu953b36-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 12:32:58 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24UCGuYK005242; Mon, 30 May 2022 12:32:56 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3gbbynjqea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 12:32:56 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24UCWruj27656484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 May 2022 12:32:53 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A9BAB42047; Mon, 30 May 2022 12:32:53 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 543A54203F; Mon, 30 May 2022 12:32:53 +0000 (GMT) Received: from [9.171.0.196] (unknown [9.171.0.196]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 30 May 2022 12:32:53 +0000 (GMT) Message-ID: <9b590ab67a577a7f175b67b4865835e4f1bf9f29.camel@linux.ibm.com> Subject: Re: [PATCH 0/5] gdb.perf/: Add JIT performance test From: Ilya Leoshkevich To: Andrew Burgess , Tom Tromey Cc: Ulrich Weigand , Andreas Arnez , Pedro Alves , gdb-patches@sourceware.org Date: Mon, 30 May 2022 14:32:53 +0200 In-Reply-To: <87o7zjgvjb.fsf@redhat.com> References: <20220525223711.845475-1-iii@linux.ibm.com> <87o7zjgvjb.fsf@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: w8ffMW6WptFJ6vmy6AVZoYJKAPq7mYT3 X-Proofpoint-GUID: QHzEx4xyxRL1ug326BzdpU4WsTxXQy7j 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-30_04,2022-05-30_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 clxscore=1015 mlxscore=0 suspectscore=0 impostorscore=0 mlxlogscore=728 priorityscore=1501 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205300065 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, 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 12:33:03 -0000 On Fri, 2022-05-27 at 10:43 +0100, Andrew Burgess wrote: > Ilya Leoshkevich writes: > > > Hi, > > > > This series implements a JIT performance test as discussed in [1]. > > Patch 1 is a small fix, patches 2-4 are preparations and patch 5 is > > the test itself. > > > > The test can be used as follows: > > > > $ make build-perf -j"$(nproc)" RUNTESTFLAGS=jit.exp > > $ make check-perf RUNTESTFLAGS=jit-check.exp GDB_PERFTEST_MODE=run > > > > The results can be converted to gnuplot-friendly format as follows: > > > > $ perl -ne 'if (/:register_times:(\d+) (.+)/) { print "$1 $2\n"; }' > > \ > >       jit.txt > > > > I've uploaded the results to [2].  They are somewhat different from > > those from Andrew, but they still show that [1] is an improvement. > > I'm sure the reason for this difference is down to something I did > differently (wrong?) in my original benchmark, but I think it would > be > really good to understand what that mistake was, as the performance > characteristics between my benchmark and yours are quite different. > > I am taking a look at this myself, but it would be great if you could > run my original benchmark and let me know if you see result similar > to > mine, or more similar to your benchmark. > > If you can quickly spot why my benchmark does so much better (when > patched) then I'd love to hear why! > > Thanks, > Andrew Hi, The problem is that I compile the shared objects with -fPIC, which makes section addresses relative. However, the gdb JIT infrastructure treats them as absolute, so a lot of overlaps arise. This makes the unhappy /* Sort on sequence number of the objfile in the chain. */ case in sort_cmp () occur extremely often, which then pollutes the results. I'll fix this, measure again and send v2. Best regards, Ilya