From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5r04D5tT6mJ7vx8AWB0awg (envelope-from ) for ; Wed, 03 Aug 2022 06:53:15 -0400 Received: by simark.ca (Postfix, from userid 112) id 2DDDC1EA05; Wed, 3 Aug 2022 06:53:15 -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=V50Pf5V7; 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 76B201E9EB for ; Wed, 3 Aug 2022 06:53:14 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACBAC3858439 for ; Wed, 3 Aug 2022 10:53:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACBAC3858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1659523993; bh=SG2NHYsORQfVfaLrNwO5RhpW5MxQtYXWyo4CaD934WQ=; 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=V50Pf5V7HACC+5a+Lvn0Jo/vKiDiqPWmORuFxppMOkW06je5j8aYbIRS7v/eLH0uU Dx2V7qHgmfZDLy+g8me1oGnsdNnvYMwx88BLIsFx7OXUYO8x0kOUg98PPBb02TXdeb jRN6+P0MYuICiS7NSJgm29bwfLsfj/Tv/s0dc080= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 4DDBB3858C20 for ; Wed, 3 Aug 2022 10:52:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DDBB3858C20 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 273Apk6Y027553; Wed, 3 Aug 2022 10:52:49 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hqqmvg0j4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Aug 2022 10:52:49 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 273Aqmsk001747; Wed, 3 Aug 2022 10:52:48 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 3hqqmvg0hm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Aug 2022 10:52:48 +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 273ApaCa005735; Wed, 3 Aug 2022 10:52:46 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma01fra.de.ibm.com with ESMTP id 3hmv98vnsf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Aug 2022 10:52:46 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 273AqgaB27656672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Aug 2022 10:52:42 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA189A4060; Wed, 3 Aug 2022 10:52:42 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 575CAA405B; Wed, 3 Aug 2022 10:52:42 +0000 (GMT) Received: from [9.171.31.241] (unknown [9.171.31.241]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 3 Aug 2022 10:52:42 +0000 (GMT) Message-ID: <2303df1afed8c2a5f623bfcb2c0e5167ce2d5b2e.camel@linux.ibm.com> Subject: [PING^2] [PATCH v2 0/7] gdb.perf/: Add JIT performance test To: Tom Tromey , Andrew Burgess Date: Wed, 03 Aug 2022 12:52:42 +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-ORIG-GUID: IaVtpnHqe_lp9oqQRprMvfy-W1PjazZ- X-Proofpoint-GUID: 3SQRCqYHTFfecaoWhLOyExMx0RH3ekfV 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.122.1 definitions=2022-08-03_03,2022-08-02_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 mlxscore=0 suspectscore=0 phishscore=0 spamscore=0 adultscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2208030048 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 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 Ping.