From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uhkKI37XsmJgOgQAWB0awg (envelope-from ) for ; Wed, 22 Jun 2022 04:49:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 78D4F1E220; Wed, 22 Jun 2022 04:49:02 -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=t/Syq+pU; 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=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.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 9B51F1E15D for ; Wed, 22 Jun 2022 04:48:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A173383469B for ; Wed, 22 Jun 2022 08:48:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A173383469B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1655887739; bh=sKj9lswaiCazp9fpE3Vgr0yjEhhULjjGwrMYCjmLI2I=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=t/Syq+pUGO5Sd2GMHoz7QaipOKnvFs2C/WrjHqGrICehE86tuFbrqEvQ1p1gsiq+3 xcHy9/7ox02CZ9ipgM9tU87rCTgcYCkZArBXw2rWBc3EL87WqwTdhuO2SLcpRswMLh 2uwnJlsA2LGFHNB9M/mPH1WeeQ/tMiGXpCiK6Cfc= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id DC4CA38346AA for ; Wed, 22 Jun 2022 08:48:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC4CA38346AA Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25M8gIR8028764; Wed, 22 Jun 2022 08:48:35 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3guysyr4u4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jun 2022 08:48:35 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 25M8iXG5007849; Wed, 22 Jun 2022 08:48:34 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3guysyr4su-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jun 2022 08:48:34 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25M8Zeuo023749; Wed, 22 Jun 2022 08:48:32 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma01fra.de.ibm.com with ESMTP id 3gs6b8m747-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jun 2022 08:48:32 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25M8mTDS19464602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jun 2022 08:48:29 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C84DA404D; Wed, 22 Jun 2022 08:48:29 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C4F68A4040; Wed, 22 Jun 2022 08:48:28 +0000 (GMT) Received: from [9.155.208.113] (unknown [9.155.208.113]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 22 Jun 2022 08:48:28 +0000 (GMT) Message-ID: Subject: [PING] [PATCH v2 0/7] gdb.perf/: Add JIT performance test To: Tom Tromey , Andrew Burgess , Pedro Alves Date: Wed, 22 Jun 2022 10:48:28 +0200 In-Reply-To: <20220530221147.1991835-1-iii@linux.ibm.com> References: <20220530221147.1991835-1-iii@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: gwBbSirIRafYUsNbHchh0Im5cPhR1iTF X-Proofpoint-ORIG-GUID: jN3SjPN5EPdLaKW9pzvJ3sp5eHYuI6aQ Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-21_11,2022-06-22_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 phishscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 impostorscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206220041 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 Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Tue, 2022-05-31 at 00:11 +0200, Ilya Leoshkevich wrote: > Hi, > > This series implements a JIT performance test as discussed in [1]. > Patch 1 is a small fix, patches 2-6 are preparations and patch 7 is > the test itself. > > ChangeLog: > v1: https://sourceware.org/pipermail/gdb-patches/2022-May/189427.html > v1 -> v2: > * Make sure shared objects contain virtual addresses they are loaded >   at by reusing parts of jit-elf-helpers.exp.  By default, virtual >   addresses in all shared objects are relative to 0 - this creates a >   lots of overlaps and forces sort_cmp () to go through the slow > "Sort >   on sequence number of the objfile in the chain" path, which is not > a >   useful performance testing scenario. > * Fix DEFAULT_BINARY_LINK_WITH_SHLIBS style (Andrew). > * Rename SHLIB to TOTAL_NR_SHLIBS (Andrew). > * Add SOLIB_COUNT (Andrew). > * Drop "gdb.perf/: Compile the binary with -DSHLIB", it's superseded > by >   "Allow adjusting GenPerfTest compile options". > > 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 similar to the ones from > Andrew and show that [1] is an improvement.  The third result shown > on > the chart is from [3] - with it I can pass the 10k JITed objects mark > and debug CoreCLR JIT with GDB.  It's still WIP though - the > testsuite > shows a couple of failures. > > Best regards, > Ilya > > [1] https://sourceware.org/pipermail/gdb-patches/2022-May/189341.html > [2] > https://github.com/iii-i/binutils-gdb/blob/section-map-20220530-2/gdb/testsuite/jit.png > [3] > https://github.com/iii-i/binutils-gdb/commits/section-map-20220530-2 > > Ilya Leoshkevich (7): >   gdb.perf/: Fix tcl_string_list_to_python_list {x} >   gdb.perf/: Add binary_link_with_shlibs setting to GenPerfTest >   gdb.perf/: Allow adjusting GenPerfTest compile options >   gdb.base/: Introduce jit-protocol-util.h >   gdb.base/: Introduce jit_compile_options >   gdb.base/: Introduce n_jit_so_address >   gdb.perf/: Add JIT performance test > >  gdb/testsuite/gdb.base/jit-elf-fork-main.c | 48 ++---------- >  gdb/testsuite/gdb.base/jit-elf-main.c      | 48 ++---------- >  gdb/testsuite/gdb.base/jit-elf-util.h      | 17 +++++ >  gdb/testsuite/gdb.base/jit-protocol-util.h | 74 ++++++++++++++++++ >  gdb/testsuite/gdb.base/jit-reader-host.c   |  8 +- >  gdb/testsuite/gdb.perf/jit-check.exp       | 25 +++++++ >  gdb/testsuite/gdb.perf/jit-check.py        | 60 +++++++++++++++ >  gdb/testsuite/gdb.perf/jit-solib.c         | 27 +++++++ >  gdb/testsuite/gdb.perf/jit.c               | 87 > ++++++++++++++++++++++ >  gdb/testsuite/gdb.perf/jit.exp             | 79 ++++++++++++++++++++ >  gdb/testsuite/lib/gen-perf-test.exp        | 54 +++++++++++--- >  gdb/testsuite/lib/jit-elf-helpers.exp      | 22 ++++-- >  gdb/testsuite/lib/perftest.exp             |  2 +- >  13 files changed, 439 insertions(+), 112 deletions(-) >  create mode 100644 gdb/testsuite/gdb.base/jit-protocol-util.h >  create mode 100644 gdb/testsuite/gdb.perf/jit-check.exp >  create mode 100644 gdb/testsuite/gdb.perf/jit-check.py >  create mode 100644 gdb/testsuite/gdb.perf/jit-solib.c >  create mode 100644 gdb/testsuite/gdb.perf/jit.c >  create mode 100644 gdb/testsuite/gdb.perf/jit.exp > Hi, is there anything else that needs to be adjusted here? Best regards, Ilya