From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2ZozHUdBlWIQVAkAWB0awg (envelope-from ) for ; Mon, 30 May 2022 18:12:23 -0400 Received: by simark.ca (Postfix, from userid 112) id 66B8E1E221; Mon, 30 May 2022 18:12:23 -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=FV4lvQjD; 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 21F5E1E01D for ; Mon, 30 May 2022 18:12:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A23E3870861 for ; Mon, 30 May 2022 22:12:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A23E3870861 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653948741; bh=c0SqyR8iBfkoeHvBPDfdWJglg9LaAmvP/4lwx6tTtYA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=FV4lvQjDsXKMCmpGw1tzRbnzLf3GK/SsNsYei6vfA2FwCrv01FeTVnRMrsc94fNyG G9uAP5p1Nv1nFGSWXbBbfsLkHgJSIF6C0xyMv7dUV7ElHUx1CenDMe+d7iuN8hX+iV 1JjJQ+XN9w7WNFZgDWN90+pOpNMulVmRX66YlFQ8= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 47BAE3857BB1 for ; Mon, 30 May 2022 22:12:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47BAE3857BB1 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24UKqlmH007974; Mon, 30 May 2022 22:11:58 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gd5bngymq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:11:57 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24UM5flY028709; Mon, 30 May 2022 22:11:57 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gd5bngymd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:11:57 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24UM6hEh025718; Mon, 30 May 2022 22:11:55 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03ams.nl.ibm.com with ESMTP id 3gbc7h3727-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:11:54 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24UMBoWf54329772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 May 2022 22:11:50 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B01D4C052; Mon, 30 May 2022 22:11:50 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A167C4C044; Mon, 30 May 2022 22:11:49 +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:11:49 +0000 (GMT) To: Tom Tromey , Andrew Burgess Subject: [PATCH v2 0/7] gdb.perf/: Add JIT performance test Date: Tue, 31 May 2022 00:11:40 +0200 Message-Id: <20220530221147.1991835-1-iii@linux.ibm.com> X-Mailer: git-send-email 2.35.3 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ttdkolfiO1q6ZHfADXNPHtugxnvI7hVs X-Proofpoint-ORIG-GUID: G50TkgyYbv8YHdWxxOlOeyzbVHWXup9o 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.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-05-30_10,2022-05-30_03,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 lowpriorityscore=0 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" 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 -- 2.35.3